Cloudsoft AMP Simplifying Hyperledger Blockchain on Docker

Download the Cloudsoft Blockchain service here.

Overview

There is huge interest around blockchain but it can be difficult to get started if you want to try it. Cloudsoft AMP simplifies the process of creating and managing a distributed Hyperledger blockchain on your choice of infrastructure (on-premise or cloud).

In this post we showcase a Cloudsoft AMP blueprint that deploys a Hyperledger Fabric cluster and run a sample Asset Management Blockchain application on the cluster using Docker.

Background Information

The Cloudsoft Application Management Platform (AMP)  simplifies the modeling, monitoring and management of applications, enabling application migration, accelerating the development of cloud first applications, and delivering policy-based application elasticity, scalability and portability.

The Hyperledger Project is a collaborative effort created to advance blockchain technology by identifying and addressing important features for a cross-industry open standard for distributed ledgers. Potential applications of the project include government services, property transactions and pharmaceutical test results.


OpenBlockchain (OBC) is a ledger of digital events, called transactions, shared among different participants, each having a stake in the system. The ledger can only be updated by consensus of the participants, and, once recorded, information can never be altered. Each recorded event is cryptographically verifiable with proof of agreement from the participants.  OBC was an IBM project that has graduated to become part of Hyperledger’s first incubation project, Fabric.

Blueprint Structure

The blueprint consists of:

  • A cluster of validating peers, each running in a Docker container on a separate host
  • A CLI node and a membership services node, each running in a Docker container on the same host

For more info on Hyperledger Fabric components and terminology, see its documentation.

Running the Hyperledger Fabric Blueprint

Step 0: Prerequisites

The following steps assume you already have Vagrant installed on your local machine and have external network access to the Ubuntu update repositories and the Cloudsoft Artifactory server.

Step 1: Get Cloudsoft AMP

First, register to ensure that you receive regular updates: Subscribe Here! Then follow the online instructions, reproduced here for simplicity:

git clone https://github.com/cloudsoft/amp-vagrant
cd amp-vagrant
vagrant up amp

After these steps are complete Cloudsoft AMP will be available at: http://10.10.10.100:8081/

Step 2: Create a Deployment Location

  • 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 "Location" under "Add to Catalog"
  • Select the desired type of location and fill in the required fields
  • Be sure to make note of the "Location ID" that you choose during the final step.

For example, to add a location pointing at Softlayer’s Amsterdam region:

For more information about AMP locations, refer to the Apache Brooklyn documentation.

Step 3: Add Hyperledger Fabric to AMP’s catalog

  • Go to http://10.10.10.100:8081/ in your browser (the Cloudsoft AMP Console)
  • Click the "Composer" tab
  • Toggle the "Catalog" option (set to "Application" by default)
  • Copy and paste the following and click “Add to Catalog”:
brooklyn.catalog:
  items:
  - https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/catalog.bom

Once this is complete the Hyperledger Fabric entities are registered with Brooklyn and may be deployed.

Step 4: Deploy a Hyperledger Fabric cluster

  • 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"
  • This take you to the Blueprint Composer which should be set to "Catalog" by default
  • Select "Application"
  • Copy and paste the following, replacing <your-location> with the location id you used in step 2:
name: "Hyperledger Fabric Cluster"
location: <your-location>

services:
- type: hyperledger-cluster
  name: Hyperledger Fabric Cluster
  brooklyn.config:
    initialSize: 4
  • Click "Deploy"

Step 5: Use your cluster

When everything is up and running you can test your cluster with the asset management chaincode example, which demonstrates how to exercise control and ownership of assets at the chaincode level.

An example run of the application is shown in the video accompanying this blog post.

Video

The following video demonstrates:

  • Adding this blueprint to the AMP catalog
  • Deploying a cluster from the catalog to Docker running on IBM Blue Box
  • Running the demo application

Want to know more?

Check out Part Two of this post where we run this on multiple locations.

Download the Cloudsoft Blockchain service here. Or join the Slack Channel: https://slack.cloudsoft.io 

Contact Cloudsoft at info@cloudsoft.io