Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.42 KB

docker_swarm.md

File metadata and controls

49 lines (31 loc) · 1.42 KB

Deploying a network on a docker swarm

Using this method, it is possible set up a network of N nodes within a few minutes.

Merges to master are automatically deployed to hub.docker.com under tag hyperledger/iroha-docker.

  1. Install docker (at least version 1.12)

  2. You should setup docker swarm:

    • master node:

      docker swarm init --advertise-addr=(insert master node IP here)

    • worker nodes:

    docker swarm join --token=(insert token here, printed out from the previous step) Then, on master node:

  3. Create overlay network:

    docker network create -d overlay iroha-network

  4. Create configdiscovery service:

docker service create \
 --network iroha-network \
 --name configdiscovery \
 warchantua/configdiscovery N # replace N with number of nodes

This service does automatic sumeragi.json config distribution across your network. WARNING: if you don't use docker swarm, configdiscovery will not work and you have to manage configs by yourself.

  1. Create iroha global1 service:
docker service create \
 --name iroha \
 --mode global \
 --network iroha-network \
 --publish 1204:1204 \
 hyperledger/iroha-docker /configure-then-run.sh

Footnotes

  1. --mode global means that each physical node in swarm (master+workers) will run one container.