From 5b8c133c1c72126d7d25e8ff9ac1a2beb668c07f Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 19 Jun 2024 17:43:34 +0530 Subject: [PATCH] Add laconic-console stack instructions --- .../docker-compose-laconic-console.yml | 6 +++ .../cerc-laconic2-registry-cli/Dockerfile | 1 + .../cerc-laconic2-registry-cli/build.sh | 2 +- .../stacks/laconic-console/README.md | 53 +++++++++++++++++++ .../stacks/laconic-console/stack.yml | 2 +- 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-laconic-console.yml b/stack-orchestrator/compose/docker-compose-laconic-console.yml index 8cde253..b4f2ff0 100644 --- a/stack-orchestrator/compose/docker-compose-laconic-console.yml +++ b/stack-orchestrator/compose/docker-compose-laconic-console.yml @@ -8,3 +8,9 @@ services: CERC_LOGLEVEL: ${CERC_LOGLEVEL:-info} volumes: - ../config/laconic-console/create-config.sh:/app/create-config.sh + - laconic-registry-data:/laconic-registry-data + extra_hosts: + - "host.docker.internal:host-gateway" + +volumes: + laconic-registry-data: diff --git a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile index 63e1ea8..2449066 100644 --- a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile +++ b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/Dockerfile @@ -13,6 +13,7 @@ RUN echo "Installing dependencies and building laconic-registry-cli" && \ yarn && yarn build # Globally install the cli binary +RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ RUN yarn global add file:$PWD CMD ["bash", "-c", "tail -f /dev/null"] diff --git a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/build.sh b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/build.sh index 8ead4b6..0c775dc 100755 --- a/stack-orchestrator/container-build/cerc-laconic2-registry-cli/build.sh +++ b/stack-orchestrator/container-build/cerc-laconic2-registry-cli/build.sh @@ -6,4 +6,4 @@ source ${CERC_CONTAINER_BASE_DIR}/build-base.sh # See: https://stackoverflow.com/a/246128/1701505 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -docker build -t cerc/laconic2-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${SCRIPT_DIR} +docker build -t cerc/laconic2-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-registry-cli diff --git a/stack-orchestrator/stacks/laconic-console/README.md b/stack-orchestrator/stacks/laconic-console/README.md index 00e0cf7..0e42463 100644 --- a/stack-orchestrator/stacks/laconic-console/README.md +++ b/stack-orchestrator/stacks/laconic-console/README.md @@ -1 +1,54 @@ # laconic-console + +Instructions for running laconic registry CLI and console + +## Prerequisites + +* laconicd RPC and GQL endpoints + +## Setup + +* Clone the stack repo: + + ```bash + laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack + ``` + +* Clone required repositories: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console setup-repositories + ``` + +* Build the container images: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers + ``` + + This should create the following docker images locally: + + * `cerc/laconic2-registry-cli` + +## Create a deployment + +* Create a spec file for the deployment: + + ```bash + laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml + ``` + +* 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 + ``` + +## Configuration + +* Inside the deployment directory, open `config.env` file and set following env variables: + + ```bash + # TODO + ``` + diff --git a/stack-orchestrator/stacks/laconic-console/stack.yml b/stack-orchestrator/stacks/laconic-console/stack.yml index 57adcc3..7a2d6db 100644 --- a/stack-orchestrator/stacks/laconic-console/stack.yml +++ b/stack-orchestrator/stacks/laconic-console/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: laconic-console description: "Laconic registry CLI and console" repos: - - git.vdb.to/cerc-io/laconic-regsitry-cli@laconic2 + - git.vdb.to/cerc-io/laconic-registry-cli@laconic2 containers: - cerc/laconic2-registry-cli pods: