This post will be a quick walkthrough of the new blockchain plans on IBM Cloud and on how to deploy chaincode on them. I created an account and I’m currently running my tests on the starter plan which is FREE while it’s in Beta.
For v1.1, IBM has revamped their blockchain plans for IBM Cloud. These currently include a starter plan, an enterprise plan, an enterprise plus plan and a self-managed plan. The fully integrated blockchain platform is designed to accelerate the development, governing, and operation of a multi-institution business network. It allows you to fully manage and easily deploy code to a running network.
The starter plan is mainly meant for testing and educational purposes. It includes one orderer using the SOLO consensus which is not meant for production. Same goes for the CA. There will only be one, so it’s not fault tolerant. If you don’t care and want to use it in production anyways, please read IBM’s “Need to know” for a detailed overview of why not to do this.
The Enterprise plan offers all the features of the starter plan. But adds some extra missing features which made the starter plan not production worthy.
They explicitly mention early production workloads because Hyperledger Fabric still needs to do some work before it can handle real production loads.
This plan includes all features of the enterprise plan, but this plan also runs on dedicated computing hardware for performance and isolation.
This plan is coming soon. You’ll be able to install and run the software stack on your own infrastructure. You’ll also be able to easily connect to another network on the IBM blockchain plans.
You can easily setup your network using the first-network scripts without using IBM Cloud. You are in control of your network by editing the docker-compose file. You would need to deploy these containers using Kubernetes or docker and provide the necessary configuration for the network to get up and running. But this is only the start, you also need Governing tools setup to keep your network healthy and upgrade your code when needed.
IBM Cloud Blockchain platform is providing Hyperledger Fabric as a service. Taking away the devops and adding the ability for you to manage and govern the HLF network by using a handy and straightforward GUI. Starting a network is as easy as clicking some buttons and uploading your chaincode.
A nice addition to the platform is the ability to easily govern the network. You can send invitations to other members to participate in governing the network. You can establish policies for membership, channel management, chaincode. The parties included in the policy will have to accept when making changes to the network in a controlled manner.
If you haven’t already, you should really create an account on Bluemix if you want to do this. We’ll just make some basic adjustment and upload chaincode.
Go to the blockchain tab in the Bluemix catalog. It’s possible you’ll be greeted with something like this. In this case, go to Cloud Foundry Orgs and create a new space. If you want to use the free trial, create one for the region “US South”. If you already have this, just switch to this region and select a space.
If you selected the correct region “US South”, you will be able to choose the FREE “Starter Membership Plan”. After a couple of seconds, you will be greeted with an overview screen. Here you can add Cloud Foundry Apps directly or add service credentials to connect your application using IAM. We’ll skip this for now and just press Launch. We have liftoff. 🚀
You are greeted by the management panel of the nodes in your network. Here you can add, stop and remove peers. You are also able to view their logs.
Upon creating your starter plan network, you are able to create one more peer for org2. You can easily spin one up by pressing the Add Peer button.
You are also able to find the connection profile here. This is a configuration file which can be loaded into your SDK to set up the connection to your network. I wrote a bit more about this here.
There is already a default channel created. So if we want we can immediately deploy our code on that channel. But we can also create a new one.
Notice how it says “Request Channel” instead of “Create channel”? This is because invited members need to vote for a channel request.
After giving your channel a name, creating a new channel will prompt you with the following pop-up. Here you can configure the members for your channel and their permissions.
Depending on which permissions you set for your members (above), you can define your endorsement policy (below). An endorsement policy is a condition which needs to be met when updating a channel. You can select Any or All members to vote for a certain change.
After submitting, all members will be notified and will need to review and vote on this request. Only when the policy if fulfilled, you can create the new channel.
Per voting request, you’ll be able to see an overview of the required votes. And who has already given them.
You created a new channel! Now you need to add peers to it in order for it to do something. You can do so by clicking on your newly created channel in the Channel tab. When clicking on a channel, you can (un)select different peers per channel.
Per channel, you have a way to monitor your network and members. You can see a detail of all the blocks in the network. This is also the place where you can install chaincode.
Installing chaincode is as easy as uploading a file. After selecting a peer, you can upload chaincode to a channel. You can upload separate files, but a zip is also possible. You are also able to deploy .bna files from Hyperledger Composer by following these steps.
After uploading your chaincode, you’ll need to instantiate chaincode per channel. You are also able to pass arguments to the
init() function, as you would normally starting a network locally.
That’s about it to start a basic network. You can easily connect to it from your client using the JSON output connection profile which I mentioned at the top of this article. You just import this file and most of the connection configuration is already set up for you.
I highly recommend to still go through their official documentation since this is only a basic introduction. There is still more to explore here.
Originally posted on TheLedger