Skip to content

Commit

Permalink
Merge pull request #97 from hyperledger/95-node-controller
Browse files Browse the repository at this point in the history
fixed env variable name. Fixes #95
  • Loading branch information
Echsecutor authored Aug 17, 2022
2 parents 8897515 + 548e9fc commit b10a103
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions run/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ IMAGE=ghcr.io/hyperledger/indy-node-container/indy_node:latest-ubuntu18
# You likely want to keep these default values:
SOCK=/var/run/docker.sock
NODE_CONTAINER_NAME=indy_node
CONTROLLER_CONTAINER=indy_node_controller
IMAGE_NAME_CONTROLLER=ghcr.io/hyperledger/indy-node-container/indy_node_controller:latest

INDY_NODE_IP=0.0.0.0
Expand Down
6 changes: 4 additions & 2 deletions run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ The log dir is mounted to `./log_indy` by default to ease access to the log file

## Node Controller

Our current approach to handle pool restarts is to have the node controller running in a separate service container which has access to the docker socket (`SOCK=/var/run/docker.sock` in the `.env` file which might have to be adapted depending on your local docker setting). You can run the node without the node controller with e.g. `docker-compose up --scale indy-controller=0`. Note however that such nodes will not participate in pool restarts.
Our current approach to handle pool restarts is to have the node controller running in a separate service container which has access to the docker socket. You can run the node without the node controller with e.g. `docker-compose up --scale indy-controller=0`. Note however that such nodes will not participate in pool restarts.

If the node controller container is running and has access to the docker socket of the host, the node will be restarted upon pool restart commands and will participate in a network upgrade. The decision mechanism for whether to accept or reject an upgrade based on avaiable deb package versions is part of indy node server and hence unchanged. However, if an upgrade is accepted, the container will be stopped, pulled, and restarted. Use a tag like `latest-ubuntu18` and make sure that a new `latest` image is avaiable bevor the network upgrade commences.
If wou want to use the node controller, the variables `SOCK`, `NODE_CONTAINER_NAME`, `CONTROLLER_CONTAINER`, and `IMAGE_NAME_CONTROLLER` need to be set in the `.env` file. Appropriate default values are set in [the default file](/.env).

If the node controller container is running and has access to the docker socket of the host, the node will be restarted upon pool restart commands and will participate in a network upgrade. The decision mechanism for whether to accept or reject an upgrade based on available deb package versions is part of indy node server and hence unchanged. However, if an upgrade is accepted, the container will be stopped, pulled, and restarted. Use a tag like `latest-ubuntu18` and make sure that a new `latest` image is available before the network upgrade commences.


5 changes: 3 additions & 2 deletions run/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ services:
indy-controller:
image: ${IMAGE_NAME_CONTROLLER}
init: true
container_name: indy_node_controller
container_name: ${CONTROLLER_CONTAINER}
environment:
- CONTAINER=${NODE_CONTAINER_NAME}
- NODE_CONTAINER=${NODE_CONTAINER_NAME}
- INDY_NETWORK_NAME=${INDY_NETWORK_NAME}
- CONTROLLER_CONTAINER=${CONTROLLER_CONTAINER}
volumes:
- ./etc_indy:/etc/indy
- ${SOCK}:/var/run/docker.sock
Expand Down

0 comments on commit b10a103

Please sign in to comment.