diff --git a/first-network/.gitignore b/first-network/.gitignore index 155350838d..038650ef71 100644 --- a/first-network/.gitignore +++ b/first-network/.gitignore @@ -1,7 +1,6 @@ /channel-artifacts/*.tx /channel-artifacts/*.block /crypto-config/* -/docker-compose-e2e.yaml /ledgers /ledgers-backup /channel-artifacts/*.json diff --git a/first-network/byfn.sh b/first-network/byfn.sh index e07b2d729e..2e2f257f1d 100755 --- a/first-network/byfn.sh +++ b/first-network/byfn.sh @@ -45,7 +45,6 @@ function printHelp() { echo " -c - channel name to use (defaults to \"mychannel\")" echo " -t - CLI timeout duration in seconds (defaults to 10)" echo " -d - delay duration in seconds (defaults to 3)" - echo " -f - specify which docker-compose file use (defaults to docker-compose-cli.yaml)" echo " -s - the database backend to use: goleveldb (default) or couchdb" echo " -l - the programming language of the chaincode to deploy: go (default), javascript, or java" echo " -o - the consensus-type of the ordering service: solo (default) or etcdraft" @@ -277,41 +276,6 @@ function networkDown() { removeUnwantedImages # remove orderer block and other channel configuration transactions and certs rm -rf channel-artifacts/*.block channel-artifacts/*.tx crypto-config ./org3-artifacts/crypto-config/ channel-artifacts/org3.json - # remove the docker-compose yaml file that was customized to the example - rm -f docker-compose-e2e.yaml - fi -} - -# Using docker-compose-e2e-template.yaml, replace constants with private key file names -# generated by the cryptogen tool and output a docker-compose.yaml specific to this -# configuration -function replacePrivateKey() { - # sed on MacOSX does not support -i flag with a null extension. We will use - # 't' for our back-up's extension and delete it at the end of the function - ARCH=$(uname -s | grep Darwin) - if [ "$ARCH" == "Darwin" ]; then - OPTS="-it" - else - OPTS="-i" - fi - - # Copy the template to the file that will be modified to add the private key - cp docker-compose-e2e-template.yaml docker-compose-e2e.yaml - - # The next steps will replace the template's contents with the - # actual values of the private key file names for the two CAs. - CURRENT_DIR=$PWD - cd crypto-config/peerOrganizations/org1.example.com/ca/ - PRIV_KEY=$(ls *_sk) - cd "$CURRENT_DIR" - sed $OPTS "s/CA1_PRIVATE_KEY/${PRIV_KEY}/g" docker-compose-e2e.yaml - cd crypto-config/peerOrganizations/org2.example.com/ca/ - PRIV_KEY=$(ls *_sk) - cd "$CURRENT_DIR" - sed $OPTS "s/CA2_PRIVATE_KEY/${PRIV_KEY}/g" docker-compose-e2e.yaml - # If MacOSX, remove the temporary backup of the docker-compose file - if [ "$ARCH" == "Darwin" ]; then - rm docker-compose-e2e.yamlt fi } @@ -515,7 +479,7 @@ else exit 1 fi -while getopts "h?c:t:d:f:s:l:i:o:anv" opt; do +while getopts "h?c:t:d:s:l:i:o:anv" opt; do case "$opt" in h | \?) printHelp @@ -530,9 +494,6 @@ while getopts "h?c:t:d:f:s:l:i:o:anv" opt; do d) CLI_DELAY=$OPTARG ;; - f) - COMPOSE_FILE=$OPTARG - ;; s) IF_COUCHDB=$OPTARG ;; @@ -576,7 +537,6 @@ elif [ "${MODE}" == "down" ]; then ## Clear the network networkDown elif [ "${MODE}" == "generate" ]; then ## Generate Artifacts generateCerts - replacePrivateKey generateChannelArtifacts elif [ "${MODE}" == "restart" ]; then ## Restart the network networkDown diff --git a/first-network/eyfn.sh b/first-network/eyfn.sh index 3758390073..0a5d82f876 100755 --- a/first-network/eyfn.sh +++ b/first-network/eyfn.sh @@ -29,7 +29,6 @@ function printHelp () { echo " -c - channel name to use (defaults to \"mychannel\")" echo " -t - CLI timeout duration in seconds (defaults to 10)" echo " -d - delay duration in seconds (defaults to 3)" - echo " -f - specify which docker-compose file use (defaults to docker-compose-cli.yaml)" echo " -s - the database backend to use: goleveldb (default) or couchdb" echo " -l - the programming language of the chaincode to deploy: go (default), javascript, or java" echo " -i - the tag to be used to launch the network (defaults to \"latest\")" @@ -136,8 +135,6 @@ function networkDown () { removeUnwantedImages # remove orderer block and other channel configuration transactions and certs rm -rf channel-artifacts/*.block channel-artifacts/*.tx crypto-config ./org3-artifacts/crypto-config/ channel-artifacts/org3.json - # remove the docker-compose yaml file that was customized to the example - rm -f docker-compose-e2e.yaml fi } @@ -258,7 +255,7 @@ else printHelp exit 1 fi -while getopts "h?c:t:d:f:s:l:i:v" opt; do +while getopts "h?c:t:d:s:l:i:v" opt; do case "$opt" in h|\?) printHelp @@ -270,8 +267,6 @@ while getopts "h?c:t:d:f:s:l:i:v" opt; do ;; d) CLI_DELAY=$OPTARG ;; - f) COMPOSE_FILE=$OPTARG - ;; s) IF_COUCHDB=$OPTARG ;; l) CC_SRC_LANGUAGE=$OPTARG