cacti icon indicating copy to clipboard operation
cacti copied to clipboard

Helper scripts and Docker for SATP

Open RafaelAPB opened this issue 1 year ago • 2 comments

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):

  1. Study which env variables are needed based on the input parameters to instantiate a satp gateway. add those to .env.example
  2. 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):

  1. Script to install local dependencies that SATP-Hermes uses (e.g., node, databases, etc). make setup-env
  2. Script to run a gateway make run-gateway
  3. Script to cleanup instances of dependencies (e.g., teardown databases) and the SATP instances, make clean This can be implemented in a single Makefile.

Requirements (docker)

  1. Create plugin-satp-hermes-gateway-cli.ts that is an entrypoint to the SATP class. Please see / complete packages/cactus-plugin-satp-hermes/src/main/typescript/plugin-satp-hermes-gateway-cli.ts
  2. 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).
  3. 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

RafaelAPB avatar Mar 15 '24 16:03 RafaelAPB

hi

LordKubaya avatar Mar 19 '24 16:03 LordKubaya

i will do this task.

brunoffmateus avatar Aug 09 '24 13:08 brunoffmateus