Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Reviewed-on: #1 Co-authored-by: shreerang <shreerang@noreply.git.vdb.to> Co-committed-by: shreerang <shreerang@noreply.git.vdb.to>
100 lines
1.9 KiB
Markdown
100 lines
1.9 KiB
Markdown
# 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
|
|
```
|
|
|
|
- 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
|
|
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
|
|
KEY_PREFIX=
|
|
```
|
|
|
|
## Run
|
|
|
|
- Start the deployment:
|
|
|
|
```bash
|
|
laconic-so --dir tmkms-deployment start
|
|
```
|
|
|
|
- Check the logs:
|
|
|
|
```bash
|
|
laconic-so --dir tmkms-deployment logs -f
|
|
```
|
|
|
|
## Clean up
|
|
|
|
- Stop the deployment:
|
|
|
|
```bash
|
|
laconic-so --dir tmkms-deployment stop
|
|
```
|
|
|
|
- To stop the deployment and also delete data:
|
|
|
|
```bash
|
|
laconic-so --dir tmkms-deployment stop --delete-volumes
|
|
|
|
sudo rm -rf tmkms-deployment
|
|
```
|
|
|
|
- Remove `cerc/tmkms` docker image:
|
|
|
|
```bash
|
|
docker rmi cerc/tmkms:local
|
|
```
|