stack-orchestrator/app/data/stacks/gelato
David Boreham ec6b5439f4
Support for git hosts other than github (#407)
* Update repository list file

* Add host part to repo name

* Allow git hosts other than github
2023-05-24 17:19:21 -06:00
..
README.md Add a stack for Gelato watcher (#394) 2023-05-16 09:09:08 +05:30
stack.yml Support for git hosts other than github (#407) 2023-05-24 17:19:21 -06:00

Gelato watcher

Instructions to setup and deploy Gelato watcher using laconic-stack-orchestrator

Setup

Prerequisite: ipld-eth-server RPC and GQL endpoints

Clone required repositories:

laconic-so --stack gelato setup-repositories

# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command

Checkout to required version in the repo:

# gelato-watcher-ts
cd ~/cerc/gelato-watcher-ts
git checkout v0.1.0

Build the container images:

laconic-so --stack gelato build-containers

This should create the required docker images in the local image registry.

Deploy

Configuration

Create and update an env file to be used in the next step (defaults):

# External ipld-eth-server endpoints
CERC_IPLD_ETH_RPC=
CERC_IPLD_ETH_GQL=

# Whether to use a state snapshot to initialize the watcher
CERC_USE_STATE_SNAPSHOT=false

# State snapshot params
# Required if CERC_USE_STATE_SNAPSHOT is set to true
CERC_SNAPSHOT_GQL_ENDPOINT=
CERC_SNAPSHOT_BLOCKHASH=
  • NOTE: If ipld-eth-server is running on the host machine, use host.docker.internal as the hostname to access the host port(s)

Deploy the stack

laconic-so --stack gelato deploy --env-file <PATH_TO_ENV_FILE> up

To list down and monitor the running containers:

laconic-so --stack gelato deploy ps

# With status
docker ps

# Check logs for a container
docker logs -f <CONTAINER_ID>

The stack runs an active watcher with following endpoints exposed on the host ports:

  • 3008: watcher endpoint
  • 9000: watcher metrics
  • 9001: watcher GQL metrics

Web Apps

TODO

Clean up

Stop all services running in the background:

laconic-so --stack gelato deploy down

Clear volumes created by this stack:

# List all relevant volumes
docker volume ls -q --filter "name=.*gelato_watcher_db_data|.*gelato_watcher_state_gql"

# Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=.*gelato_watcher_db_data|.*gelato_watcher_state_gql")