stack-orchestrator/stacks/mobymask/README.md

36 lines
1.7 KiB
Markdown
Raw Normal View History

2022-11-04 20:02:27 +00:00
# Mobymask
2022-11-08 07:23:40 +00:00
## Deploy the Mobymask Watcher
The instructions below show how to deploy a mobymask watcher using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator#install)).
2022-11-04 20:02:27 +00:00
2022-11-08 07:23:40 +00:00
This deployment expects that ipld-eth-server's endpoints are available on the local machine at http://ipld-eth-server.example.com:8083/graphql and http://ipld-eth-server.example.com:8082. More advanced configurations are supported by modifying the watcher's [config file](../../config/watcher-mobymask/mobymask-watcher.toml).
2022-11-08 03:23:52 +00:00
## Clone required repositories
```
$ laconic-so setup-repositories
```
2022-11-08 07:23:40 +00:00
Checkout required branches for the current release:
2022-11-08 03:23:52 +00:00
```
$ cd ~/cerc/assemblyscript
$ git checkout ng-integrate-asyncify
$ cd ~/cerc/watcher-ts
$ git checkout v0.2.13
```
## Build the watcher container
```
$ laconic-sh build-containers --include cerc/watcher-mobymask
```
2022-11-08 07:23:40 +00:00
This should create a container with tag `cerc/watcher-mobymask` in the local image registry.
2022-11-08 03:23:52 +00:00
## Deploy the stack
2022-11-08 07:23:40 +00:00
First the watcher database has to be initialized. Start only the watcher-db service:
2022-11-08 03:23:52 +00:00
```
2022-11-08 05:22:54 +00:00
$ laconic-so deploy-system --include watcher-mobymask up watcher-db
2022-11-08 07:23:40 +00:00
```
Next find the container's id using `docker ps` then run the following command to initialize the database:
```
2022-11-08 05:22:54 +00:00
$ docker exec -i <watcher-db-container> psql -U vdbm mobymask-watcher < config/watcher-mobymask/mobymask-watcher-db.sql
2022-11-08 07:23:40 +00:00
```
Finally start the remaining containers:
```
2022-11-08 03:23:52 +00:00
$ laconic-sh deploy-system --include watcher-mobymask
2022-11-08 07:23:40 +00:00
```
Correct operation should be verified by following the instructions [here](https://github.com/cerc-io/mobymask-watcher/tree/main/mainnet-watcher-only#run), checking GraphQL queries return valid results in the watcher's [playground](http://127.0.0.1:3001/graphql).