From 9a4518c5d22d780adf852bc0fb61a1a4ddbfb81d Mon Sep 17 00:00:00 2001 From: Greg Haskins Date: Mon, 8 May 2017 08:49:34 -0400 Subject: [PATCH] [FAB-3724] /examples/cluster: Ensure CA starts first 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 --- examples/cluster/Makefile | 6 ++++-- examples/cluster/compose/docker-compose.yaml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cluster/Makefile b/examples/cluster/Makefile index e6118d92a8a..6755f5041cf 100644 --- a/examples/cluster/Makefile +++ b/examples/cluster/Makefile @@ -4,6 +4,8 @@ NODES += orderer NODES += cli NODES += ca +DAEMONS = $(filter-out cli,$(NODES)) + CHANNEL_NAME ?= mychannel CRYPTOOUTPUT = build/cryptogen @@ -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 diff --git a/examples/cluster/compose/docker-compose.yaml b/examples/cluster/compose/docker-compose.yaml index f3488940ebc..742e698b877 100644 --- a/examples/cluster/compose/docker-compose.yaml +++ b/examples/cluster/compose/docker-compose.yaml @@ -26,6 +26,8 @@ services: <<: *logging volumes: - ../build/nodes/orderer:/etc/hyperledger/fabric + depends_on: + - ca peer1: container_name: peer1