Add instructions for deployment ops #19
@ -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
|
||||
- [Update deployments after code changes](./ops/update-deployments.md)
|
||||
- [Halt stage0 and start stage1](./ops/stage0-to-stage1.md)
|
||||
- [Create deployments from scratch (for reference only)](./ops/deployments-from-scratch.md)
|
||||
|
||||
## Join LORO testnet
|
||||
|
||||
|
670
ops/deployments-from-scratch.md
Normal file
670
ops/deployments-from-scratch.md
Normal file
@ -0,0 +1,670 @@
|
||||
# Create deployments from scratch (for reference only)
|
||||
|
||||
## Login
|
||||
|
||||
* Log in as `dev` user on the deployments VM
|
||||
|
||||
* All the deployments are placed in the `/srv` directory:
|
||||
|
||||
```bash
|
||||
cd /srv
|
||||
```
|
||||
|
||||
<details open>
|
||||
<summary>stage0 laconicd</summary>
|
||||
|
||||
## stage0 laconicd
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/fixturenet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/fixturenet-laconicd>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/laconicd>
|
||||
|
||||
* Target dir: `/srv/laconicd/stage0-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir stage0-deployment stop --delete-volumes
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf stage0-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm stage0-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-laconicd-stack --pull
|
||||
|
||||
# This should clone the fixturenet-laconicd-stack repo at `/home/dev/cerc/fixturenet-laconicd-stack`
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd setup-repositories --pull
|
||||
|
||||
# This should clone the laconicd repo at `/home/dev/cerc/laconicd`
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild
|
||||
|
||||
# This should create the "cerc/laconicd" Docker image
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy init --output stage0-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
# stage0-spec.yml
|
||||
network:
|
||||
ports:
|
||||
laconicd:
|
||||
- '6060'
|
||||
- '127.0.0.1:26657:26657'
|
||||
- '26656'
|
||||
- '127.0.0.1:9473:9473'
|
||||
- '127.0.0.1:9090:9090'
|
||||
- '127.0.0.1:1317:1317'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file stage0-spec.yml --deployment-dir stage0-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
cat <<EOF > stage0-deployment/config.env
|
||||
# Set to true to enable adding participants functionality of the onboarding module
|
||||
ONBOARDING_ENABLED=true
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage0-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# List down the containers and check health status
|
||||
docker ps -a | grep laconicd
|
||||
|
||||
# Follow logs for laconicd container, check that new blocks are getting created
|
||||
laconic-so deployment --dir stage0-deployment logs laconicd -f
|
||||
```
|
||||
|
||||
* Verify that endpoint is now publicly accessible:
|
||||
|
||||
* <https://laconicd.laconic.com> is pointed to the node's RPC endpoint
|
||||
|
||||
* Check status query:
|
||||
|
||||
```bash
|
||||
curl https://laconicd.laconic.com/status | jq
|
||||
|
||||
# Expected output:
|
||||
# JSON with `node_info`, `sync_info` and `validator_info`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>testnet-onboarding-app</summary>
|
||||
|
||||
## testnet-onboarding-app
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/testnet-onboarding-app-stack/src/branch/main/stack-orchestrator/stacks/onboarding-app>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/testnet-onboarding-app>
|
||||
|
||||
* Target dir: `/srv/app/onboarding-app-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/app
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir onboarding-app-deployment
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf onboarding-app-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm onboarding-app-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-onboarding-app-stack --pull
|
||||
|
||||
# This should clone the testnet-onboarding-app-stack repo at `/home/dev/cerc/testnet-onboarding-app-stack`
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app setup-repositories --pull
|
||||
|
||||
# This should clone the testnet-onboarding-app repo at `/home/dev/cerc/testnet-onboarding-app`
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers --force-rebuild
|
||||
|
||||
# This should create the Docker image "cerc/testnet-onboarding-app" locally
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/app
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy init --output onboarding-app-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
testnet-onboarding-app:
|
||||
- '127.0.0.1:3000:80'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy create --spec-file onboarding-app-spec.yml --deployment-dir onboarding-app-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
cat <<EOF > onboarding-app-deployment/config.env
|
||||
WALLET_CONNECT_ID=63...
|
||||
|
||||
CERC_REGISTRY_GQL_ENDPOINT="https://laconicd.laconic.com/api"
|
||||
CERC_LACONICD_RPC_ENDPOINT="https://laconicd.laconic.com"
|
||||
|
||||
CERC_FAUCET_ENDPOINT="https://faucet.laconic.com"
|
||||
|
||||
CERC_WALLET_META_URL="https://loro-signup.laconic.com"
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir onboarding-app-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# List down the container
|
||||
docker ps -a | grep testnet-onboarding-app
|
||||
|
||||
# Follow logs for testnet-onboarding-app container, wait for the build to finish
|
||||
laconic-so deployment --dir onboarding-app-deployment logs testnet-onboarding-app -f
|
||||
```
|
||||
|
||||
* The onboarding app can now be viewed at <https://loro-signup.laconic.com>
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>laconic-wallet-web</summary>
|
||||
|
||||
## laconic-wallet-web
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/laconic-wallet-web/src/branch/main/stack/stack-orchestrator/stack/laconic-wallet-web>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/laconic-wallet-web>
|
||||
|
||||
* Target dir: `/srv/wallet/laconic-wallet-web-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/wallet
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf laconic-wallet-web-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm laconic-wallet-web-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconic-wallet-web --pull
|
||||
|
||||
# This should clone the laconic-wallet-web repo at `/home/dev/cerc/laconic-wallet-web`
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web build-containers --force-rebuild
|
||||
|
||||
# This should create the Docker image "cerc/laconic-wallet-web" locally
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/wallet
|
||||
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web deploy init --output laconic-wallet-web-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
laconic-wallet-web:
|
||||
- '127.0.0.1:5000:80'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web deploy create --spec-file laconic-wallet-web-spec.yml --deployment-dir laconic-wallet-web-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
cat <<EOF > laconic-wallet-web-deployment/config.env
|
||||
WALLET_CONNECT_ID=63...
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# List down the container
|
||||
docker ps -a | grep laconic-wallet-web
|
||||
|
||||
# Follow logs for laconic-wallet-web container, wait for the build to finish
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment logs laconic-wallet-web -f
|
||||
```
|
||||
|
||||
* The web wallet can now be viewed at <https://wallet.laconic.com>
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>stage1 laconicd</summary>
|
||||
|
||||
## stage1 laconicd
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/fixturenet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/fixturenet-laconicd>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/laconicd>
|
||||
|
||||
* Target dir: `/srv/laconicd/stage1-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir stage1-deployment stop --delete-volumes
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf stage1-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm stage1-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Same as that for [stage0 laconicd](#setup), not required if already done for stage0
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy init --output stage1-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
# stage1-spec.yml
|
||||
network:
|
||||
ports:
|
||||
laconicd:
|
||||
- '6060'
|
||||
- '127.0.0.1:26657:26657'
|
||||
- '26656:26656'
|
||||
- '127.0.0.1:9473:9473'
|
||||
- '127.0.0.1:9090:9090'
|
||||
- '127.0.0.1:1317:1317'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file stage1-spec.yml --deployment-dir stage1-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
cat <<EOF > stage1-deployment/config.env
|
||||
AUTHORITY_AUCTION_ENABLED=true
|
||||
AUTHORITY_AUCTION_COMMITS_DURATION=3600
|
||||
AUTHORITY_AUCTION_REVEALS_DURATION=3600
|
||||
AUTHORITY_GRACE_PERIOD=7200
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Follow [stage0-to-stage1.md](./stage0-to-stage1.md) to halt stage0 deployment, generate the genesis file for stage1 and start the stage1 deployment
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>faucet</summary>
|
||||
|
||||
## faucet
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/laconic-faucet>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/laconic-faucet>
|
||||
|
||||
* Target dir: `/srv/faucet/laconic-faucet-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/faucet
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf laconic-faucet-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm laconic-faucet-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack --pull
|
||||
|
||||
# This should clone the testnet-laconicd-stack repo at `/home/dev/cerc/testnet-laconicd-stack`
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet setup-repositories --pull
|
||||
|
||||
# This should clone the laconicd repo at `/home/dev/cerc/laconic-faucet
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet build-containers --force-rebuild
|
||||
|
||||
# This should create the "cerc/laconic-faucet" Docker image
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/faucet
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy init --output laconic-faucet-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
# laconic-faucet-spec.yml
|
||||
network:
|
||||
ports:
|
||||
faucet:
|
||||
- '127.0.0.1:4000:3000'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy create --spec-file laconic-faucet-spec.yml --deployment-dir laconic-faucet-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
# Get the faucet account key from stage0 deployment
|
||||
export FAUCET_ACCOUNT_PK=$(laconic-so deployment --dir /srv/laconicd/stage0-deployment exec laconicd "echo y | laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe")
|
||||
|
||||
cat <<EOF > laconic-faucet-deployment/config.env
|
||||
CERC_FAUCET_KEY=$FAUCET_ACCOUNT_PK
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-faucet-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# List down the containers and check health status
|
||||
docker ps -a | grep faucet
|
||||
|
||||
# Check logs for faucet container
|
||||
laconic-so deployment --dir laconic-faucet-deployment logs faucet -f
|
||||
```
|
||||
|
||||
* Verify that endpoint is now publicly accessible:
|
||||
|
||||
* <https://faucet.laconic.com> is pointed to the faucet endpoint
|
||||
|
||||
* Check faucet:
|
||||
|
||||
```bash
|
||||
curl -X POST https://faucet.laconic.com/faucet
|
||||
|
||||
# Expected output:
|
||||
# {"error":"address is required"}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>laconic-console</summary>
|
||||
|
||||
## laconic-console
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/laconic-console>
|
||||
|
||||
* Source repos:
|
||||
* <https://git.vdb.to/cerc-io/laconic-registry-cli>
|
||||
* <https://git.vdb.to/cerc-io/laconic-console>
|
||||
|
||||
* Target dir: `/srv/console/laconic-console-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/console
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir laconic-console-deployment stop --delete-volumes
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf laconic-console-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm laconic-console-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack --pull
|
||||
|
||||
# This should clone the testnet-laconicd-stack repo at `/home/dev/cerc/testnet-laconicd-stack`
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console setup-repositories --pull
|
||||
|
||||
# This should clone the laconic-registry-cli repo at `/home/dev/cerc/laconic-registry-cli`, laconic-console repo at `/home/dev/cerc/laconic-console`
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers --force-rebuild
|
||||
|
||||
# This should create the Docker images: "cerc/laconic-registry-cli", "cerc/webapp-base", "cerc/laconic-console-host"
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/console
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
|
||||
```
|
||||
|
||||
* Edit network in the spec file to map container ports to host ports:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
laconic-console:
|
||||
- '127.0.0.1:4001:80'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment
|
||||
```
|
||||
|
||||
* Update the configuration:
|
||||
|
||||
```bash
|
||||
cat <<EOF > laconic-console-deployment/config.env
|
||||
# Laconicd (hosted) GQL endpoint
|
||||
LACONIC_HOSTED_ENDPOINT=https://laconicd.laconic.com
|
||||
EOF
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-console-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# List down the container
|
||||
docker ps -a | grep console
|
||||
|
||||
# Follow logs for console container
|
||||
laconic-so deployment --dir laconic-console-deployment logs console -f
|
||||
```
|
||||
|
||||
* The laconic console can now be viewed at <https://loro-console.laconic.com>
|
||||
|
||||
</details>
|
||||
|
||||
## Domains / Port Mappings
|
||||
|
||||
```bash
|
||||
laconicd.laconic.com -> 26657
|
||||
laconicd.laconic.com/api -> 9473/api
|
||||
faucet.laconic.com -> 4000
|
||||
loro-signup.laconic.com -> 3000
|
||||
wallet.laconic.com -> 5000
|
||||
loro-console.laconic.com -> 4001
|
||||
```
|
110
ops/stage0-to-stage1.md
Normal file
110
ops/stage0-to-stage1.md
Normal file
@ -0,0 +1,110 @@
|
||||
# Halt stage0 and start stage1
|
||||
|
||||
Once all the participants have completed their onboarding, stage0 laconicd chain can be halted and stage1 chain can be initialized and started
|
||||
|
||||
## Login
|
||||
|
||||
* Log in as `dev` user on the deployments VM
|
||||
|
||||
* All the deployments are placed in the `/srv` directory:
|
||||
|
||||
```bash
|
||||
cd /srv
|
||||
```
|
||||
|
||||
## Halt stage0
|
||||
|
||||
* Confirm the the currently running node is for stage0 chain:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
laconic-so deployment --dir stage0-deployment logs laconicd -f --tail 30
|
||||
```
|
||||
|
||||
* List the participants on stage0:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list"
|
||||
```
|
||||
|
||||
* Stop the stage0 deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage0-deployment stop
|
||||
```
|
||||
|
||||
## Start stage1
|
||||
|
||||
* Use the scripts in fixturenet-laconicd stack to generate genesis file for stage1 using onboarding participants from stage0 chain with token allocations:
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
# Set current working dir path in a variable
|
||||
DEPLOYMENTS_DIR=$(pwd)
|
||||
|
||||
cd ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd
|
||||
|
||||
# Generate the genesis file
|
||||
# Participant allocation: 1000000000000 (10^12)
|
||||
# Validator allocation: 2000000000000000 (10^15)
|
||||
./scripts/generate-stage1-genesis-using-allocations.sh $DEPLOYMENTS_DIR/stage0-deployment 1000000000000 2000000000000000
|
||||
|
||||
# Expected output:
|
||||
# Genesis file for stage1 written to output/genesis.json
|
||||
|
||||
# Remove the temporary data directory
|
||||
sudo rm -rf stage1-genesis
|
||||
|
||||
# Go back to the directory where deployments are created
|
||||
cd $DEPLOYMENTS_DIR
|
||||
```
|
||||
|
||||
* Copy over the generated genesis file (`.json`) containing the onboarding module state with funded participants to data directory in stage1 deployment (`stage1-deployment/data/genesis-config`):
|
||||
|
||||
```bash
|
||||
cd /srv/laconicd
|
||||
|
||||
cp ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd/output/genesis.json stage1-deployment/data/genesis-config/genesis.json
|
||||
```
|
||||
|
||||
* Start the stage1 deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage1-deployment start
|
||||
```
|
||||
|
||||
* Check status of stage1 laconicd:
|
||||
|
||||
```bash
|
||||
# List down the container and check health status
|
||||
docker ps -a | grep laconicd
|
||||
|
||||
# Follow logs for laconicd container, check that new blocks are getting created
|
||||
laconic-so deployment --dir stage1-deployment logs laconicd -f
|
||||
```
|
||||
|
||||
* Query the list of registered participants in stage1 laconicd:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage1-deployment exec laconicd "laconicd query onboarding list"
|
||||
|
||||
# Confirm that all onboarded participants on stage0 appear in the list
|
||||
```
|
||||
|
||||
* Get the node's peer adddress and stage1 genesis file to share with the participants:
|
||||
|
||||
* Get the node id:
|
||||
|
||||
```bash
|
||||
echo $(laconic-so deployment --dir stage1-deployment exec laconicd "laconicd cometbft show-node-id")@laconicd.laconic.com:26656
|
||||
```
|
||||
|
||||
* Get the genesis file:
|
||||
|
||||
```bash
|
||||
scp dev@<deployments-server-hostname>:/srv/laconicd/stage1-deployment/data/laconicd-data/config/genesis.json </path/to/local/directory>
|
||||
```
|
||||
|
||||
* Now users can follow the steps to [Join as a validator on stage1](https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/testnet-onboarding-validator.md#join-as-a-validator-on-stage1)
|
262
ops/update-deployments.md
Normal file
262
ops/update-deployments.md
Normal file
@ -0,0 +1,262 @@
|
||||
# Update deployments after code changes
|
||||
|
||||
Instructions to reset / update the deployments
|
||||
|
||||
## Login
|
||||
|
||||
* Log in as `dev` user on the deployments VM
|
||||
|
||||
* All the deployments are placed in the `/srv` directory:
|
||||
|
||||
```bash
|
||||
cd /srv
|
||||
```
|
||||
|
||||
## stage0 laconicd
|
||||
|
||||
* Deployment dir: `/srv/laconicd/stage0-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 (this will remove all stage0 data!):
|
||||
|
||||
```bash
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir stage0-deployment stop --delete-volumes
|
||||
|
||||
# Remove and recreate the required data dir
|
||||
sudo rm -rf stage0-deployment/data/laconicd-data
|
||||
mkdir stage0-deployment/data/laconicd-data
|
||||
```
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir stage0-deployment start
|
||||
|
||||
# Follow logs for laconicd container, check that new blocks are getting created
|
||||
laconic-so deployment --dir stage0-deployment logs laconicd -f
|
||||
```
|
||||
|
||||
* If the stage0 laconicd chain has been reset, reset the faucet deployment too with new faucet key:
|
||||
|
||||
```bash
|
||||
cd /srv/faucet
|
||||
|
||||
export FAUCET_ACCOUNT_PK=$(laconic-so deployment --dir /srv/laconicd/stage0-deployment exec laconicd "echo y | laconicd keys export alice --keyring-backend test --unarmored-hex --unsafe")
|
||||
|
||||
cat <<EOF > laconic-faucet-deployment/config.env
|
||||
CERC_FAUCET_KEY=$FAUCET_ACCOUNT_PK
|
||||
EOF
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop --delete-volumes
|
||||
|
||||
# Remove and recreate the required data dir
|
||||
sudo rm -rf laconic-faucet-deployment/data/faucet-data
|
||||
mkdir laconic-faucet-deployment/data/faucet-data
|
||||
|
||||
# Start the deployment
|
||||
laconic-so deployment --dir laconic-faucet-deployment start
|
||||
```
|
||||
|
||||
## testnet-onboarding-app
|
||||
|
||||
* Deployment dir: `/srv/app/onboarding-app-deployment`
|
||||
|
||||
* If code has changed, fetch and build with updated source code:
|
||||
|
||||
```bash
|
||||
# testnet-onboarding-app source
|
||||
cd ~/cerc/testnet-onboarding-app
|
||||
|
||||
# Pull latest changes, or checkout to the required branch
|
||||
git pull
|
||||
|
||||
# Confirm the latest commit hash
|
||||
git log
|
||||
|
||||
# Rebuild the containers
|
||||
cd /srv/app
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers --force-rebuild
|
||||
```
|
||||
|
||||
* Update the configuration, if required:
|
||||
|
||||
```bash
|
||||
cat <<EOF > onboarding-app-deployment/config.env
|
||||
WALLET_CONNECT_ID=63...
|
||||
|
||||
CERC_REGISTRY_GQL_ENDPOINT="https://laconicd.laconic.com/api"
|
||||
CERC_LACONICD_RPC_ENDPOINT="https://laconicd.laconic.com"
|
||||
|
||||
CERC_FAUCET_ENDPOINT="https://faucet.laconic.com"
|
||||
|
||||
CERC_WALLET_META_URL="https://loro-signup.laconic.com"
|
||||
EOF
|
||||
````
|
||||
|
||||
* Restart the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir onboarding-app-deployment stop
|
||||
|
||||
laconic-so deployment --dir onboarding-app-deployment start
|
||||
|
||||
# Follow logs for testnet-onboarding-app container, wait for the build to finish
|
||||
laconic-so deployment --dir onboarding-app-deployment logs testnet-onboarding-app -f
|
||||
```
|
||||
|
||||
* The updated onboarding app can now be viewed at <https://loro-signup.laconic.com>
|
||||
|
||||
## laconic-wallet-web
|
||||
|
||||
* Deployment dir: `/srv/wallet/laconic-wallet-web-deployment`
|
||||
|
||||
* If code has changed, fetch and build with updated source code:
|
||||
|
||||
```bash
|
||||
# testnet-onboarding-app source
|
||||
cd ~/cerc/laconic-wallet-web
|
||||
|
||||
# Pull latest changes, or checkout to the required branch
|
||||
git pull
|
||||
|
||||
# Confirm the latest commit hash
|
||||
git log
|
||||
|
||||
# Rebuild the containers
|
||||
cd /srv/wallet
|
||||
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web build-containers --force-rebuild
|
||||
```
|
||||
|
||||
* Update the configuration, if required:
|
||||
|
||||
```bash
|
||||
cat <<EOF > laconic-wallet-web-deployment/config.env
|
||||
WALLET_CONNECT_ID=63...
|
||||
EOF
|
||||
```
|
||||
|
||||
* Restart the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment stop
|
||||
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment start
|
||||
|
||||
# Follow logs for laconic-wallet-web container, wait for the build to finish
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment logs laconic-wallet-web -f
|
||||
```
|
||||
|
||||
* The web wallet can now be viewed at <https://wallet.laconic.com>
|
||||
|
||||
## stage1 laconicd
|
||||
|
||||
* Deployment dir: `/srv/laconicd/stage1-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 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 <<EOF > 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`
|
||||
|
||||
* If code has changed, 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 <<EOF > 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 <https://loro-console.laconic.com>
|
@ -244,7 +244,7 @@ laconic-so deployment --dir laconic-console-deployment start
|
||||
--from <key-name>'
|
||||
```
|
||||
|
||||
* View staking validators:
|
||||
* View validators:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
||||
|
@ -5,10 +5,18 @@
|
||||
* Visit <https://wallet.laconic.com/> and click on `Create wallet`
|
||||
* Save the mnemonic for further usage
|
||||
|
||||
* Register your laconic address as a participant using the [Onboarding App](https://loro-signup.laconic.com/)
|
||||
* Register your laconic address as a participant using the [Onboarding App](https://loro-signup.laconic.com)
|
||||
|
||||
* Read and accept the `Terms and Conditions`
|
||||
|
||||
* On next page, enter your email to register to join the LORO testnet
|
||||
|
||||
* Visit the confirmation link sent on the registered email (email delivery might take a few minutes)
|
||||
|
||||
* It should take you to the `Testnet Onboarding` page
|
||||
|
||||
* Note: The confirmation link will only work the first time, visit <https://loro-signup.laconic.com/sign-with-nitro-key> for further attempts if required
|
||||
|
||||
* Connect testnet-onboarding app to the wallet:
|
||||
|
||||
* Click on `CONNECT WALLET` button on the testnet-onboarding app
|
||||
@ -153,7 +161,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
|
||||
# `catching_up: false` indicates that node is completely synced
|
||||
```
|
||||
|
||||
* After the node has caught up, view current list of staking validators:
|
||||
* After the node has caught up, view current list of validators:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
||||
@ -235,7 +243,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
|
||||
--from $KEY_NAME"
|
||||
```
|
||||
|
||||
* View staking validators:
|
||||
* View validators:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
||||
|
Loading…
Reference in New Issue
Block a user