This repository is about how to deploy Hyperledger Fabric, Hyperledger Caliper and Monitor tools.
At first, we need to config the environment on each VM.
On one VM, we can run install.sh
directly which indludes install go, docker, docker-compose, Nodejs, Fabric, node-gyp etc.
If Use Ansible for multiple VMs.
a. Copy Install.sh to each host
ansible target-ip -m copy -a "src=/root/install.sh dest=/root/install.sh mode=0755"
b. Run Install.sh on each host
ansible target-ip -m shell -a "/root/go.sh"
We can install Caliper on manager host.
Run Install_Caliper.sh
a. On manager host: docker swarm init --advertise-addr manager-host-IP
b. On each host: docker swarm join (Ansible)
a. Set cAdvisor and nodeExporter deployment place in prometheus.yml and swarm-compose.yml
b. Run start.sh
a. Define peer and orderer nodes number in crypto-config.yaml and configtx.yaml
b. Run generate.sh to generate crypto files
c. Send cryto files to worker nodes.
d. Define docker-swarm-compose-tls.yaml
Including fabric network ca, peer, orderer services
e. Define fabric-ccp-go-tls.yaml files.
Including Caliper clients, channels, organizations, orderer, peer, ca configuration.
a. Prepare init.js and query.js according to chaincode
b. Define test configurations in config.yaml
a. On manager host, run Caliper test. npx caliper benchmark run --caliper-benchconfig benchmarks/samples/fabric/marbles/configs.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/swarm-3org1peer-raft/fabric-ccp-go-tls.yaml --caliper-workspace .
b. If you want to create a network and run benchmark and then not tear down the network. npx caliper benchmark run --caliper-benchconfig benchmarks/samples/fabric/marbles/configs.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/swarm-3org1peer-raft/fabric-ccp-go-tls-keep.yaml --caliper-workspace .
c. If you want to connect to the existing network and run benchmarks (this can be the network from point 2).
npx caliper benchmark run --caliper-benchconfig benchmarks/samples/fabric/marbles/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/swarm-3org1peer-raft/fabric-ccp-go-tls-existing.yaml --caliper-workspace .