Operating a private permissioned blockchain to maintain a distributed ledger system presents several opportunities for businesses. In this blog post, we will explore an approach of running a private permissioned blockchain on a virtualized environment using VMware Fusion.
To get started, you will need a Mac computer with VMware Fusion installed. The process won’t work on Apple hardware with VMware’s own standalone products, so replace the latter requirement with the necessary product for your operating system if not on a Mac like us.
Once you have the software ready, we will download the necessary components for our private permissioned blockchain and virtualised environment. To start, download Hyperledger Fabric from the website, followed by the appropriate Docker Components – Hyperledger Cello, Hyperledger Fabric and Hyperledger Composer.
Next, run the virtual machine using VMware Fusion and create a new network switch in it. The new switch is necessary to provide a secure connection between the virtual machines and the host machine.
With this new configured private permissioned blockchain, we will now deploy a new node within the virtual environment. Within the virtual environment, the command “docker run –net=” will ultimately deploy the necessary code to build the new node.
Once the node is created, we will launch a new Docker image using the command “docker run –net= –publish=”. The image will contain network artefacts such as certificate authority and shared database components.
It is also necessary to connect all of the nodes together. To ensure a secure connection, each node will communicate with each other via secure SSL certificate. The certificate will authenticate users based on their identity and the node roles.
With the network in place, we will then write code to deploy the blockchain. To begin, specify the necessary functions within the code that we downloaded from Hyperledger Fabric. We will identify the peer nodes, admin users, and even specify the consensus mechanism the blockchain is operating under.
With the code specified, we will now utilize Hyperledger Cello to label and link the nodes within the blockchain. It will also create the appropriate resources for the nodes. It is important to remember that Cello is used to launch the nodes, but Hyperledger Fabric will be used to run the blockchain. This creates a level of abstraction within the environment that keeps the system secure and reliable.
Finally, launch the much needed Hyperledger Composer to test the code we just wrote. With it, we can see the whitepaper we specified come to life. It will create an interface for the blockchain and ensure that the nodes properly communicate with one another.
By following the steps above, we have been able to successfully spin up a private permissioned blockchain on VMware Fusion. This type of network affords businesses with a secure and reliable way to maintain a distributed ledger system.