diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 2f2ef20..18e9a7b 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -99,6 +99,9 @@ cat < stage0-deployment/config.env # Set to true to enable adding participants functionality of the onboarding module ONBOARDING_ENABLED=true + + # A custom human readable name for this node + MONIKER=LaconicStage0 EOF ``` @@ -135,6 +138,131 @@ +
+ 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 + + # Place in the same namespace as stage0 + cp /srv/laconicd/stage0-deployment/deployment.yml laconic-faucet-deployment/deployment.yml + ``` + +* 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"} + ``` + +
+
testnet-onboarding-app @@ -417,6 +545,8 @@ AUTHORITY_AUCTION_COMMITS_DURATION=3600 AUTHORITY_AUCTION_REVEALS_DURATION=3600 AUTHORITY_GRACE_PERIOD=7200 + + MONIKER=LaconicStage1 EOF ``` @@ -426,128 +556,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 diff --git a/ops/update-deployments.md b/ops/update-deployments.md index 13a7f83..3bfd3b1 100644 --- a/ops/update-deployments.md +++ b/ops/update-deployments.md @@ -98,10 +98,9 @@ Instructions to reset / update the deployments laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers --force-rebuild ``` -* Update the configuration, if required: +* Update the configuration, if required in `onboarding-app-deployment/config.env`: ```bash - cat < onboarding-app-deployment/config.env WALLET_CONNECT_ID=63... CERC_REGISTRY_GQL_ENDPOINT="https://laconicd.laconic.com/api" @@ -110,7 +109,8 @@ Instructions to reset / update the deployments CERC_FAUCET_ENDPOINT="https://faucet.laconic.com" CERC_WALLET_META_URL="https://loro-signup.laconic.com" - EOF + + CERC_STAKING_AMOUNT=1000000000000000 ```` * Restart the deployment: @@ -148,12 +148,10 @@ Instructions to reset / update the deployments laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web build-containers --force-rebuild ``` -* Update the configuration, if required: +* Update the configuration, if required in `laconic-wallet-web-deployment/config.env`: ```bash - cat < laconic-wallet-web-deployment/config.env WALLET_CONNECT_ID=63... - EOF ``` * Restart the deployment: @@ -204,15 +202,13 @@ Instructions to reset / update the deployments mkdir stage1-deployment/data/genesis-config ``` -* Update the configuration, if required: +* Update the configuration, if required in `stage1-deployment/config.env`: ```bash - cat < 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 @@ -239,13 +235,11 @@ Instructions to reset / update the deployments laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers --force-rebuild ``` -* Update the configuration, if required: +* Update the configuration, if required in `laconic-console-deployment/config.env`: ```bash - cat < laconic-console-deployment/config.env # Laconicd (hosted) GQL endpoint LACONIC_HOSTED_ENDPOINT=https://laconicd.laconic.com - EOF ``` * Restart the deployment: diff --git a/testnet-onboarding-validator.md b/testnet-onboarding-validator.md index 21fb7da..6f94e9c 100644 --- a/testnet-onboarding-validator.md +++ b/testnet-onboarding-validator.md @@ -13,7 +13,7 @@ * 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 + * It should take you to the `Testnet Onboarding` app * Note: The confirmation link will only work the first time, visit for further attempts if required @@ -171,10 +171,14 @@ laconic-so deployment --dir testnet-laconicd-deployment start ### Join as testnet validator +* Open the wallet: + * Create a validator from the onboarding app: * Visit the [validator creation](https://loro-signup.laconic.com/validator) page + * If required, connect testnet-onboarding app to the wallet with which onboarding was done on stage0 + * Select the Laconic account (same as the one used while onboarding) using which you wish to send the create validator request * This should display the details of your onboarded participant @@ -273,7 +277,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start laconic-so deployment --dir testnet-laconicd-deployment stop --delete-volumes # Remove deployment directory (deployment will have to be recreated for a re-run) - rm -r testnet-laconicd-deployment + sudo rm -r testnet-laconicd-deployment ``` ## Troubleshooting