From b625c4e02f4946868b89c4c29fcf8ae7e995c931 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Wed, 30 Oct 2024 13:21:26 +0530 Subject: [PATCH] Add steps to update snowball and nitro node deployments --- ops/update-deployments.md | 33 +++++++++++++++++++++++++++++++++ testnet-nitro-node.md | 22 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/ops/update-deployments.md b/ops/update-deployments.md index 3516a5a..b5b6556 100644 --- a/ops/update-deployments.md +++ b/ops/update-deployments.md @@ -330,6 +330,8 @@ Instructions to reset / update the deployments laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers --force-rebuild ``` +* Update `laconic-shopify-deployment/config.env` if required + * Restart the deployment ```bash @@ -339,3 +341,34 @@ Instructions to reset / update the deployments laconic-so deployment --dir laconic-shopify-deployment start ``` + +## Backend Deployment + +* Stack: + +* Target dir: `/srv/deploy-backend/backend-deployment` + +* If code has changed, fetch and build with updated source code: + + ```bash + laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend setup-repositories --git-ssh --pull + + # rebuild containers + laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend build-containers --force-rebuild + ``` + +* Update `backend-deployment/configmaps/config/prod.toml` if required + +* Restart the deployment + + ```bash + cd /srv/deploy-backend/backend-deployment + + laconic-so deployment --dir backend-deployment stop + + laconic-so deployment --dir backend-deployment start + ``` + +## Frontend Deployment + +Follow steps from [deployments-from-scratch.md](./deployments-from-scratch.md#deploy-frontend) to deploy the snowball frontend diff --git a/testnet-nitro-node.md b/testnet-nitro-node.md index 05af47d..4069bbe 100644 --- a/testnet-nitro-node.md +++ b/testnet-nitro-node.md @@ -728,6 +728,28 @@ Perform swaps using a swap channel created with another Nitro node over the mirr # ] ``` +## Update nitro nodes + +Run the following commands in the deployment machine + +* Rebuild containers + + ```bash + laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node build-containers --force-rebuild + ``` + +* Restart the nodes + + ```bash + cd + + laconic-so deployment --dir l1-nitro-deployment stop + laconic-so deployment --dir l1-nitro-deployment start + + laconic-so deployment --dir l2-nitro-deployment stop + laconic-so deployment --dir l2-nitro-deployment start + ``` + ## Clean up * Switch to deployments dir: