Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Use a Kubernetes cluster to deploy a Fabric network smart contract onto blockchain

Summary

The IBM Blockchain Platform provides a dashboard console to deploy and manage components of a blockchain network. This includes setting up nodes for the network, such as peer, orderer, and Certificate Authority (CA), and creating organizations and identities to manage the network. The console deploys directly on an IBM Cloud Kubernetes service without manual setup.

This developer code pattern will illustrate deploying the Hyperledger Fabric sample Fabcar on IBM Blockchain Platform, developing a Node.js Express server to interact with the network and an Angular client to provide a web interface.

Description

This code pattern demonstrates setting up a network on the IBM Blockchain Platform and deploying the Fabcar smart contract on the network. We set up our application to interact with the network, including identities to submit transactions on the smart contract. The application is set up with a Node.js server using the fabric-network and fabric-ca-client library to process requests to the network, and an Angular client to bring up a web interface.

When you have completed this code pattern, you will understand how to:

  • Set up a Hyperledger Fabric network on IBM Blockchain Platform
  • Install and instantiate smart contract through IBM Blockchain Platform
  • Develop a Node.js server with the Hyperledger Fabric SDK to interact with the deployed network
  • Create an Angular front end for the web app to interface with the network

Flow

flow

  1. The blockchain operator sets up the IBM Blockchain Platform service.
  2. The IBM Blockchain Platform enables to create a Hyperledger Fabric network onto an IBM Kubernetes service, allowing the installation and instantiatiation of the Fabcar smart contract on the network.
  3. The Node.js application server uses the Fabric SDK to interact with the deployed network on IBM Blockchain Platform, and creates APIs for a web client.
  4. The Angular client uses the Node.js API to interact with the network.
  5. The user interacts with the Fabcar Angular web interface to update and query the blockchain ledger and state.

Instructions

Ready to give it a try? Please see the README for detailed instructions.

Raheel Zubairy