Configure Hyperledger Composer Business Network


Configure Hyperledger Composer Business Network

Recipe ID: hsts-r16


Self-paced training

We offer blockchain introduction, Hyperledger for system admin, Ethereum, Solidity, Corda R3, Hyperledger for developers, blockchain cybersecurity and more classes in self-paced video format starting at $60. Click here to learn more and register. For complete self-paced blockchain training, visit our Complete Blockchain Development Training page.


Recipe Overview

In the previous recipe, we set up a development environment. In this recipe, we will create the FarmaTrace business network definition including the .cto, .script, .query, and .acl files, and then package them as a .bna file using Composer tools.

For those who are not familiar with Hyperledger project, reading Blockchain Overview, Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem, Hyperledger Design Philosophy and Framework Architecture, Overview of Building Blockchain Smart Contracts in Hyperledger and The Survey of Hyperledger Fabric Architecture and Components for Blockchain Developers articles are strongly recommended beforehand.

In our previous recipes, we discussed the Hyperledger Composer Business Network And Development Components and Setting up the Hyperledger Composer Prerequisites & Development environment. So reading and understanding of two previous recipes are required beforehand.

The yo hyperledger-composer command has three options: Angular, business network, and CLI. These are defined as follows:

 

Business Network Configuration
Follow steps to create your own business network:

1. To create the FarmaTrace business network definition, we need to set up a project structure:

mkdir farmaTrace
cd farmaTrace

2. We will use Yeoman's hyperledger-composer tool to create a businessnetwork project template. Enter all required information for this. For example, a business network name, description, author name, author email address, license selection, and namespace:

yo hyperledger-composer:businessnetwork

3. Select org.packt.farmatrace as the namespace.

4. Select No when asked whether to generate an empty network.

5. The Yeoman tool will generate farmatrace-network files, as follows:


Put Things Together

Here, we created a FramaTrace network on the local system, which contains all the required skeleton files to develop our FarmaTrace Composer application. This will help us to use Hyperledger Playground to do all our development work.
Congratulation! We have successfully learned how to configure a Hyperledger Composer business network.

The following recipes are excellent resources for installing other Hyperledger tools:

Blockchain Developer Guide- How to Install Hyperledger Fabric on AWS
Blockchain Developer Guide- How to Install and work with Hyperledger Sawtooth
Blockchain Developer Guide- How to Install Hyperledger Burrow on AWS
Blockchain Developer Guide- How to Install Hyperledger Iroha on AWS
Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI on AWS
Blockchain Developer Guide- How to Install Hyperledger Seth and Docker on AWS

To conclude this recipe, we like to recommend our Blockchain Hyperledger Development in 30 hours course to those interested in pursuing a blockchain development career. Indeed, as of this writing, Hyperledger Foundation offers the following two Hyperledger certifications: The Certified Hyperledger Fabric Administrator (CHFA) and The Certified Hyperledger Sawtooth Administrator (CHSA), both of which are highly regarded in the industry. Hyperledger Foundation is in the process of creating Hyperledger Developer certification program, which may be released in early or middle of 2020. In short, by taking our hands-on online Hyperledger class, you would be able to obtain CHFA certification.
This recipe is written by Brian Wu who is our senior Hyperledger instructor in Washington DC. His Hyperledger Cookbook with 40+ hands-on recipes is highly recommended.


Private and Custom Tutoring

We provide private tutoring classes online and offline (at our DC site or your preferred location) with custom curriculum for almost all of our classes for $50 per hour online or $75 per hour in DC. Give us a call or submit our private tutoring registration form to discuss your needs.


View Other Classes!