Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/suddutt1/fabricswarm1

First Docker Swarm With 3 machines and balance transfer
https://github.com/suddutt1/fabricswarm1

Last synced: about 1 month ago
JSON representation

First Docker Swarm With 3 machines and balance transfer

Awesome Lists containing this project

README

        

# Hyperledger Fabric Swarm with 3 nodes
First Docker Swarm With 3 machines and balance transfer
# Hit a road block
## Not able to instantiate the chain code
Here is the clue : ( Endorsed by IBM Blockchain CTO)
https://lists.hyperledger.org/pipermail/hyperledger-fabric/2017-September/001750.html
I'll keep working on this based on the hint.

### The Swram consist of the following 3 nodes/hosts
1. Master node ( hostname : swarmmaster ) contains the orderer and cli
2. Node 1 ( hostname : node1) contains single peer of Bank X
3. Node 2 ( hostname : node2) contains single peer of Bank Y

All the arttifacts of this repository should be pulled and same copy should be placed in all the nodes

Assuming that this reposittory is downloaded into the following directory of swarmmaster host
/home/suddutt1/networks/swarm2/, execute the following commands in sequence

```sh

cd /home/suddutt1/networks/swarm2/
. setenv

docker swarm init --advertise-addr :2377

```

Run the following command in node1 and node2 host

```sh
docker swarm join --token :2377
```

Run the following command in the swrammaster host

```sh
cd /home/suddutt1/networks/swarm2/
. setenv

docker stack deploy --compose-file docker-compose.yaml banknet
docker ps
docker exec -it bash
# Inside the container run the following command to join
. buildandjoinchannel.sh

```