Total directory:
(I)HyperLedger Fabric 2.0-Release test network deployment
Fabric2.0 First-Network generates configuration instructions
(3)Fabric2.0 startup network script configuration analysis
(4)Fabric2.0 channel practice
Fabric2.0 Smart Contract Practice – Install and define smart contracts
(6)Fabric2.0 Smart Contract Practice – Upgrade smart contract
Fabric2.0 Smart Contract Practice – set endorsement strategy
Fabric2.0Java SDK Practices – Contract transactions
1. Environment preparation
System tools | version | note |
---|---|---|
CentOS | 7 | |
Docker | 18.09.4 | |
Docker-compose | 1.23.2 | Reference:CentOS7 Install the Docker-compose recommendation |
GO | 1.13.4 | Reference:CentOS7 installation Go |
2. Download source code
1. Create a go working directory
mkdir go
mkdir go/src
mkdir go/pkg
mkdir go/bin
export GOPATH=xx/go
Copy the code
2. Create a Hyperledger directory
mkdir go/src/github.com/hyperledger
Copy the code
3. Download the fabric Release-2.0 source code
cd go/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
cdFabric && Git Checkout Release-2.0Copy the code
How to quickly clone the Github repository with Git
3. Compile binaries and Docker images
Currently open the console in the Fabric directory, go to the Fabric directory, and run the following command
make all
Copy the code
GCC is not installed. In this case, you only need to install GCC
yum install gcc
Copy the code
After executing, view the compiled binaries as follows:
ll build/bin
Copy the code
The console output is as follows:
After executing, view the compiled Docker image as follows:
Docker images | grep 2.0 | grep fabricCopy the code
The console output is as follows:
4. Run the test network
1. Copy the compiled binaries to the fabric-samples directory
cp -r build/bin fabric-samples
Copy the code
2. Network preparations
cd fabric-samples/first-network
./byfn.sh generate
Copy the code
The certificate file and channel file are generated as follows
3. Run the test network
./byfn.sh up
Copy the code
If the following message is displayed on the console, the operation succeeds
Check docker status as follows:
docker ps |grep fabric
Copy the code
The result is as follows:
5.END
Stay tuned as we continue to learn more about 2.0 deployment configurations, contracts, and raft consensus as the official test network runs out.
Fabric2.0 First-Network configuration description