Brooklyn blueprint for Hyperledger Fabric deployment
This repository contains Apache Brooklyn blueprints for a
Hyperledger Fabric v0.6.1 cluster deployment using the official Docker images.
Note: If you select the Vagrant installation, replace the following line in the guide below:
git clone https://github.com/cloudsoft/amp-vagrant.git
with:
git clone -b hyperledger-fabric https://github.com/cloudsoft/amp-vagrant.git
Use this guide to install AMP.
For the simplest path to a Hyperledger Fabric deployment, select the Vagrant installation option and create
5 BYON nodes.
Note: You can skip this step if you selected the Vagrant installation option.
deploy
folder inside the AMP install directory.hyperledger.bom
into the editorNote: You can skip this step if you selected the Vagrant installation option and started the 5 BYON nodes,
in which case you will already have a location named byon-cluster
configured and ready to be used.
If you would like to deploy to a different location, proceed with this step.
Use this guide to create a deployment location.
byon-cluster
by default, if using Vagrant)Note: If you plan on deploying to Vagrant VMs running locally, the maximum supported value ofhyperledger.peers.per.location
is 4. However, the size of the cluster can be increased if you add more VMs
to servers.yaml
in your amp-vagrant
repository.
This deployment is capable of creating multiple clusters of validating peer nodes across
multiple locations; all of the nodes are part of the same Hyperledger Fabric.
webapp-policy.yaml
should be replaced with the path to your blueprint file on diskNote: This deployment requires at least 5 locations listed (can contain duplicates).
Once your cluster has successfully deployed, perform the following steps to deploy the asset management demonstration app. This app repeatedly assigns an asset “Picasso” from one owner to another. For more information about this app as well as its source code, see the Fabric repository.
host.sshAddress
valuessh <ssh-address-here>
Note 1: You may need to supply an SSH key or a username / password depending on your
deployment location’s configuration.
Note 2: If host.sshAddress
ends with a port (e.g. :22
), remove the colon and the port from the SSH command.
Note 3: If you deployed to local Vagrant VMs, you can SSH into any of these VMs by running this command instead:vagrant ssh byon<number here>
. The name of the VM is based on the last digit of the IP address.
For example, if the CLI node’s IP is 10.10.10.102
then the command would be: vagrant ssh byon2
.
From the same terminal window from the previous step, execute the following commands:
sudo docker exec -it cli bash
cd $APP_HOME
go build
./app
This enters the CLI container, builds the app, and executes the app. When the app runs, the output should clearly indicate the transfer of ownership of “Picasso” ultimately ending with “Dave” as the owner.
If deploying to AWS You should use an up-to-date CentOS AMI. The “CentOS 7 (x86_64) with Updates HVM”
images (link)
are a good choice. The following is a sample catalogue blueprint for the us-east-1
version of this AMI:
brooklyn.catalog:
id: aws-virginia-centos7
name: AWS Virginia CentOS 7
itemType: location
item:
type: jclouds:aws-ec2
brooklyn.config:
identity: <YOUR IDENTITY>
credential: <YOUR CREDENTIAL>
region: us-east-1
imageId: us-east-1/ami-6d1c2007
minRam: 2000
loginUser: centos
installDevUrandom: true
allocatePTY: true