diff --git a/ops/deployments-from-scratch.md b/ops/deployments-from-scratch.md index 96a939a..de33eda 100644 --- a/ops/deployments-from-scratch.md +++ b/ops/deployments-from-scratch.md @@ -1533,6 +1533,115 @@ +
+ stage2 laconicd + +## stage2 laconicd + +* Stack: + +* Source repo: + +* Target dir: `/srv/laconicd/stage2-deployment` + +* Cleanup an existing deployment if required: + + ```bash + cd /srv/laconicd + + # Stop the deployment + laconic-so deployment --dir stage2-deployment stop --delete-volumes + + # Remove the deployment dir + sudo rm -rf stage2-deployment + + # Remove the existing spec file + rm stage2-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 stage1 container image (required for exporting stage1 data): + + ```bash + # Checkout to laconicd tag used for stage1 + cd ~/cerc/laconicd + git checkout v0.1.7 + cd - + + # Build + laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild + + # Create required tag + docker tag cerc/laconicd:local cerc/laconicd-stage1:local + ``` + +* Build the stage2 container image: + + ```bash + # Checkout to latest laconicd + cd ~/cerc/laconicd + git checkout main + cd - + + 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 stage2-spec.yml + ``` + +* Edit network in the spec file to map container ports to host ports: + + ```bash + # stage2-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 stage2-spec.yml --deployment-dir stage2-deployment + ``` + +### Start + +* Follow [stage1-to-stage2.md](./stage1-to-stage2.md) to halt stage1 deployment, initialize the stage2 chain and start stage2 deployment + +
+ ## Domains / Port Mappings ```bash