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

Deploy a smart contract on the IBM Blockchain Platform running on OpenShift

Summary

Blockchain is not only about cutting out the middleman and being able to transact on a network directly with your peers but also about having nodes in multiple locations such that the network cannot be compromised through a single point of failure. Decentralization is one of the most important aspects of blockchain. The more decentralized your network is, the harder it is to bring your network down or manipulate it maliciously. Through the power of Kubernetes — specifically, the Red Hat® OpenShift® platform — the IBM Blockchain Platform is now more decentralized than ever. It can easily be deployed on all of the major cloud providers, on your own hardware, or a combination of the two.

Description

With IBM Blockchain Platform 2.1.0, you now have the flexibility to deploy components on the cloud of your choice — whether that is IBM Cloud, Azure, AWS, or Google Cloud. You can also get the same functionality with the original IBM Blockchain Platform, consistently, across different clouds, whether that is public, private, or even hybrid. Moreover, you can deploy the IBM Blockchain Platform on any x86_64 architecture that is supported by OpenShift 3.11 and meets the system and environment requirements. From there, you can import components from other networks, onboard other organizations to your current channel, and easily expand your network.

When you have completed this code pattern, you will have learned to:

  • Create and log into an OpenShift cluster.
  • Create a new project and add security and access policies.
  • Deploy and log into the IBM Blockchain console.
  • Deploy a smart contract and run transactions on the IBM Blockchain Platform running on OpenShift.

Flow

flow

  1. The blockchain operator purchases an entitlement to the IBM Blockchain Platform V2.1.0.
  2. The blockchain operator deploys the IBM Blockchain Platform (which is running the latest Hyperledger Fabric version) onto a Red Hat OpenShift cluster. The operator creates a network onto the IBM Blockchain platform, eventually installing and instantiating 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 Fabric SDK to interact with the network.
  5. The user interacts with the FabCar Angular web application to update and query the blockchain state.

Instructions

Ready to get started? Find the detailed steps for this pattern in the README.

  1. Order IBM Blockchain Platform V2.1.0.
  2. Create an OpenShift cluster.
  3. Add security and access policies to your project.
  4. Create a secret for your entitlement key.
  5. Deploy and log into the IBM Blockchain Platform console.
  6. Build networks.
  7. Install and instantiate FabCar smart contract.
  8. Register a user for our client app.
  9. Update the config file.
  10. Start the app.
  11. Submit and check transactions.
Horea Porutiu
Mihir Shah
Ratnakar Asara