Post Update:

Cloudsoft Blockchain Service is now available from the IBM Marketplace.
.

Overview

Chris Ferris and Arnaud Le Hors each recently posted about how to get Hyperledger Fabric (HLF) running natively on Mac and Windows, respectively. Definitely check out these helpful posts if you’d like to get HLF up and running on your local machine.

In this post I will show how, using Cloudsoft AMP, you can rapidly deploy HLF onto IBM Blue Box data centers in San Jose, London, and Singapore, creating a geographically distributed Blockchain network. This simulates the use case of a financial institution that wants to set up its own blockchain network running across multiple private data centers around the world.

For a step-by-step narrated demonstration, check out this video.

Introducing Cloudsoft AMP

Cloudsoft AMP is an application modelling, deployment, and management platform built on the foundation of the open source Apache Brooklyn project.

Launching Cloudsoft AMP with Vagrant

The easiest way to get started with Cloudsoft AMP is to use the preconfigured Vagrant box offered by Cloudsoft. To do so you’ll need to install Vagrant and VirtualBox.

After you’ve installed these prerequisites, download the AMP Vagrant distribution and follow the instructions for installing and launching AMP with Vagrant.

Once the AMP Vagrant box is up and running, Cloudsoft AMP is ready to be used.

Creating Cloudsoft AMP Deployment Locations

In this step you will create definitions for one or more locations onto which AMP can deploy HLF. For our deployment, we added location entries for Blue Box San Jose, London, and Singapore.

One of the major advantages of AMP is it’s blueprints, YAML files that define all of the components of an application and their relationships with each other, are location agnostic. A blueprint only needs to be written once; AMP takes care of the location-specific details so your application can be deployed to nearly any environment that you choose. Supported locations include public cloud providers, bring-your-own-nodes, baremetal machines, and in some cases even your localhost. For more information about AMP locations, see the guide.

To create location(s):

  • Go to http://10.10.10.100:8081/ in your browser (the Cloudsoft AMP Console)
  • Log in with username `admin` and password `password`
  • Click the “Catalog” tab
  • Click the circle with a plus sign inside it (next to “Catalog” on the left)
  • Click “Location” under “Add to Catalog”
  • Select the desired type of location and fill in the required fields

Image 8-1-16 at 6.21 PM

Adding Hpyerledger Fabric to the Cloudsoft AMP Catalog

In order to deploy HLF using Cloudsoft AMP we need to add its blueprint to the Cloudsoft AMP application catalog — the blueprint repository.

To add HLF to the AMP catalog:

  • Go to http://10.10.10.100:8081/ in your browser (the Cloudsoft AMP Console)
  • Click the “Catalog” tab
  • Click the circle with a plus sign inside it (next to “Catalog” on the left)
  • Click “YAML” under “Add to Catalog”

Copy and paste:


brooklyn.catalog:
    items:
	- https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/docker.bom
        - https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/catalog.bom
  • Click “Add to Catalog”

Image 8-1-16 at 7.47 PM

Deploying a Hyperledger Fabric Cluster Across Multiple Locations

At this point you are ready to deploy a HLF cluster across multiple locations with Cloudsoft AMP.

To initiate deployment:

  • Go to http://10.10.10.100:8081/ in your browser (the Cloudsoft AMP Console)
  • Click the “+ add application” button
  • Click the “Hyperledger Fabric Multi-cluster” tile
  • Click the “Next” button
  • Select a location from the list (this is where the membership services and CLI hosts will be deployed)
  • Click “Add Additional Location”
  • Select another location from the list (this is where the root validating peer node will be deployed)
  • Click “Add Additional Location”
  • Select another location from the list (this is where a cluster of validating peer nodes will be deployed)
  • Continue adding additional locations to create additional clusters of validating peer nodes
  • Enter a name (optional)
  • Click “Deploy”

Image 8-1-16 at 7.52 PM

Image 8-1-16 at 7.56 PM

After the deployment process completes you will have a membership services node, a CLI node, a root validating peer, and one or more non-root validating peer clusters up and running and fully connected together.

Inspecting Your Cluster

Now that your HLF is running, let’s explore the live model that Cloudsoft AMP provides:

  • Go to http://10.10.10.100:8081/ in your browser (the Cloudsoft AMP Console)
  • Click on the “Applications” tab
  • Hover over the “>” under “Hyperledger Fabric Application” (or your custom name)
  • Click “Expand All”

Now you are able to see and explore information about each and every component of the HLF cluster that AMP deployed.

Running an Example Blockchain Application

One of the most interesting and fully-featured example chaincodes contained in the HLF repository is the asset management demo. In this example, a theoretical asset “Picasso” is transferred between owners from Alice -> Bob -> Charlie -> Dave. Only the current owner has permission to assign another person ownership of the asset at a given time.

To execute this chaincode, while still viewing the expanded live model:

  • Click “CLI Node”
  • Click the “Effectors” tab
  • Click “Invoke” next to “Run Demo Application” and confirm invocation

Image 8-1-16 at 7.58 PM

To view the execution in progress:

  • Click “ssh: effector Run Demo Application”
  • Click “download” next to “stderr”
  • Refresh this page to to update

Eventually execution will terminate when “Dave is the owner” is printed out.

Conclusion and References

With Cloudsoft AMP it is quick and easy to deploy a Hyperledger Fabric cluster across one or more Blue Box data centers (or any other locations), enabling you to spend more time developing meaningful chaincode applications and less time setting up the cluster itself.

For more in-depth information, see these posts from the official Cloudsoft blog:

http://www.cloudsoft.io/blog/amp-hyperledger-blockchain
http://www.cloudsoft.io/blog/hyperledger-blockchain-multi-location-on-docker
http://www.cloudsoft.io/ondemand-distributed-hyperledger-fabric-cluster-with-cloudsoft-amp

2 comments on"Running Hyperledger Fabric on IBM Blue Box with Cloudsoft AMP"

  1. Nice! Thx Mike.

  2. almanyafuarları January 23, 2017

    great work

Join The Discussion

Your email address will not be published. Required fields are marked *