How to Deploy your Hyperledger Fabric PoC Application to Cloud
So, you’ve learned how to build a Hyperledger Fabric blockchain network, and you’ve also learned how to create chaincode in Node.js or another language that Fabric supports and you’ve learned how to develop a web application on top of such a network.
However, there’s a constraint, they are in your Ubuntu OS or virtual machines. Stakeholders and other intended parties would not be able to try it or use it. In this case, they do not generate value other than proving you have such skills. Therefore, we either need to find or buy a few servers and deploy the network across these servers to form a blockchain network and to run its applications OR rent some servers from a cloud service provider and deploy our Fabric blockchain onto these servers. The second option would be more economical and efficient. So, let’s go with this option.
For this to happen, we should take the following processes:
Process A — Identify a cloud service provider that fits your need. Amazon AWS is an option, Digital Ocean (DO) another. And sign up with one. In this article, I’ll write about DO.
Process B — Set up nodes/servers
Select OS and its configuration for your droplet ( server ).
I’d recommend Ubuntu 16.04 LTS with at least 4GB of RAM though 8GB of RAM would be more desirable.
And have three droplets ( servers ) so that we have at least 3 minimal number of nodes.
Process C — Create user account
Use the “Console” option upon logging into Digital Ocean to login as root and create some user account.
How to access your droplet?
If you’re on Windows OS I have a technique that will make your life easier.
Process D — Download and Install Hyperledger Fabric and then Test some Sample Applications
Process E — Copy your chaincode and associated files to appropriate folder under your Fabric installation (technique)
Process F — Pull docker image for your web server that supports your server side scripting language
Process G — Create and set up directory structure for your web server
Process H — Copy your server side source code to appropriate directory under your web server (technique)
Process I — Start your REST API server ( vital process/service )
Process J — Create a docker container for your web server
Process K — Start/Mount your web server docker container ( vital process/service )
Bingo! Now, your web application integrating your chaincode that runs on your Hyerledger Fabric is ready!
Repeat these processes for your droplet 2 and 3 or more…
Once done, you could use docker swarm to turn these droplets into a blockchain network ( the first set of my Hyperledger Fabric training materials covers that ).
Hope the above provides you with a clear road map on Hyperledger Fabric cloud deployment.
In the meantime, for a small fee you get the details of four techniques for some of these important processes so that you can get them done much quicker and at ease.
Btw, I assume you have read my piece titled “Build a Blockchain PoC Application using Hyperledger Fabric” already ( https://medium.com/coinmonks/build-a-blockchain-poc-application-using-hyperledger-fabric-6bbe633c2204 ).