Add playbook for running cosmos multisig app
This commit is contained in:
parent
40ac26bd78
commit
55eec601fd
58
playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml
Normal file
58
playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
- name: Setup and deploy the cosmos multisig app
|
||||
hosts: localhost
|
||||
vars_files:
|
||||
- cosmos-multisig-vars.yml
|
||||
vars:
|
||||
data_directory: "{{ lookup('env', 'DATA_DIRECTORY') }}"
|
||||
multisig_deployment_dir: "{{ lookup('env', 'MULTISIG_DEPLOYMENT_DIR') }}"
|
||||
spec_output: "{{data_directory}}/cosmos-multisig-ui-spec.yml"
|
||||
spec_template: "./templates/specs/cosmos-multisig-app-spec-template.yml.j2"
|
||||
tasks:
|
||||
- name: Fail if DATA_DIRECTORY env var is not set
|
||||
fail:
|
||||
msg: "Environment variable DATA_DIRECTORY is not set. Please export it before running the playbook."
|
||||
when: lookup('env', 'DATA_DIRECTORY') == ''
|
||||
|
||||
- name: Clone zenith-stack repo
|
||||
shell: |
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/cosmos-multisig-ui@iv-default-laconic --git-ssh --pull
|
||||
|
||||
- name: Build container image
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/cosmos-multisig-ui/stack-orchestrator/stacks/cosmos-multisig-ui build-containers
|
||||
|
||||
- name: Create deployment spec file
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/cosmos-multisig-ui/stack-orchestrator/stacks/cosmos-multisig-ui deploy init --output {{ spec_output }}
|
||||
|
||||
- name: Replace network section in spec_output
|
||||
shell: >
|
||||
yq eval '(.network) = load("{{ spec_template }}").network' -i {{ spec_output }}
|
||||
|
||||
- name: Create deployment from spec file
|
||||
shell: |
|
||||
laconic-so --stack ~/cerc/cosmos-multisig-ui/stack-orchestrator/stacks/cosmos-multisig-ui/ deploy create --spec-file {{ spec_output }} --deployment-dir {{ multisig_deployment_dir }}
|
||||
|
||||
- name: Create config.env in deployment dir
|
||||
copy:
|
||||
dest: "{{ multisig_deployment_dir }}/config.env"
|
||||
content: |
|
||||
NEXT_PUBLIC_MULTICHAIN={{ next_public_multichain }}
|
||||
NEXT_PUBLIC_REGISTRY_NAME={{ next_public_registry_name }}
|
||||
NEXT_PUBLIC_LOGO={{ next_public_logo }}
|
||||
NEXT_PUBLIC_CHAIN_ID={{ next_public_chain_id }}
|
||||
NEXT_PUBLIC_CHAIN_DISPLAY_NAME={{ next_public_chain_display_name }}
|
||||
NEXT_PUBLIC_NODE_ADDRESSES={{ next_public_node_addresses }}
|
||||
NEXT_PUBLIC_DENOM={{ next_public_denom }}
|
||||
NEXT_PUBLIC_DISPLAY_DENOM={{ next_public_display_denom }}
|
||||
NEXT_PUBLIC_DISPLAY_DENOM_EXPONENT={{ next_public_display_denom_exponent }}
|
||||
NEXT_PUBLIC_ASSETS={{ next_public_assets }}
|
||||
NEXT_PUBLIC_GAS_PRICE={{ next_public_gas_price }}
|
||||
NEXT_PUBLIC_ADDRESS_PREFIX={{ next_public_address_prefix }}
|
||||
NEXT_PUBLIC_IS_HTTP_ENABLED={{ next_public_is_http_enabled }}
|
||||
mode: '0644'
|
||||
|
||||
- name: Start the deployment
|
||||
shell: |
|
||||
laconic-so deployment --dir {{ multisig_deployment_dir }} start
|
@ -0,0 +1,13 @@
|
||||
next_public_multichain:
|
||||
next_public_registry_name:
|
||||
next_public_logo:
|
||||
next_public_chain_id:
|
||||
next_public_chain_display_name:
|
||||
next_public_node_addresses:
|
||||
next_public_denom:
|
||||
next_public_display_denom:
|
||||
next_public_display_denom_exponent:
|
||||
next_public_assets:
|
||||
next_public_gas_price:
|
||||
next_public_address_prefix:
|
||||
next_public_is_http_enabled:
|
@ -0,0 +1,12 @@
|
||||
network:
|
||||
ports:
|
||||
cosmos-multisig-ui:
|
||||
- 3000:3000
|
||||
zero:
|
||||
- 5080
|
||||
- 6080
|
||||
alpha:
|
||||
- 8080:8080
|
||||
- 9080
|
||||
ratel:
|
||||
- 8000
|
Loading…
Reference in New Issue
Block a user