cacti
cacti copied to clipboard
Helper scripts and Docker for SATP
Similarly to the scripts and utils in the old CBDC example, create utilities for easily run SATP-Hermes with default and custom configurations. Example from the CBDC app.
Requirements (all):
- Study which env variables are needed based on the input parameters to instantiate a satp gateway. add those to
.env.example - Modify constructor to be able to read those envs from the environment or use defaults (read from
.env) - there are examples of this in the code
Requirements (local):
- Script to install local dependencies that SATP-Hermes uses (e.g., node, databases, etc).
make setup-env - Script to run a gateway
make run-gateway - Script to cleanup instances of dependencies (e.g., teardown databases) and the SATP instances,
make cleanThis can be implemented in a single Makefile.
Requirements (docker)
- Create
plugin-satp-hermes-gateway-cli.tsthat is an entrypoint to the SATP class. Please see / complete packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts - create a Dockerfile that loads several needed env variables (SATP config, ledger configs, db configs) and swaps an instantiated gateway, and the local database (knex).
- Update documentation. Add scripts to create docker image and create a container with env vars2. add test. create test that 1) creates 2 satp containers, 2) make sure the different satp containers can communicate and execute a satp e2e flow (see test ledgers). Please complete packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-cli-startup.test.ts and packages/cactus-plugin-satp-hermes/src/test/typescript/acceptance/gateway-docker.test.ts
hi
i will do this task.