mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
Test network Nano bash provides a set of minimal bash scripts to run a Fabric network on your local machine. The network is functionally equivalent to the docker-based Test Network, you can therefore run all the tutorials and samples that target the Test Network. The Fabric release binaries are utilized rather than using docker containers to avoid all unnecessary layers. Only the chaincode and chaincode builder runs in a docker container behind the scenes. Using the Fabric binaries also makes it simple for Fabric developers to iteratively and quickly modify Fabric code and test a Fabric network as a user. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
26 lines
1.6 KiB
Bash
Executable file
26 lines
1.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# look for binaries in local dev environment /build/bin directory and then in local samples /bin directory
|
|
export PATH="${PWD}"/../../fabric/build/bin:"${PWD}"/../bin:"$PATH"
|
|
export FABRIC_CFG_PATH="${PWD}"/../config
|
|
|
|
export FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,common.configtx,common.channelconfig=info
|
|
export ORDERER_GENERAL_LISTENPORT=6052
|
|
export ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
|
export ORDERER_GENERAL_LOCALMSPDIR="${PWD}"/crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/msp
|
|
export ORDERER_GENERAL_TLS_ENABLED=true
|
|
export ORDERER_GENERAL_TLS_PRIVATEKEY="${PWD}"/crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.key
|
|
export ORDERER_GENERAL_TLS_CERTIFICATE="${PWD}"/crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
|
|
# following setting is not really needed at runtime since channel config has ca root certs, but we need to override the default in orderer.yaml
|
|
export ORDERER_GENERAL_TLS_ROOTCAS="${PWD}"/crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/ca.crt
|
|
export ORDERER_GENERAL_BOOTSTRAPMETHOD=file
|
|
export ORDERER_GENERAL_BOOTSTRAPFILE="${PWD}"/channel-artifacts/genesis.block
|
|
export ORDERER_FILELEDGER_LOCATION="${PWD}"/data/orderer3
|
|
export ORDERER_CONSENSUS_WALDIR="${PWD}"/data/orderer3/etcdraft/wal
|
|
export ORDERER_CONSENSUS_SNAPDIR="${PWD}"/data/orderer3/etcdraft/wal
|
|
export ORDERER_OPERATIONS_LISTENADDRESS=127.0.0.1:8445
|
|
export ORDERER_ADMIN_LISTENADDRESS=127.0.0.1:9445
|
|
|
|
# start orderer
|
|
orderer
|