Add readme to setup and start the tmkms stack

This commit is contained in:
Shreerang Kale 2025-06-11 14:42:01 +05:30
parent 6c152959aa
commit 11f7fbb6e3
3 changed files with 89 additions and 2 deletions

View File

@ -1 +1,3 @@
# tmkms-stack
- [Run TMKMS service](stacks/tmkms/README.md)

View File

@ -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

View File

@ -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 <path/to/priv_validator_key.json> 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
```