Add readme to setup and start the tmkms stack
This commit is contained in:
parent
6c152959aa
commit
11f7fbb6e3
@ -1 +1,3 @@
|
|||||||
# tmkms-stack
|
# tmkms-stack
|
||||||
|
|
||||||
|
- [Run TMKMS service](stacks/tmkms/README.md)
|
||||||
|
@ -4,10 +4,10 @@ services:
|
|||||||
image: cerc/tmkms:local
|
image: cerc/tmkms:local
|
||||||
command: ["bash", "-c", "/opt/run.sh"]
|
command: ["bash", "-c", "/opt/run.sh"]
|
||||||
environment:
|
environment:
|
||||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic-mainnet}
|
CERC_CHAIN_ID: ${CERC_CHAIN_ID}
|
||||||
NODE_IP: ${NODE_IP}
|
NODE_IP: ${NODE_IP}
|
||||||
NODE_PORT: ${NODE_PORT:-26659}
|
NODE_PORT: ${NODE_PORT:-26659}
|
||||||
CERC_KEY_PREFIX: ${CERC_KEY_PREFIX:-laconic}
|
CERC_KEY_PREFIX: ${CERC_KEY_PREFIX}
|
||||||
volumes:
|
volumes:
|
||||||
- tmkms-data:/home/tmkmsuser/tmkms
|
- tmkms-data:/home/tmkmsuser/tmkms
|
||||||
- ../config/tmkms/run.sh:/opt/run.sh
|
- ../config/tmkms/run.sh:/opt/run.sh
|
||||||
|
85
stack-orchestrator/stacks/tmkms/README.md
Normal file
85
stack-orchestrator/stacks/tmkms/README.md
Normal 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
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user