This code pattern provides the means for users to experiment with chaincode deployment from GitHub and test the chaincode on a pre-set blockchain network in IBM Cloud Private on LinuxONE. It also allows users to perform CI/CD operations to automatically track modifications to the chaincode in GitHub and upgrade the chaincode on the network appropriately.
This code pattern is targeting smart contracts, or chaincode developers; It allows a simple method for deploying a chaincode from GitHub directly to a blockchain network and test it using a provided web application. The blockchain network in this code pattern is pre-set on IBM Blockchain Platform for IBM Cloud Private on LinuxONE using the LinuxONE Community Cloud, removing the burden of setting up the blockchain network and administrating it. Developers can focus solely on the chaincode development aspect. A sample chaincode is provided for the users to experiment with. However, users may also deploy and exercise their own chaincode(s).
The provided web application behaves as a portal to the blockchain network. It contains an intuitive GUI, from which users can deploy and upgrade the chaincode from GitHub and then invoke transactions and query the entities.
Moreover, users can also experiment with simplistic automatic CI/CD for the chaincode. With simple configuration steps, users enable automatic tracking of chaincode changes in the GitHub repository, and automatic deployment of new versions of the code to the blockchain network. This is a simple CI/CD pipeline based on GitHub webhooks, mainly to demonstrate its capability with blockchain and allow a platform for learning, experiment and early development. However, users can later deploy a more advanced CI/CD pipeline in their environment based on popular solutions, such as Jenkins. It is recommended to perform a more coherent development discipline including continuous integration and testing before deploying code in production.
To summarize, this code pattern provides chaincode developers an easy starting point for building, developing, and testing chaincodes using a provided CI/CD pipeline, on a pre-set blockchain network.
- The user obtains a sample chaincode (smart contract)
- The user creates a local GitHub repository with the chaincode
- The user accesses the web application GUI on LinuxONE Community Cloud to interfacethe IBM Blockchain Platform for ICP
- The user deploys the chaincode to a pre-set blockchain network and invokes transactions and query operations
- The user enables and tests CI/CD automation (optional)
Find the detailed instructions in the README. The steps show you how to:
- Provision IBM Blockchain Platform for ICP on LinuxONE Community Cloud
- Create your chaincode local GitHub repository
- Deploy the chaincode
- Invoke transactions and queries
- Enable CI/CD (optional)