From 15270c0701b36ec90ea7a80b99eb8e18c793ee65 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 9 Aug 2024 15:10:54 +0530 Subject: [PATCH] Add instructions to update stage1 and console deployments --- README.md | 6 ++- ops/deployments-from-scratch.md | 2 +- ops/update-deployments.md | 94 ++++++++++++++++++++++++++++++++- 3 files changed, 98 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce2c0e9..db0eeb1 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ Stacks to run a node for laconic testnet - [laconic-console stack documentation](stack-orchestrator/stacks/laconic-console/README.md) (to run laconic registry CLI and console standalone) - [laconic-faucet stack documentation](stack-orchestrator/stacks/laconic-faucet/README.md) -## Testnet onboarding demo +## ops -Follow steps in [testnet-onboarding-demo.md](./testnet-onboarding-demo.md) to run demo for onboarding testnet participants in laconicd chain +- [deployments-from-scratch.md](./ops/deployments-from-scratch.md) +- [stage0-to-stage1.md](./ops/stage0-to-stage1.md) +- [update-deployments.md](./ops/update-deployments.md) ## Join LORO testnet diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index c9e7c22..613d338 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -215,7 +215,7 @@ * Update the configuration: ```bash - cat < laconic-console-deployment/config.env + cat < onboarding-app-deployment/config.env WALLET_CONNECT_ID=63... CERC_REGISTRY_GQL_ENDPOINT="https://laconicd.laconic.com/api" diff --git a/ops/update-deployments.md b/ops/update-deployments.md index ec67681..04dc4e6 100644 --- a/ops/update-deployments.md +++ b/ops/update-deployments.md @@ -96,7 +96,7 @@ Instructions to reset / update the deployments * Update the configuration if required: ```bash - cat < laconic-console-deployment/config.env + cat < onboarding-app-deployment/config.env WALLET_CONNECT_ID=63... CERC_REGISTRY_GQL_ENDPOINT="https://laconicd.laconic.com/api" @@ -163,3 +163,95 @@ Instructions to reset / update the deployments ``` * The web wallet can now be viewed at + +## stage1 laconicd + +* Deployment dir: `/srv/laconicd/stage1-deployment` + +* Fetch and build with updated source code: + + ```bash + # laconicd source + cd ~/cerc/laconicd + + # Pull latest changes, or checkout to the required branch + git pull + + # Confirm the latest commit hash + git log + + # Rebuild the containers + cd /srv/laconicd + + laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild + ``` + +* Reset the data directory: + + ```bash + # Stop the deployment + laconic-so deployment --dir stage1-deployment stop --delete-volumes + + # Remove and recreate the required data dirs + sudo rm -rf stage1-deployment/data/laconicd-data stage1-deployment/data/genesis-config + + mkdir stage1-deployment/data/laconicd-data + mkdir stage1-deployment/data/genesis-config + ``` + +* Update the configuration if required: + + ```bash + cat < stage1-deployment/config.env + AUTHORITY_AUCTION_ENABLED=true + AUTHORITY_AUCTION_COMMITS_DURATION=3600 + AUTHORITY_AUCTION_REVEALS_DURATION=3600 + AUTHORITY_GRACE_PERIOD=7200 + EOF + ``` + +* Follow [stage0-to-stage1.md](./stage0-to-stage1.md) to generate the genesis file for stage1 and start the deployment + +## laconic-console + +* Deployment dir: `/srv/console/laconic-console-deployment` + +* Fetch and build with updated source code: + + ```bash + # testnet-onboarding-app source + cd ~/cerc/laconic-console + + # Pull latest changes, or checkout to the required branch + git pull + + # Confirm the latest commit hash + git log + + # Rebuild the containers + cd /srv/console + + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers --force-rebuild + ``` + +* Update the configuration if required: + + ```bash + cat < laconic-console-deployment/config.env + # Laconicd (hosted) GQL endpoint + LACONIC_HOSTED_ENDPOINT=https://laconicd.laconic.com + EOF + ``` + +* Restart the deployment: + + ```bash + laconic-so deployment --dir laconic-console-deployment stop + + laconic-so deployment --dir laconic-console-deployment start + + # Follow logs for console container + laconic-so deployment --dir laconic-console-deployment logs console -f + ``` + +* The laconic console can now be viewed at