Prathamesh Musale
abc0c2423f
Some checks failed
Lint Checks / Run linter (push) Successful in 43s
Publish / Build and publish (push) Successful in 1m22s
Webapp Test / Run webapp test suite (push) Successful in 4m22s
Deploy Test / Run deploy test suite (push) Successful in 5m1s
Smoke Test / Run basic test suite (push) Successful in 4m20s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 13m6s
Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 52m19s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 7m10s
Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 3h12m59s
Database Test / Run database hosting test on kind/k8s (push) Successful in 8m43s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 3m39s
External Stack Test / Run external stack test suite (push) Successful in 4m37s
Part of [Metrics and logging for GQL queries in watcher](https://www.notion.so/Metrics-and-logging-for-GQL-queries-in-watcher-928c692292b140a2a4f52cda9795df5e) Reviewed-on: #834 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com> |
||
---|---|---|
.. | ||
README.md | ||
stack.yml |
Azimuth Watcher
Instructions to setup and deploy Azimuth Watcher stack
Setup
Prerequisite: External RPC endpoints
Clone required repositories:
laconic-so --stack azimuth setup-repositories --pull
NOTE: If the repository already exists and checked out to a different version, setup-repositories
command will throw an error.
For getting around this, the azimuth-watcher-ts
repository can be removed and then run the command again.
Build the container images:
laconic-so --stack azimuth build-containers
This should create the required docker images in the local image registry.
Create a deployment
First, create a spec file for the deployment, which will map the stack's ports and volumes to the host:
laconic-so --stack azimuth deploy init --output azimuth-spec.yml
Ports
Edit network
in spec file to map container ports to same ports in host
...
network:
ports:
watcher-db:
- 0.0.0.0:15432:5432
azimuth-watcher-job-runner:
- 0.0.0.0:9000:9000
azimuth-watcher-server:
- 0.0.0.0:3001:3001
- 0.0.0.0:9001:9001
censures-watcher-job-runner:
- 0.0.0.0:9002:9002
censures-watcher-server:
- 0.0.0.0:3002:3002
- 0.0.0.0:9003:9003
claims-watcher-job-runner:
- 0.0.0.0:9004:9004
claims-watcher-server:
- 0.0.0.0:3003:3003
- 0.0.0.0:9005:9005
conditional-star-release-watcher-job-runner:
- 0.0.0.0:9006:9006
conditional-star-release-watcher-server:
- 0.0.0.0:3004:3004
- 0.0.0.0:9007:9007
delegated-sending-watcher-job-runner:
- 0.0.0.0:9008:9008
delegated-sending-watcher-server:
- 0.0.0.0:3005:3005
- 0.0.0.0:9009:9009
ecliptic-watcher-job-runner:
- 0.0.0.0:9010:9010
ecliptic-watcher-server:
- 0.0.0.0:3006:3006
- 0.0.0.0:9011:9011
linear-star-release-watcher-job-runner:
- 0.0.0.0:9012:9012
linear-star-release-watcher-server:
- 0.0.0.0:3007:3007
- 0.0.0.0:9013:9013
polls-watcher-job-runner:
- 0.0.0.0:9014:9014
polls-watcher-server:
- 0.0.0.0:3008:3008
- 0.0.0.0:9015:9015
gateway-server:
- 0.0.0.0:4000:4000
...
Data volumes
Container data volumes are bind-mounted to specified paths in the host filesystem.
The default setup (generated by laconic-so deploy init
) places the volumes in the ./data
subdirectory of the deployment directory. The default mappings can be customized by editing the "spec" file generated by laconic-so deploy init
.
Once you've made any needed changes to the spec file, create a deployment from it:
laconic-so --stack azimuth deploy create --spec-file azimuth-spec.yml --deployment-dir azimuth-deployment
Set env variables
Inside the deployment directory, open the file config.env
and add variable to update RPC endpoint :
# External RPC endpoints
CERC_ETH_RPC_ENDPOINTS=https://example-rpc-endpoint-1,https://example-rpc-endpoint-2
- NOTE: If RPC endpoint is on the host machine, use
host.docker.internal
as the hostname to access the host port, or use theip a
command to find the IP address of thedocker0
interface (this will usually be something like172.17.0.1
or172.18.0.1
)
Start the stack
Start the deployment:
laconic-so deployment --dir azimuth-deployment start
- List and check the health status of all the containers using
docker ps
and wait for them to behealthy
Clean up
To stop all azimuth services running in the background, while preserving chain data:
laconic-so deployment --dir azimuth-deployment stop
To stop all azimuth services and also delete data:
laconic-so deployment --dir azimuth-deployment stop --delete-volumes
# Remove deployment directory (deployment will have to be recreated for a re-run)
rm -r azimuth-deployment