Add steps to update testnet2 deployments (#38)

Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8)

Added steps to update deployments:
- stage2 laconicd
- laconic-console-testnet2
- laconic-shopify
- fixturenet-eth
- Nitro bridge
- Nitro nodes
- Snowball backend
- Snowball frontend

Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Reviewed-on: #38
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Prathamesh Musale 2024-10-30 13:59:56 +00:00 committed by nabarun
parent c1af2f6cc7
commit 0d8628d7c3
9 changed files with 208 additions and 14 deletions

View File

@ -22,10 +22,10 @@ Follow steps in [testnet-onboarding-validator.md](./testnet-onboarding-validator
Follow steps in [Upgrade to SAPO testnet](./testnet-onboarding-validator.md#upgrade-to-sapo-testnet) for upgrading your LORO testnet node to SAPO testnet Follow steps in [Upgrade to SAPO testnet](./testnet-onboarding-validator.md#upgrade-to-sapo-testnet) for upgrading your LORO testnet node to SAPO testnet
## Run testnet Nitro Node
Follow steps in [testnet-nitro-node.md](./testnet-nitro-node.md) to run your Nitro node for the testnet
## Setup a Service Provider ## Setup a Service Provider
Follow steps in [service-provider.md](./service-provider.md) to setup / update your service provider Follow steps in [service-provider.md](./service-provider.md) to setup / update your service provider
## Run testnet Nitro Node
Follow steps in [testnet-nitro-node.md](./testnet-nitro-node.md) to run your Nitro node for the testnet

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>
@ -1272,6 +1272,8 @@
Follow deployment logs on the deployer UI Follow deployment logs on the deployer UI
* On a successful deployment, the frontend can be viewed at <https://deploy.apps.vaasl.io>
</details> </details>
<details open> <details open>
@ -1621,9 +1623,9 @@
* Create a new `hosts.ini` file: * Create a new `hosts.ini` file:
```bash ```bash
cp ../hosts.example.ini hosts.ini cp ../hosts.example.ini hosts.ini
``` ```
* Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine: * Edit the [`hosts.ini`](./hosts.ini) file to run the playbook on a remote machine:

View File

@ -20,7 +20,7 @@
laconic-so deployment --dir $STAGE1_DEPLOYMENT logs laconicd -f --tail 30 laconic-so deployment --dir $STAGE1_DEPLOYMENT logs laconicd -f --tail 30
# Note: stage1 node on deployments VM has been changed to run from /srv/laconicd/testnet-laconicd-deployment instead of /srv/laconicd/stage1-deployment # Note: stage1 node on deployments VM has been changed to run from /srv/laconicd/testnet-laconicd-deployment instead of /srv/laconicd/stage1-deployment
``` ```
* Stop the stage1 deployment: * Stop the stage1 deployment:

View File

@ -254,3 +254,168 @@ 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
* Deployment dir: `/srv/fixturenet-eth/fixturenet-eth-deployment`
* If code has changed, fetch and build with updated source code:
```bash
laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth setup-repositories --git-ssh --pull
# Rebuild the containers
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`:
```bash
CERC_ALLOW_UNPROTECTED_TXS=true
```
* Restart the deployment:
```bash
cd /srv/fixturenet-eth
laconic-so deployment --dir fixturenet-eth-deployment stop
laconic-so deployment --dir fixturenet-eth-deployment start
```
## Nitro Bridge
* Deployment dir: `/srv/bridge/bridge-deployment`
* Rebuild containers:
```bash
# Rebuild the containers
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/bridge build-containers --force-rebuild
```
* Update the configuration if required in `bridge-deployment/config.env`
* Restart the bridge deployment:
```bash
cd /srv/bridge
laconic-so deployment --dir bridge-deployment stop
laconic-so deployment --dir bridge-deployment start
```
## Backend Deployment
* Deployment 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
```
* Push updated images to the container registry:
```bash
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
```
* Update the configuration if required in `backend-deployment/configmaps/config/prod.toml`
* Restart the deployment:
```bash
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

View File

@ -17,6 +17,9 @@ Follow the steps below to point your deployer to the SAPO testnet
## Update service provider for SAPO testnet ## Update service provider for SAPO testnet
* On a successful webapp-deployer setup with SAPO testnet, your deployer will be available on <https://deploy.apps.vaasl.io>
* For creating a project, users can create a deployment auction which your deployer will bid on or they can perform a targeted deployment using your deployer LRN
### Prerequisites ### Prerequisites
* A SAPO testnet node (see [Join SAPO testnet](./README.md#join-sapo-testnet)) * A SAPO testnet node (see [Join SAPO testnet](./README.md#join-sapo-testnet))

View File

@ -2,8 +2,8 @@ version: "1.0"
name: laconic-console name: laconic-console
description: "Laconic registry CLI and console" description: "Laconic registry CLI and console"
repos: repos:
- git.vdb.to/cerc-io/laconic-registry-cli - git.vdb.to/cerc-io/laconic-registry-cli@v0.2.10
- git.vdb.to/cerc-io/laconic-console - git.vdb.to/cerc-io/laconic-console@v0.2.5
containers: containers:
- cerc/laconic-registry-cli - cerc/laconic-registry-cli
- cerc/webapp-base - cerc/webapp-base

View File

@ -2,8 +2,8 @@ version: "1.0"
name: laconic-shopify name: laconic-shopify
description: "Service that integrates a Shopify app with the Laconic wallet." description: "Service that integrates a Shopify app with the Laconic wallet."
repos: repos:
- git.vdb.to/cerc-io/shopify - git.vdb.to/cerc-io/shopify@v0.1.0
- git.vdb.to/cerc-io/laconic-faucet@shopify - git.vdb.to/cerc-io/laconic-faucet@v0.1.0-shopify
containers: containers:
- cerc/laconic-shopify - cerc/laconic-shopify
- cerc/laconic-shopify-faucet - cerc/laconic-shopify-faucet

View File

@ -2,7 +2,7 @@ version: "1.0"
name: testnet-laconicd name: testnet-laconicd
description: "Laconicd full node" description: "Laconicd full node"
repos: repos:
- git.vdb.to/cerc-io/laconicd - git.vdb.to/cerc-io/laconicd@v0.1.9
containers: containers:
- cerc/laconicd - cerc/laconicd
pods: pods:

View File

@ -851,6 +851,30 @@ Perform swaps using a swap channel created with another Nitro node over the mirr
# ] # ]
``` ```
## Update nitro nodes
* Switch to deployments dir:
```bash
cd $DEPLOYMENTS_DIR/nitro-node
```
* Rebuild containers:
```bash
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node build-containers --force-rebuild
```
* Restart the nodes
```bash
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 ## Clean up
* Switch to deployments dir: * Switch to deployments dir: