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>
23 lines
1 KiB
Bash
Executable file
23 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Copyright IBM Corp All Rights Reserved
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Exit on first error, print all commands.
|
|
set -ev
|
|
|
|
docker-compose -f docker-compose.yml down
|
|
|
|
docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb
|
|
|
|
# wait for Hyperledger Fabric to start
|
|
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
|
|
export FABRIC_START_TIMEOUT=10
|
|
#echo ${FABRIC_START_TIMEOUT}
|
|
sleep ${FABRIC_START_TIMEOUT}
|
|
|
|
# Create the channel
|
|
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
|
|
# Join peer0.org1.example.com to the channel.
|
|
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b mychannel.block
|