Skip to content

Commit 9a4518c

Browse files
committed
[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 <[email protected]>
1 parent 187104e commit 9a4518c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/cluster/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ NODES += orderer
44
NODES += cli
55
NODES += ca
66

7+
DAEMONS = $(filter-out cli,$(NODES))
8+
79
CHANNEL_NAME ?= mychannel
810

911
CRYPTOOUTPUT = build/cryptogen
@@ -42,9 +44,9 @@ help:
4244

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

4951
compose-down:
5052
$(COMPOSE) down

examples/cluster/compose/docker-compose.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ services:
2626
<<: *logging
2727
volumes:
2828
- ../build/nodes/orderer:/etc/hyperledger/fabric
29+
depends_on:
30+
- ca
2931

3032
peer1:
3133
container_name: peer1

0 commit comments

Comments
 (0)