Building Your Private Blockchain on Kubernetes with Geth
Now Reading
Building Your Private Blockchain on Kubernetes with Geth

Building Your Private Blockchain on Kubernetes with Geth

Building Your Own Private Blockchain on Kubernetes with Geth

You’ve got time. The problem is that your time is fragmented and scattered throughout your day. Everyone is crunched, especially those trying to launch a business or manage investment portfolios. Somebody needs to build an app that can identify and productively fill up all the wasted time in your day based on some method of optimizing your pathway through responsibilities. It would be like a Waze for task planning. As a temporary placeholder, I’ll call that hypothetical app Navi-Gator.

Nobody has done that, as far as I know, so there’s something you could do. A private blockchain would be the ideal backbone for that kind of project. A startup that has done something similar for the shipping industry is the Fr8 Network. They built their blockchain to minimize all the wasted space in partially empty trucks that drove 30 billion miles across the U.S. last year. Everybody wins: brokers, shippers, truck drivers, and customers waiting for packages.

That’s the sort of breakthrough thinking that blockchain enables, which is why anyone serious about saving time or conserving resources should devote some time to investigating blockchain.

Blockchain on Kubernetes

In this article, the third in my Blockchain on Kubernetes (BoK) series, I’ll delve into the requirements for and uses of private blockchains. While the first two blog articles introduced elemental concepts in BoK and Helm, now it’s time to get your hands dirty with your private blockchain. To be more specific, consider the business applications of running a permission Ethereum node off the central net, allowing you to transfer secure funding strings between endpoints, create smart contracts, explore block history and conduct other operations that have market-defining implications.

Before devoting the time and expense involved in connecting to the public Ethereum net, it is a good idea to experiment with your private instance of a blockchain, using Ethereum as a scaffold. To achieve that, you should probably take some time to get to know Geth, short for Go Ethereum, a widely used command line interface for running a private blockchain implementation.

Many online resources help you install and run Geth, like this walkthrough from Mercury Protocol. You will use Geth to create a Genesis block, the first block in your private chain, and set your parameters with fields like “difficulty” and “gasLimit” that specify how easy it is to add blocks. You’ll instantiate your data directory, mine your own private Ethereum (which has only the value you give it inside this node), generate peers, and start communicating between peers.

This is what you need to start experimenting safely and learn firsthand how to do common tasks like creating basic decentralized apps like Navi-Gator.

Creating a Private Blockchain on Azure

I’ll talk about serverless architectures in an upcoming blog. Still, using Microsoft Azure as your cloud client is even easier because you can use a pre-built template from the Ethereum Consortium.

azure.original
azure.original

You can configure both mining and transaction nodes, so your private functional blockchain is up and running in minutes. You will still need to be familiar with Geth commands, so I recommend a video tutorial, like:

or an interactive online course like this one from Udemy.

course.original
course.original

What Do I Do with My New Blockchain?

There are a few high-profile private blockchain projects under development now. The three best-documented projects are the Hyperledger Fabric project from Linux (which I will examine in an upcoming blog), the Corda developer training platform from R3, and a patient-centric healthcare exchange from Gem Health and Phillips. If you are straining at the limits of your imagination to figure out what to do with a private node of Ethereum, here are some real-world examples.

1) Profiting from predictions

Chess grandmasters see a few moves ahead and are ready for the most likely future. Bring that kind of advantage to business operations. If you could predict how the market would respond, that would be an enormous advantage for company leaders weighing potential outcomes for various software or marketing strategies. 

Smart contracts on Ethereum are the underpinnings of Augur, which facilitates peer-to-peer agreements and then rewards accurate predictions. Companies can thrive by making intelligent decisions based on uncertainties such as political probabilities, emerging global cultural shifts, and technological disruption vectors. It’s worth brainstorming around the concept of a stock exchange where investments are made in actual futures and without the need to share profits with proxies.

2) Solving the privacy puzzle

Nobody knows whether their company complies with the EU’s GDPR guidelines. The rules are poorly defined and still in flux. Enforcement is practically impossible for small to mid-sized firms operating in the US. Meanwhile, California and other local authorities are making their versions of data protection standards. Private blockchains built on Ethereum can resolve some of the thorniest of data-sharing issues, provide temporary access to customer data and prevent it from being copied indiscriminately. As marketers seek more accurate data into their CRMs and consumers try to balance customization with privacy, more companies will turn to blockchain to find solutions.

See Also
Saga Mobile Solana 1

3) Using Ingress for traffic control

Every private blockchain needs a load balancer to control the traffic coming in from an open network. For any deployment of Kubernetes clusters, Ingress serves as a set of rules that authorize access to the clusters and balance the loads. Ingress makes it possible for your app to achieve high reliability by eliminating a single point of failure where traffic enters the application. You’ll deploy multiple copies of Ingress as the access layer to your Kubernetes clusters. The Ingress node should be exclusive to your development team, so other business applications aren’t competing for network resources. You can see how the Ingress layer handles routing resource clusters in the following private Ethereum network topology.

Ethereum network topology.original
Ethereum network topology.original

Traffic and load balancing are managed by rules you define, and the NGINX ingress controller is one of the most common options, especially for Kubernetes on Azure. Ingress is essential for routing based on content, i.e., real-time personalization, and the related problem of gating information behind authentication without the user being inconvenienced or even aware of what’s happening behind the scenes.

Here’s a real-world use case of two content sets, a green and a blue website, where the sensitive information is served up to the user based on the origin of the web request. In this walkthrough, you create two files for each content set representing an entire website. Each file runs 5 pods for a total of 10 containers. Then you create an Ingress level that maps DNS names to specific services. The NGINX controller syncs up rules to pods, dynamically bringing up the green or blue website and the associated content.

4) Blockchain for a Better World

The world is full of problems. If you don’t know where to start in solving them all, start here. The UN’s 17×30 Initiative is a set of 17 goals that the organization calls for help in resolving before 2030. No. 1 on that list is to end poverty everywhere, measured by individuals living on less than US $1.25 a day. That is realistic and achievable, given that the UN met its prior goal of halving the number of people living impoverished from 1990 to 2015. A great example of how blockchain has been instrumental in attacking the issues on the UN’s list is the Impact PPA project, which created a decentralized utility made up of micro-grids to generate, store and deliver power for the 1.2 billion people living without electricity around the world.

5) What Else?

The blockchain examples above suggest business models based on prediction markets, new data privacy regulations, dynamic website content, and sustainability initiatives. Other creative applications include a platform that rewards users for creating popular videos, a peer-to-peer ecosystem for influencers, and an AI-driven freelancer ranking site using IBM’s Watson. We could include the Navi-gator app I proposed at the start of this article, which still needs a great deal of work in terms of ideation and development. No matter what kind of business problems you try to solve, you will get a new perspective on solving them by testing out the limits of your own private blockchain. The next step is to bring in the collective brain power of open-source developers around the world to solve your concerns in the form of Hyperledger.

Evolving the Blockchain

Hyperledger, as I mentioned earlier, is a blockchain development project created and hosted by the Linux Foundation. Although there are many leading technologists involved in finance, banking, IoT, logistics, manufacturing, and the tech world, no one is in charge, true to the distributed nature of the blockchain itself. In the next article, I will explore the limits of Hyperledger for helping you build permissioned blockchains, particularly the difference between Hyperledger Fabric and Hyberledger Composer. Blockchain seems to be still early in the hype cycle, with promises outweighing results. Hyperledger is about to change all that, converting the idea of blockchain from an arcane and futuristic curiosity into a business essential as common as a website.

What's Your Reaction?
Emocionado
0
Interesante
0
Neutral
0
No estoy seguro
0
Super Interesante
0