Add update steps for multisig deployment

This commit is contained in:
Nabarun 2025-06-14 09:18:23 +05:30
parent 25f437dd52
commit cba2a0e6e5
2 changed files with 42 additions and 8 deletions

View File

@ -138,7 +138,7 @@
- Run the following steps in machine where [the genesis file is to be generated (machine 3)](#build-laconicd-to-generate-genesis-file) - Run the following steps in machine where [the genesis file is to be generated (machine 3)](#build-laconicd-to-generate-genesis-file)
- Copy over compressed `testnet-state.zst` file to target machine - Copy over compressed `testnet-state.zst` file in previous steps from machine 1 to machine 3
- Set envs: - Set envs:

View File

@ -8,7 +8,6 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
- [ansible](../README.md#ansible-installation) - [ansible](../README.md#ansible-installation)
- If running playbook to setup deployment on remote machine, the following need to be installed in remote: - If running playbook to setup deployment on remote machine, the following need to be installed in remote:
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install) - [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- [yq](https://github.com/mikefarah/yq?tab=readme-ov-file#wget)
## Configuration ## Configuration
@ -26,7 +25,6 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
* Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with your node configuration: * Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with your node configuration:
```yaml ```yaml
# TODO: Update with example domains mapped to ports
next_public_node_addresses: '["https://laconicd-mainnet.laconic.com"]' next_public_node_addresses: '["https://laconicd-mainnet.laconic.com"]'
node_rest_endpoint: "https://api.laconicd-mainnet.laconic.com" node_rest_endpoint: "https://api.laconicd-mainnet.laconic.com"
``` ```
@ -37,14 +35,20 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
```bash ```bash
# Parent directory where the deployment directory will live # Parent directory where the deployment directory will live
export DATA_DIRECTORY=<path/to/deployments/directory> export DATA_DIRECTORY=<path/to/deployments/directory>
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
``` ```
* Copy the inventory file:
```bash
cp ~/cerc/laconicd-stack/playbooks/hosts.ini.example ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini
```
### Local Setup ### Local Setup
* Setup and start the multisig app: * Setup and start the multisig app:
```bash ```bash
ansible-playbook -v -i hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local
``` ```
* Access the app at <http://localhost:7000/laconic> * Access the app at <http://localhost:7000/laconic>
@ -52,16 +56,14 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
### Remote Setup ### Remote Setup
* Create and configure hosts.ini: * Create and configure hosts.ini:
* Copy the example file:
```bash
cp ~/cerc/laconicd-stack/playbooks/hosts.ini.example ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini
```
* Edit `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini` and update the remote host details: * Edit `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini` and update the remote host details:
```ini ```ini
[remote] [remote]
# Replace with your actual remote host details # Replace with your actual remote host details
remote_host ansible_host=your.remote.host ansible_user=your_remote_user ansible_ssh_common_args='-o ForwardAgent=yes' remote_host ansible_host=your.remote.host ansible_user=your_remote_user ansible_ssh_common_args='-o ForwardAgent=yes'
``` ```
* Verify SSH connection using Ansible ping: * Verify SSH connection using Ansible ping:
```bash ```bash
ansible all -m ping -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini --limit remote_host ansible all -m ping -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini --limit remote_host
@ -81,6 +83,38 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR logs -f cosmos-multisig-ui laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR logs -f cosmos-multisig-ui
``` ```
## Update
- Set environment variables for the deployment:
```bash
# Parent directory where the deployment directory will live
export DATA_DIRECTORY=<path/to/deployments/directory>
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
```
- Stop the deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR stop
```
- Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with required values
- Run ansible playbook to deploy again:
- For local host
```bash
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local
```
- For remote host (check that remote is configured properly in `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini`)
```bash
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit remote_host
```
## Clean up ## Clean up
- To stop the deployment: - To stop the deployment: