Hyperledger Fabric is an enterprise-grade permissioned distributed ledger platform developed by the Hyperledger Foundation. What makes Fabric unique is that it offers versatility and modularity for an expansive range of industry use cases.
Fabric’s modular architecture allows enterprises diverse use cases through plug & play components such as membership, consensus, and privacy.
That said, the beauty of Fabric is that it enables a network or networks, and the members of a network work together. In such a situation, things become tricky when the companies these members work for do not want everyone to obtain access to all the data on said networks. Hence, companies maintain separate relationships within the network rather than an open, permissionless system blockchain technology is famous for.
The aforementioned reasons set Fabric apart from the straight and simple usages of blockchains like Ethereum, and the very reason causes complexities you should be wary of.
One such complexity is that executions made on Fabric can be permanent and cannot be altered after the fact, so it pays to learn about the crucial considerations before deploying Fabric in the blockchain network.
So without further ado, let’s get started.
Network Configuration
Generally, the structure of a blockchain is decided based on the use case it is created for. Development environment, consensus, concept, resource, management, security, and high availability are the priority aspects you need to consider before operating in production.
Furthermore, the primary questions to consider are:
Check out this article on the best blockchain node service provider.
After these considerations, here are some of the network configuration decisions you need to make before deployment:
Every organization will need expertise in management systems and its own production environment to operate the network efficiently. That said, based on your requirement and use case, you may own & manage the appropriate blockchain network components.
The Hyperledger Fabric Network Topology
Organizations participating in the Fabric decentralized network perform their own roles and manage different nodes. The chart depicts how the root organization is responsible for the consistency of the state and the network membership.
As mentioned earlier, Peers and orderers are the most critical nodes in the Fabric network. While Peers store the ledger that contains the transaction log and the world state, Orderers maintain the consistency of the state and create blocks of transactions. CAs connect the entire network using the certificate’s chain of trust.
The channel in the chart depicts a key abstraction in Hyperledger Fabric which forms a subnet in the network isolating the state and smart contracts. All the peers on the channel have access to the very data and smart contracts, and there’s no access outside the channel.
Non-production Environment Setup
To ensure that Hyperledger Fabric smart contracts and client applications are thoroughly tested and ready for a production environment, it is vital to simulate a multi-organization, distributed network setup during the development process. That said, things will get complicated in the production environment when said multiple-organization network components reside in different clusters.
To mitigate this complication, you may have one cluster network setup. Here, namespaces can separate the components of every organization logically and obtain a dedicated namespace, and all the Fabric components can then be a part of this namespace. By doing this, you are replicating a multi-org distributed network setup, which is more cost-effective and development friendly.
Other than this, you may also want to consider having an isolated environment for stages, tests, and others where a shared ecosystem can coexist at the same time. You can achieve this by having a different Fabric channel for each deployment stage. As having a different independent channel creates a separate ledger, it helps you to ensure that the data of the test environment is removed from the development environment.
Hence, taking this approach will enable you to obtain multiple channels having the same Fabric network components, and by doing this, you will also save infrastructure expenses by sharing the components (CA, orderer, peer, etc.) for all the environments.
Management Tools & Component Deployment
As you can see, it is no easy task to configure and deploy a fabric network to Kubernetes but it is an extremely important process. To add to the complexity, adding chaincode and channels to the Fabric network is as imperative as launching the network itself. To make matters easy, you will find the details about “Helm Charts” below that helps you automate and simplify said tasks.
You may also find the Kubernetes plugin “hlf-operator” plugin helpful in the process of launching a hyperledger fabric network in the blockchain.
Helm Charts
Packaged Helm Charts are available on the ArtifactHub community repository, which is easy to use and highly configurable. As of the date this article is published, you may find the versions of each ‘hlf’ mentioned below:
Remember that as of the time this article is written, these helm charts are forked from AID:Tech and presently aren’t directly connected with the Hyperledger Foundation project.
As mentioned above, the helm charts shared are highly configurable but may not fit every use case scenario, so you may have to modify them to fit your needs. For instance, you may have to use a storage service like ZDFS offered by Zeeve to store your node certificates and pull confidential information while deploying the nodes. To accomplish this, you will need to add the ‘ExternalSecret’ configuration file in the charts and perform the required changes in the value.yaml and deployment.yaml files.
Wrapping Up
Once you understand these prerequisite considerations to deploy hyperledger fabric in the blockchain network, you move on to the setup process.
Click this link to read the continuation and learn how to set up components, how to use CA to create MSPs, deploy orderer and peer nodes, and more.
Speaking of nodes, Zeeve is a blockchain infrastructure as a service platform that provides a robust automation platform to deploy your Hyperledger Fabric nodes and networks.
Deploy your Fabric smart contracts or applications on one of the many cloud platforms we offer. Our platform is cloud-agnostic, and we offer Google, AWS, Azure, and Bring Your Own Cloud services.
So what are you waiting for? Reach out to our experts for a free consultation today, and join us on Twitter, LinkedIn, and Telegram.