diff --git a/stack-orchestrator/config/laconicd/run-laconicd.sh b/stack-orchestrator/config/laconicd/run-laconicd.sh index 99e7998..3ae415f 100755 --- a/stack-orchestrator/config/laconicd/run-laconicd.sh +++ b/stack-orchestrator/config/laconicd/run-laconicd.sh @@ -44,4 +44,9 @@ fi sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOME/config/config.toml echo "Starting laconicd node..." -laconicd start --gql-playground --gql-server --log_level $CERC_LOGLEVEL --home $NODE_HOME +laconicd start \ + --api.enable \ + --rpc.laddr="tcp://0.0.0.0:26657" \ + --gql-playground --gql-server \ + --log_level $CERC_LOGLEVEL \ + --home $NODE_HOME diff --git a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile index e3ad75d..91acc38 100644 --- a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile +++ b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile @@ -3,7 +3,7 @@ ARG VARIANT=18-bullseye FROM node:${VARIANT} RUN apt-get update \ - && apt-get -y install --no-install-recommends python3 jq bash curl + && apt-get -y install --no-install-recommends python3 jq bash curl nano WORKDIR /app diff --git a/stack-orchestrator/stacks/laconic-console/README.md b/stack-orchestrator/stacks/laconic-console/README.md index 52ec118..3513bf2 100644 --- a/stack-orchestrator/stacks/laconic-console/README.md +++ b/stack-orchestrator/stacks/laconic-console/README.md @@ -53,7 +53,7 @@ Instructions for running laconic registry CLI and console * Create a deployment from the spec file: ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment ``` ## Configuration @@ -106,7 +106,7 @@ Instructions for running laconic registry CLI and console ```bash # Example - laconic-so deployment --dir laconic-console-deployment deploy exec cli "laconic registry status" + laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status" ``` ## Check status diff --git a/stack-orchestrator/stacks/testnet-laconicd/README.md b/stack-orchestrator/stacks/testnet-laconicd/README.md index 0585aa7..66ef4b6 100644 --- a/stack-orchestrator/stacks/testnet-laconicd/README.md +++ b/stack-orchestrator/stacks/testnet-laconicd/README.md @@ -78,16 +78,16 @@ Instructions for running a laconicd testnet full node and joining as a validator ... network: ports: - laconic-console: + console: - '8080:80' ``` * Create deployments from the spec files: ```bash - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy create --spec-file testnet-laconicd-spec.yml --deployment-dir testnet-laconicd-deployment + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy create --spec-file testnet-laconicd-spec.yml --deployment-dir testnet-laconicd-deployment - laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment # Place them both in the same namespace (cluster) cp testnet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml @@ -142,6 +142,8 @@ Instructions for running a laconicd testnet full node and joining as a validator LACONIC_HOSTED_ENDPOINT= ``` + Note: Use `host.docker.internal` as host to access ports on the host machine + ## Start the deployments ```bash @@ -175,7 +177,7 @@ laconic-so deployment --dir laconic-console-deployment start ```bash # Example - laconic-so deployment --dir laconic-console-deployment deploy exec cli "laconic registry status" + laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status" ``` ## Join as testnet validator @@ -235,6 +237,27 @@ laconic-so deployment --dir laconic-console-deployment start laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validator " ``` +## Perform operations + +* To perform txs against the chain using registry CLI, set your private key in config in the CLI container: + + ```bash + # (Optional) Get the PK from your node + laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd keys export --unarmored-hex --unsafe" + + # Set your PK as 'userKey' in the config file + laconic-so deployment --dir laconic-console-deployment exec cli "nano config.yml" + + # Note: any changes made to the config will be lost when the cli Docker container is brought down + ``` + +* Adjust / set other config values (`bondId`, `gas`, `fees`) as required and perform txs: + + ```bash + # Example + laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type photon --quantity 100000000000" + ``` + ## Clean up * Stop all `testnet-laconicd` services running in the background: