From 670294593a02632537370b3adb505127e42c09e8 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 9 Aug 2024 12:35:37 +0530 Subject: [PATCH] Add steps to setup stage1 deployment --- ops/deployments-from-scratch.md | 71 +++++++++++++++++++++++++++++++++ ops/stage0-to-stage1.md | 1 + 2 files changed, 72 insertions(+) create mode 100644 ops/stage0-to-stage1.md diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index a2511f2..22aed31 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -585,4 +585,75 @@ ## stage1 laconicd +* Stack: + +* Source repo: + +* 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 < 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 + diff --git a/ops/stage0-to-stage1.md b/ops/stage0-to-stage1.md new file mode 100644 index 0000000..6a4a6b6 --- /dev/null +++ b/ops/stage0-to-stage1.md @@ -0,0 +1 @@ +# stage0-to-stage1