From 6acb22e08816beca4087653e77a76934aec8b2af Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 9 Aug 2024 12:41:16 +0530 Subject: [PATCH] Reorder deployments sections --- ops/deployments-from-scratch.md | 466 ++++++++++++++++---------------- 1 file changed, 233 insertions(+), 233 deletions(-) diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 22aed31..65b92dc 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -135,238 +135,6 @@ -
- faucet - -## faucet - -* Stack: - -* Source repo: - -* 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 < 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: - - * is pointed to the faucet endpoint - - * Check faucet: - - ```bash - curl -X POST https://faucet.laconic.com/faucet - - # Expected output: - # {"error":"address is required"} - ``` - -
- -
- laconic-console - -## laconic-console - -* Stack: - -* Source repos: - * - * - -* 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 < 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 - -
-
testnet-onboarding-app @@ -654,6 +422,238 @@ ### 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 +* Follow [stage0-to-stage1.md](./stage0-to-stage1.md) to halt stage0 deployment, generate the genesis file for stage1 and start the stage1 deployment + +
+ +
+ faucet + +## faucet + +* Stack: + +* Source repo: + +* 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 < 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: + + * is pointed to the faucet endpoint + + * Check faucet: + + ```bash + curl -X POST https://faucet.laconic.com/faucet + + # Expected output: + # {"error":"address is required"} + ``` + +
+ +
+ laconic-console + +## laconic-console + +* Stack: + +* Source repos: + * + * + +* 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 < 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