mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
basic-network: - moved "crypto-config" to top-level and removed "network" folder - added generate.sh to re-gen crypto materials - docker-compose.yaml to ref v1.0.0 images - add CLI to docker-compose - start.sh to only start CA, orderer, peer and couch - startFabric.sh to run start.sh, then launch CLI for create channel, install, instantiate, invoke fabcar: - moved chaincode to central chaincode folder - moved "creds" to top-level and removed "network" folder - changed to use the basic-network as the target and removed docker-compose.yaml and crypto-config - updated package.json to require v1.0.0 modules - added missing license headers - restructured to use a central chaincode subdirectory Change-Id: Ic784d1cf55ea51da5155624f3c38275883de1dca Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com> Signed-off-by: Nick Gaski <ngaski@us.ibm.com> Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
41 lines
1.2 KiB
Bash
Executable file
41 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright IBM Corp All Rights Reserved
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
export PATH=$GOPATH/src/github.com/hyperledger/fabric/build/bin:${PWD}/../bin:${PWD}:$PATH
|
|
export FABRIC_CFG_PATH=${PWD}
|
|
CHANNEL_NAME=mychannel
|
|
|
|
# remove previous crypto material and config transactions
|
|
rm -fr config/*
|
|
rm -fr crypto-config/*
|
|
|
|
# generate crypto material
|
|
cryptogen generate --config=./crypto-config.yaml
|
|
if [ "$?" -ne 0 ]; then
|
|
echo "Failed to generate crypto material..."
|
|
exit 1
|
|
fi
|
|
|
|
# generate genesis block for orderer
|
|
configtxgen -profile OneOrgOrdererGenesis -outputBlock ./config/genesis.block
|
|
if [ "$?" -ne 0 ]; then
|
|
echo "Failed to generate orderer genesis block..."
|
|
exit 1
|
|
fi
|
|
|
|
# generate channel configuration transaction
|
|
configtxgen -profile OneOrgChannel -outputCreateChannelTx ./config/channel.tx -channelID $CHANNEL_NAME
|
|
if [ "$?" -ne 0 ]; then
|
|
echo "Failed to generate channel configuration transaction..."
|
|
exit 1
|
|
fi
|
|
|
|
# generate anchor peer transaction
|
|
configtxgen -profile OneOrgChannel -outputAnchorPeersUpdate ./config/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP
|
|
if [ "$?" -ne 0 ]; then
|
|
echo "Failed to generate anchor peer update for Org1MSP..."
|
|
exit 1
|
|
fi
|