Update mobymask v1 stack with deployment commands
This commit is contained in:
parent
1ec209b7a9
commit
27ebf0e717
@ -4,42 +4,53 @@ The MobyMask watcher is a Laconic Network component that provides efficient acce
|
||||
|
||||
## 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#user-mode)).
|
||||
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)).
|
||||
|
||||
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).
|
||||
|
||||
## Clone required repositories
|
||||
|
||||
```
|
||||
```bash
|
||||
$ laconic-so --stack mobymask setup-repositories
|
||||
```
|
||||
|
||||
## Build the watcher container
|
||||
|
||||
```
|
||||
```bash
|
||||
$ laconic-so --stack mobymask build-containers
|
||||
```
|
||||
|
||||
This should create a container with tag `cerc/watcher-mobymask` in the local image registry.
|
||||
|
||||
## Deploy the stack
|
||||
## Create a deployment
|
||||
|
||||
```bash
|
||||
$ laconic-so --stack mobymask deploy init --output mobymask-spec.yml
|
||||
$ laconic-so deploy create --spec-file mobymask-spec.yml --deployment-dir mobymask-deployment
|
||||
```
|
||||
|
||||
External `ipld-eth-server` endpoint can be set in watcher config file in the deployment directory:
|
||||
```
|
||||
mobymask-deployment/config/watcher-mobymask/mobymask-watcher.toml
|
||||
```
|
||||
|
||||
## Start the stack
|
||||
|
||||
First the watcher database has to be initialized. Start only the mobymask-watcher-db service:
|
||||
|
||||
```
|
||||
$ laconic-so --stack mobymask deploy-system up mobymask-watcher-db
|
||||
```bash
|
||||
$ laconic-so deployment --dir mobymask-deployment start mobymask-watcher-db
|
||||
```
|
||||
|
||||
Next find the container's id using `docker ps` then run the following command to initialize the database:
|
||||
|
||||
```
|
||||
$ docker exec -i <mobymask-watcher-db-container> psql -U vdbm mobymask-watcher < config/watcher-mobymask/mobymask-watcher-db.sql
|
||||
```bash
|
||||
$ docker exec -i <mobymask-watcher-db-container> psql -U vdbm mobymask-watcher < mobymask-deployment/config/watcher-mobymask/mobymask-watcher-db.sql
|
||||
```
|
||||
|
||||
Finally start the remaining containers:
|
||||
|
||||
```
|
||||
$ laconic-so --stack mobymask deploy-system up
|
||||
```bash
|
||||
$ laconic-so deployment --dir mobymask-deployment start
|
||||
```
|
||||
|
||||
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).
|
||||
@ -49,5 +60,26 @@ Correct operation should be verified by following the instructions [here](https:
|
||||
Stop all the services running in background:
|
||||
|
||||
```bash
|
||||
$ laconic-so --stack mobymask deploy-system down
|
||||
$ laconic-so deployment --dir mobymask-deployment stop
|
||||
```
|
||||
|
||||
## 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:
|
||||
```
|
||||
$ cat mobymask-spec.yml
|
||||
stack: mobymask
|
||||
ports:
|
||||
mobymask-watcher-db:
|
||||
- 0.0.0.0:15432:5432
|
||||
mobymask-watcher-job-runner:
|
||||
- 0.0.0.0:9000:9000
|
||||
mobymask-watcher-server:
|
||||
- 0.0.0.0:3001:3001
|
||||
- 0.0.0.0:9001:9001
|
||||
volumes:
|
||||
mobymask_watcher_db_data: ./data/mobymask_watcher_db_data
|
||||
```
|
||||
|
||||
The directory can be changed before `laconic-so deploy create`
|
||||
|
Loading…
Reference in New Issue
Block a user