From 11f7fbb6e307aaa1a30ac1156bc35bcfe418ef70 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Wed, 11 Jun 2025 14:42:01 +0530 Subject: [PATCH] Add readme to setup and start the tmkms stack --- README.md | 2 + .../compose/docker-compose-tmkms.yml | 4 +- stack-orchestrator/stacks/tmkms/README.md | 85 +++++++++++++++++++ 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 stack-orchestrator/stacks/tmkms/README.md diff --git a/README.md b/README.md index 04c1d13..e50de74 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # tmkms-stack + +- [Run TMKMS service](stacks/tmkms/README.md) diff --git a/stack-orchestrator/compose/docker-compose-tmkms.yml b/stack-orchestrator/compose/docker-compose-tmkms.yml index f6807cf..07edf86 100644 --- a/stack-orchestrator/compose/docker-compose-tmkms.yml +++ b/stack-orchestrator/compose/docker-compose-tmkms.yml @@ -4,10 +4,10 @@ services: image: cerc/tmkms:local command: ["bash", "-c", "/opt/run.sh"] environment: - CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic-mainnet} + CERC_CHAIN_ID: ${CERC_CHAIN_ID} NODE_IP: ${NODE_IP} NODE_PORT: ${NODE_PORT:-26659} - CERC_KEY_PREFIX: ${CERC_KEY_PREFIX:-laconic} + CERC_KEY_PREFIX: ${CERC_KEY_PREFIX} volumes: - tmkms-data:/home/tmkmsuser/tmkms - ../config/tmkms/run.sh:/opt/run.sh diff --git a/stack-orchestrator/stacks/tmkms/README.md b/stack-orchestrator/stacks/tmkms/README.md new file mode 100644 index 0000000..8de0032 --- /dev/null +++ b/stack-orchestrator/stacks/tmkms/README.md @@ -0,0 +1,85 @@ +# tmkms + +Instructions for running TMKMS service + +## Prerequisites + +- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install) + +- A cosmos-sdk based node setup + +## Setup + +- Clone the stack repo: + + ```bash + laconic-so fetch-stack git.vdb.to/LaconicNetwork/tmkms-stack --git-ssh --pull + ``` + +- Clone required repositories: + + ```bash + laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms setup-repositories --git-ssh --pull + + # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repository and re-run the command + ``` + +- Build the container images: + + ```bash + laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms build-containers --force-rebuild + ``` + + This should create the `cerc/tmkms` docker image locally + +## Create a deployment + +- Create a spec file for the deployment: + + ```bash + laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms deploy init --output tmkms-spec.yml + ``` + +- Create deployment from the spec file: + + ```bash + laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms deploy create --spec-file tmkms-spec.yml --deployment-dir tmkms-deployment + ``` + +## Configuration + +- Copy the private validator key to the tmp directory: + + ```bash + cp tmkms-deployment/data/tmkms-data/tmp + ``` + +- Inside the `tmkms-deployment` deployment directory, open `config.env` file and set following env variables: + + ```bash + # Chain ID + CERC_CHAIN_ID= + + # Public IP address of the node + NODE_IP= + + # Port on which the node is listening for consensus messages (default: 26659) + NODE_PORT= + + # Key prefix (for ex. laconic) + CERC_KEY_PREFIX= + ``` + +## Run + +- Start the deployment: + + ```bash + laconic-so --dir tmkms-deployment start + ``` + +- Check the logs: + + ```bash + laconic-so --dir tmkms-deployment logs -f + ```