Skip to content

Commit

Permalink
[FAB-3724] /examples/cluster: Ensure CA starts first
Browse files Browse the repository at this point in the history
We want the IP address assigned to CA to be consistent.
Right now, the CA and ORDERER race and thus we can't
be sure which IP they will each be assigned.  This patch
forces the order and thus makes the assignment much more
deterministic.

Fixes FAB-3724

Change-Id: Ife1d352cc553bbc4f4d56d83c574b6ff1c007570
Signed-off-by: Greg Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed May 8, 2017
1 parent 187104e commit 9a4518c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/cluster/Makefile
Expand Up @@ -4,6 +4,8 @@ NODES += orderer
NODES += cli
NODES += ca

DAEMONS = $(filter-out cli,$(NODES))

CHANNEL_NAME ?= mychannel

CRYPTOOUTPUT = build/cryptogen
Expand Down Expand Up @@ -42,9 +44,9 @@ help:

compose-up: nodes
@echo "Booting docker-compose environment"
$(COMPOSE) up -d ca $(PEERS)
$(COMPOSE) up -d $(DAEMONS)
$(DRUN) ./configure.sh $(CHANNEL_NAME) "$(CHANNEL_TXNS)" "$(PEERS)" $(TLS)
@./compose/report-env.sh "$(filter-out cli,$(NODES)")
@./compose/report-env.sh "$(DAEMONS)"

compose-down:
$(COMPOSE) down
Expand Down
2 changes: 2 additions & 0 deletions examples/cluster/compose/docker-compose.yaml
Expand Up @@ -26,6 +26,8 @@ services:
<<: *logging
volumes:
- ../build/nodes/orderer:/etc/hyperledger/fabric
depends_on:
- ca

peer1:
container_name: peer1
Expand Down

0 comments on commit 9a4518c

Please sign in to comment.