Clean up files and update instructions
This commit is contained in:
parent
a37e5ab1f2
commit
961b8cbea7
@ -1,8 +1,8 @@
|
||||
services:
|
||||
laconicd:
|
||||
restart: no
|
||||
restart: unless-stopped
|
||||
image: cerc/laconic2d:local
|
||||
command: ["/bin/sh", "-c", "/opt/run-laconicd.sh"]
|
||||
command: ["bash", "-c", "/opt/run-laconicd.sh"]
|
||||
environment:
|
||||
CERC_MONIKER: ${CERC_MONIKER:-TestnetNode}
|
||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1}
|
||||
@ -10,13 +10,9 @@ services:
|
||||
CERC_PEERS: ${CERC_PEERS}
|
||||
CERC_LOGLEVEL: ${CERC_LOGLEVEL:-info}
|
||||
volumes:
|
||||
- laconicd-data:/root/.laconicd/data
|
||||
- laconicd-data:/root/.laconicd
|
||||
- laconicd-config:/root/.laconicd/config
|
||||
- laconicd-keyring:/root/.laconicd/keyring-test
|
||||
- ../config/laconicd/scripts/run-laconicd.sh:/opt/run-laconicd.sh
|
||||
- ../config/laconicd/scripts/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
||||
- ../config/laconicd/scripts/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
|
||||
# TODO: determine which of the ports below is really needed
|
||||
ports:
|
||||
- "6060"
|
||||
- "26657"
|
||||
@ -40,5 +36,3 @@ services:
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
laconicd-config:
|
||||
laconicd-keyring:
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
laconicd keys show mykey | grep address | cut -d ' ' -f 3
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo y | laconicd keys export mykey --unarmored-hex --unsafe
|
@ -1,84 +1,108 @@
|
||||
# laconicd-full-node
|
||||
|
||||
Instructions for deploying a laconicd full node along with steps to join testnet as a validator post genesis
|
||||
Instructions for running a laconicd testnet full node and joining as a validator
|
||||
|
||||
Minimum hardware requirements:
|
||||
## Prerequisites
|
||||
|
||||
- RAM: 8-16GB
|
||||
- Disk space: 200GB
|
||||
- CPU: 2 cores
|
||||
* Minimum hardware requirements:
|
||||
|
||||
## Clone the stack repo
|
||||
```bash
|
||||
RAM: 8-16GB
|
||||
Disk space: 200GB
|
||||
CPU: 2 cores
|
||||
```
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
* Testnet genesis file (file or an URL) and peer node addresses
|
||||
|
||||
## Clone required repositories
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node setup-repositories
|
||||
```
|
||||
* Clone the stack repo:
|
||||
|
||||
## Build the fixturenet-eth containers
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node build-containers
|
||||
```
|
||||
* Clone required repositories:
|
||||
|
||||
This should create several container images in the local image registry:
|
||||
```bash
|
||||
laconic-so --stack /home/prathamesh/deepstack/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node setup-repositories
|
||||
```
|
||||
|
||||
* cerc/laconic2d
|
||||
* cerc/laconic-registry-cli
|
||||
* cerc/webapp-base
|
||||
* cerc/laconic-console-host
|
||||
* Build the container images:
|
||||
|
||||
## Create a spec file for the deployment
|
||||
```bash
|
||||
laconic-so --stack /home/prathamesh/deepstack/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node build-containers
|
||||
```
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy init --output laconic-full-node-spec.yml
|
||||
```
|
||||
This should create the following docker images locally:
|
||||
|
||||
## Ports
|
||||
* `cerc/laconic2d`
|
||||
* `cerc/laconic-registry-cli`
|
||||
* `cerc/webapp-base`
|
||||
* `cerc/laconic-console-host`
|
||||
|
||||
Edit `network` in the spec file to map container ports to host ports as required:
|
||||
## Create a deployment
|
||||
|
||||
```bash
|
||||
...
|
||||
network:
|
||||
# TODO: UPDATE
|
||||
ports:
|
||||
laconicd:
|
||||
- '6060:6060'
|
||||
- '26657:26657'
|
||||
- '26656:26656'
|
||||
- '9473:9473'
|
||||
- '9090:9090'
|
||||
- '1317:1317'
|
||||
```
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
## Create a deployment from the spec file
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy init --output laconic-full-node-spec.yml
|
||||
```
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy create --spec-file laconic-full-node-spec.yml --deployment-dir laconic-full-node-deployment
|
||||
```
|
||||
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
### Configuration
|
||||
```bash
|
||||
...
|
||||
network:
|
||||
# TODO: UPDATE
|
||||
ports:
|
||||
laconicd:
|
||||
- '6060:6060'
|
||||
- '26657:26657'
|
||||
- '26656:26656'
|
||||
- '9473:9473'
|
||||
- '9090:9090'
|
||||
- '1317:1317'
|
||||
```
|
||||
|
||||
Copy genesis file to the deployment data directory:
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
# Example
|
||||
cp genesis.json laconic-full-node-deployment/data/laconicd-config/
|
||||
```
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy create --spec-file laconic-full-node-spec.yml --deployment-dir laconic-full-node-deployment
|
||||
```
|
||||
|
||||
Inside deployment directory, open the `config.env` file and set following env variables:
|
||||
* (Optional) Copy over the genesis file (`.json`) to config data directory in deployment (`laconic-full-node-deployment/data/laconicd-data/config`):
|
||||
|
||||
```bash
|
||||
# TODO: UPDATE
|
||||
# External Filecoin (ETH RPC) endpoint to point the watcher to
|
||||
CERC_PEERS=""
|
||||
```
|
||||
```bash
|
||||
# Example
|
||||
mkdir -p laconic-full-node-deployment/data/laconicd-data/config
|
||||
cp genesis.json laconic-full-node-deployment/data/laconicd-config/genesis.json
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
* Inside the deployment directory, open `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
# Comma separated list of nodes to keep persistent connections to
|
||||
# Example: "node-1-id@node-1-host:26656,node-2-id@node-2-host:26656"
|
||||
CERC_PEERS=""
|
||||
|
||||
# Optional
|
||||
|
||||
# A custom human readable name for this node (default: TestnetNode)
|
||||
CERC_MONIKER=
|
||||
|
||||
# Network chain ID (default: laconic_9000-1)
|
||||
CERC_CHAIN_ID=
|
||||
|
||||
# Genesis file URL
|
||||
# Not required if a genesis file is placed in the config data directory in previous steps
|
||||
CERC_GENESIS_FILE_URL=
|
||||
|
||||
# Output log level (default: info)
|
||||
CERC_LOGLEVEL=
|
||||
```
|
||||
|
||||
## Start the deployment
|
||||
|
||||
@ -88,7 +112,21 @@ laconic-so deployment --dir laconic-full-node-deployment start
|
||||
|
||||
## Check status
|
||||
|
||||
<!-- TODO -->
|
||||
* To list down and monitor the running containers:
|
||||
|
||||
```bash
|
||||
# With status
|
||||
docker ps -a
|
||||
|
||||
# Check logs for a container
|
||||
docker logs -f <CONTAINER_ID>
|
||||
```
|
||||
|
||||
* Check the sync status of your node:
|
||||
|
||||
```bash
|
||||
docker exec -it <LACONICD_CONTAINER_ID> status | jq .sync_info
|
||||
```
|
||||
|
||||
## Join as testnet validator
|
||||
|
||||
@ -98,12 +136,19 @@ laconic-so deployment --dir laconic-full-node-deployment start
|
||||
|
||||
## Clean up
|
||||
|
||||
Stop all services running in the background:
|
||||
* Stop all services running in the background:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-full-node-deployment stop
|
||||
```
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir laconic-full-node-deployment stop
|
||||
```
|
||||
|
||||
Clear volumes created by this stack:
|
||||
* To stop all services and also delete data:
|
||||
|
||||
<!-- TODO -->
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir laconic-full-node-deployment stop --delete-volumes
|
||||
|
||||
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
||||
rm -r laconic-full-node-deployment
|
||||
```
|
||||
|
@ -1,10 +1,10 @@
|
||||
version: "1.1"
|
||||
version: "1.0"
|
||||
name: laconicd-full-node
|
||||
description: "Laconicd full node"
|
||||
repos:
|
||||
- cerc-io/laconic2d
|
||||
- cerc-io/laconic-registry-cli@laconic2
|
||||
- cerc-io/laconic-console@laconic2
|
||||
- git.vdb.to/cerc-io/laconic2d@pm-stack-changes
|
||||
- git.vdb.to/cerc-io/laconic-registry-cli@laconic2
|
||||
- git.vdb.to/cerc-io/laconic-console@laconic2
|
||||
containers:
|
||||
- cerc/laconic2d
|
||||
- cerc/laconic-registry-cli
|
||||
@ -13,7 +13,3 @@ containers:
|
||||
pods:
|
||||
- laconicd-full-node
|
||||
- laconic-console
|
||||
config:
|
||||
cli:
|
||||
key: laconicd.mykey
|
||||
address: laconicd.myaddress
|
||||
|
Loading…
Reference in New Issue
Block a user