Add steps to update stage2 laconicd and console deployments

This commit is contained in:
Prathamesh Musale 2024-10-30 15:20:43 +05:30
parent eed7b782fd
commit 9d2203d122
4 changed files with 101 additions and 51 deletions

View File

@ -862,7 +862,7 @@
<details open> <details open>
<summary>Shopify</summary> <summary>Shopify</summary>
## Shopify ## Laconic Shopify
* Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/laconic-shopify> * Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/laconic-shopify>

View File

@ -255,11 +255,79 @@ Instructions to reset / update the deployments
* The laconic console can now be viewed at <https://loro-console.laconic.com> * The laconic console can now be viewed at <https://loro-console.laconic.com>
---
## stage2 laconicd
* Deployment dir: `/srv/laconicd/stage2-deployment`
* If code has changed, 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
```
* Optionally, reset the data directory:
```bash
# Stop the deployment
laconic-so deployment --dir stage2-deployment stop --delete-volumes
# Remove and recreate the required data dirs
sudo rm -rf stage2-deployment/data/laconicd-data stage2-deployment/data/genesis-config
mkdir stage2-deployment/data/laconicd-data
mkdir stage2-deployment/data/genesis-config
```
* Follow [stage1-to-stage2.md](./stage1-to-stage2.md) to reinitialize stage2 and start the deployment
## laconic-console-testnet2
* Deployment dir: `/srv/console/laconic-console-testnet2-deployment`
* Steps to update the deployment similar as in [laconic-console](#laconic-console)
## Laconic Shopify
* Deployment dir: `/srv/shopify/laconic-shopify-deployment`
* If code has changed, fetch and build with updated source code:
```bash
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify setup-repositories --git-ssh --pull
# rebuild containers
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers --force-rebuild
```
* Update the configuration if required in `laconic-shopify-deployment/config.env`
* Restart the deployment:
```bash
cd /srv/shopify
laconic-so deployment --dir laconic-shopify-deployment stop
laconic-so deployment --dir laconic-shopify-deployment start
```
## Fixturenet Eth ## Fixturenet Eth
* Stack: <https://git.vdb.to/cerc-io/fixturenet-eth-stacks> * Deployment dir: `/srv/fixturenet-eth/fixturenet-eth-deployment`
* Target dir: `/srv/fixturenet-eth/fixturenet-eth-deployment`
* If code has changed, fetch and build with updated source code: * If code has changed, fetch and build with updated source code:
@ -270,7 +338,7 @@ Instructions to reset / update the deployments
laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth build-containers --force-rebuild laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth build-containers --force-rebuild
``` ```
* Update the configuration if required in `fixturenet-eth-deployment/config.env` * Update the configuration if required in `fixturenet-eth-deployment/config.env`:
```bash ```bash
CERC_ALLOW_UNPROTECTED_TXS=true CERC_ALLOW_UNPROTECTED_TXS=true
@ -288,9 +356,7 @@ Instructions to reset / update the deployments
## Nitro Bridge ## Nitro Bridge
* Stack: <https://git.vdb.to/cerc-io/nitro-stack/src/branch/main/stack-orchestrator/stacks/bridge> * Deployment dir: `/srv/bridge/bridge-deployment`
* Target dir: `/srv/bridge/bridge-deployment`
* Rebuild containers: * Rebuild containers:
@ -299,7 +365,9 @@ Instructions to reset / update the deployments
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers --force-rebuild laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers --force-rebuild
``` ```
* Restart the bridge deployment * Update the configuration if required in `bridge-deployment/config.env`
* Restart the bridge deployment:
```bash ```bash
cd /srv/bridge cd /srv/bridge
@ -309,38 +377,9 @@ Instructions to reset / update the deployments
laconic-so deployment --dir bridge-deployment start laconic-so deployment --dir bridge-deployment start
``` ```
## Laconic Shopify
* Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack>
* Target dir: `/srv/shopify/laconic-shopify-deployment`
* If code has changed, fetch and build with updated source code:
```bash
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify setup-repositories --git-ssh --pull
# rebuild containers
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
cd /srv/shopify
laconic-so deployment --dir laconic-shopify-deployment stop
laconic-so deployment --dir laconic-shopify-deployment start
```
## Backend Deployment ## Backend Deployment
* Stack: <https://git.vdb.to/cerc-io/snowballtools-base-api-stack> * Deployment dir: `/srv/deploy-backend/backend-deployment`
* Target dir: `/srv/deploy-backend/backend-deployment`
* If code has changed, fetch and build with updated source code: * If code has changed, fetch and build with updated source code:
@ -351,16 +390,25 @@ Instructions to reset / update the deployments
laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend build-containers --force-rebuild laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend build-containers --force-rebuild
``` ```
* Push updated images to the container registry * Push updated images to the container registry:
```bash ```bash
cd /srv/deploy-backend cd /srv/deploy-backend
# login to container registry
CONTAINER_REGISTRY_URL=container-registry.apps.vaasl.io
CONTAINER_REGISTRY_USERNAME=
CONTAINER_REGISTRY_PASSWORD=
docker login $CONTAINER_REGISTRY_URL --username $CONTAINER_REGISTRY_USERNAME --password $CONTAINER_REGISTRY_PASSWORD
# Push backend images
laconic-so deployment --dir backend-deployment push-images laconic-so deployment --dir backend-deployment push-images
``` ```
* Update `backend-deployment/configmaps/config/prod.toml` if required * Update the configuration if required in `backend-deployment/configmaps/config/prod.toml`
* Restart the deployment * Restart the deployment:
```bash ```bash
laconic-so deployment --dir backend-deployment stop laconic-so deployment --dir backend-deployment stop
@ -370,4 +418,4 @@ Instructions to reset / update the deployments
## Frontend Deployment ## Frontend Deployment
Follow steps from [deployments-from-scratch.md](./deployments-from-scratch.md#deploy-frontend) to deploy the snowball frontend * Follow steps from [deployments-from-scratch.md](./deployments-from-scratch.md#deploy-frontend) to deploy the snowball frontend

View File

@ -853,9 +853,13 @@ Perform swaps using a swap channel created with another Nitro node over the mirr
## Update nitro nodes ## Update nitro nodes
Run the following commands in the deployment machine * Switch to deployments dir:
* Rebuild containers ```bash
cd $DEPLOYMENTS_DIR/nitro-node
```
* Rebuild containers:
```bash ```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node build-containers --force-rebuild laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node build-containers --force-rebuild
@ -864,8 +868,6 @@ Run the following commands in the deployment machine
* Restart the nodes * Restart the nodes
```bash ```bash
cd <path-to-nitro-node-deployments>
laconic-so deployment --dir l1-nitro-deployment stop laconic-so deployment --dir l1-nitro-deployment stop
laconic-so deployment --dir l1-nitro-deployment start laconic-so deployment --dir l1-nitro-deployment start