mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Merge "[FAB-16284] Remove E2E file and -f option from BYFN"
This commit is contained in:
commit
08e980080a
3 changed files with 2 additions and 48 deletions
1
first-network/.gitignore
vendored
1
first-network/.gitignore
vendored
|
|
@ -1,7 +1,6 @@
|
|||
/channel-artifacts/*.tx
|
||||
/channel-artifacts/*.block
|
||||
/crypto-config/*
|
||||
/docker-compose-e2e.yaml
|
||||
/ledgers
|
||||
/ledgers-backup
|
||||
/channel-artifacts/*.json
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ function printHelp() {
|
|||
echo " -c <channel name> - channel name to use (defaults to \"mychannel\")"
|
||||
echo " -t <timeout> - CLI timeout duration in seconds (defaults to 10)"
|
||||
echo " -d <delay> - delay duration in seconds (defaults to 3)"
|
||||
echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)"
|
||||
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
|
||||
echo " -l <language> - the programming language of the chaincode to deploy: go (default), javascript, or java"
|
||||
echo " -o <consensus-type> - 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
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ function printHelp () {
|
|||
echo " -c <channel name> - channel name to use (defaults to \"mychannel\")"
|
||||
echo " -t <timeout> - CLI timeout duration in seconds (defaults to 10)"
|
||||
echo " -d <delay> - delay duration in seconds (defaults to 3)"
|
||||
echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)"
|
||||
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
|
||||
echo " -l <language> - the programming language of the chaincode to deploy: go (default), javascript, or java"
|
||||
echo " -i <imagetag> - 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue