Skip to content

Commit

Permalink
[FAB-8958] Add org3 removal to byfn.sh
Browse files Browse the repository at this point in the history
When running the sample "Adding an Org to a Channel", then upon clean up,
./eyfn.sh -m down script must be run before ./byfn.sh -m down; otherwise,
org3 containers and volumes and containers do not get cleaned properly.
This patch adds the org3 container and volume cleanup to ./byfn.sh so
that a user does not have to worry about the correct execution ordering
of ./eyfn.sh and ./byfn.sh scripts.

Change-Id: Ieac1adc4081d59943286cfe9139a74395986460b
Signed-off-by: Salman Baset <sabaset@us.ibm.com>
  • Loading branch information
Salman Baset committed Mar 31, 2018
1 parent 2bbb0a8 commit a080da3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions first-network/byfn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,10 @@ function upgradeNetwork () {

# Tear down running network
function networkDown () {
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH down --volumes
docker-compose -f $COMPOSE_FILE down --volumes
# stop org3 containers also in addition to org1 and org2, in case we were running sample to add org3
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_ORG3 down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 down --volumes

# Don't remove the generated artifacts -- note, the ledgers are always removed
if [ "$MODE" != "restart" ]; then
# Bring down the network, deleting the volumes
Expand Down Expand Up @@ -440,6 +442,9 @@ CHANNEL_NAME="mychannel"
COMPOSE_FILE=docker-compose-cli.yaml
#
COMPOSE_FILE_COUCH=docker-compose-couch.yaml
# org3 docker compose file
COMPOSE_FILE_ORG3=docker-compose-org3.yaml
#
# use golang as the default language for chaincode
LANGUAGE=golang
# default image tag
Expand Down

0 comments on commit a080da3

Please sign in to comment.