Installing and developing with Hyperledger Composer
1. Install Development Components.
https://hyperledger.github.io/composer/installing/development-tools.html
2. Start Hyperledger Fabric:
Remove all containers and images
* docker kill
mkdir ~/fabric-tools && cd ~/fabric-tools
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip unzip fabric-dev-servers.zip
cd ~/fabric-tools ./downloadFabric.sh ./startFabric.sh ./createPeerAdminCard.sh
3. Create business structure network
yo hyperledger-composer:businessnetwork
4. Define business network
Define Models and transaction logic.
5. Generate a business network archive:
composer archive create -t dir -n .
6. Deploy business network:
-
Install composer runtime:
composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName tutorial-network
-
Deploy business network in tutorial-network
composer network start --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile tutorial-network@0.0.1.bna --file networkadmin.card
-
import network admin identity
composer card import --file networkadmin.card
-
Check business network deployment
composer network ping --card admin@tutorial-network
-
Generate a Rest Server
composer-rest-server