Your applications transact on your DLT network by executing the business logic as implemented in the deployed chaincodes. Your application layer depending on your architecture may be simple or quite complex (when for example you need to integrate with other applications in your system landscape). The HLF chaincode can be accessed and invoked by using the HLF SDKs.
Let’s assume we use a chaincode and a web application that exposes the business logic to our end customers (using a HLF SDK that implements a simple Web UI).
Consortia allows you to deploy your chaincodes/applications from a GIT/Docker repository. In order to ease the deployment you may integrate your private repository or use any public repository.
Here are the steps to integrate your source code repository provider (where your chaincode source code is managed)
You git provider may ask to grant access to your repositories. This is needed in order to deploy your chaincode on your peers. You may remove the access anytime by using your git provider management console (in case the access is revoked, you will not be able to deploy your chaincode with Consortia).
After you integrate your git repositories you may proceed with the chaincode deployment. The deployment is a multi step HLF chaincode deployment process that is simple and easy to perform/automate with Consortia.
The purpose of this step is to bring your chaincode on your peers. Usually the chaincode runs on peers managed and owned by participating network MSPs (MSPs owned and operated by your partners). The process of bringing the chaincode to all network peers is asynchronous and usually managed out-of-band between the participating partners.
The steps below are relevant for HLF 1.4.x releases. For HLF 2.x.x releases the process of deploying a chaincode is conceptually different.
To install a chaincode on your peers
You may install multiple version of your chaincode on your peers and later on decide what version to instantiate.
Under the Chaincode Deployment Layout section you may see the list of peers/channels where the selected chaincode version is installed/instantiated and the current status of the install process. Keep in mind you install a chaincode version on peers and instantiate it on channels.
After the installment of your chaincode is done, you may proceed with the chaincode deployment process and instantiate it on a channel.
The HLF chaincode instantiation is a DLT transaction that is endorsed by the peers and ordered on the chosen channel through the related OSP.
Perform the following steps to instantiate your chaincode:
Consortia will automatically set the endorsement policy based on the MSPs that are participating on the selected channel. You may always edit the policy if needed.
You may instantiate a single chaincode version at a time. After the first instantiation of the chaincode you may upgrade it due to any reason (i.e. bugfix, endorsement policy upgrade, etc.).
Under the Chaincode Deployment Layout section you may see the list of channels where the selected chaincode version is instantiated.
After the chaincode is deployed you may proceed further with the deployment of your application that will consume the chaincode and expose the business logic to your customers.
Let’s assume you already have followed the best practices and you have your HLF application packaged and available on a docker repository.
Consortia may help you easily deploy your docker packaged web application and connect it to the HLF network nodes.
Perform the following steps to deploy your web application from a docker repository:
You may deploy a sample chaincode and web application by following the steps.