Inspired by Hyperledger Fabric and Fabric Samples.
Using this deploy.sh file, you can automatically package, install and approve all of your chaincodes into default Hyperledger Fabric Orgs (Org1 and Org2).
To use the Fabric samples, you need to download the Fabric Docker images and the Fabric CLI tools. First, make sure that you have installed all of the Fabric prerequisites (including JQ). You can then follow the instructions to Install the Fabric Samples, Binaries, and Docker Images in the Fabric documentation. In addition to downloading the Fabric images and tool binaries, the Fabric samples will also be cloned to your local machine.
The Fabric test network in the samples repository provides a Docker Compose based test network with two Organization peers and an ordering service node. You can use it on your local machine to run the samples listed below. You can also use it to deploy and test your own Fabric chaincodes and applications. To get started, see the test network tutorial.
Create a copy of deploy.sh under the test-network
directory of fabric-samples and modify these lines of code according to your project setup and contracts names. (if you are using a different folder structure, you might need to change orther parts as well)
export CHAINCODES=("fabcar" "fabcar2")
export PROJNAME=fabcar
Here in this example, my project is located inside a folder called PROJNAME=fabcar
and contains only two chaincodes called ("fabcar" "fabcar2")
. You can add as many chaincodes as your project contains.
Save your deploy.sh
and run this command:
MIT