DEV Community

Dave Nugent ๐ŸŒ‰
Dave Nugent ๐ŸŒ‰

Posted on • Updated on

Massively Scalable Realtime Voting Deployed on Hybrid Cloud

Hybrid cloud deployments offer the easy scaling of public cloud services combined with the privacy and security of an application deployed on a private cloud or on a private server.

In this article, we'll walk through how to deploy a Node.js application that allows users to vote and see a visualization of results. This application will be hosted on a Red Hat OpenShift cluster, which can be deployed on a private or public cloud. We'll also use Twilio Sync, a public cloud service that is scalable and will manage the real-time communication between browsers.

Who should read this post?

This post & lab is intended for developers, software architects, DevOps professionals and anyone who wants to know more about Kubernetes or Red Hat OpenShift.

Table of Contents

Step 0: Get your Red Hat OpenShift Cluster

Red Hat OpenShift is the Enterprise Kubernetes platform. In order to get the benefits of running Red Hat OpenShift you'll need to spin up multiple nodes and pay for a license -- but today, we'll be taking advantage of a free cluster offered by IBM Cloud through their Open Labs project.

1. Sign Up for IBM Cloud. This will give you an account that you can use to get your cluster.

โ—โ—โ— Remember to confirm your email address by clicking the links that are sent to your email address.

2. Sign Up for Twilio

Twilio is a cloud-based messaging service that we will be using to create a chatbot. We'll be using their Autopilot service, which is free, but the link above will give you some credit that you can use for other Twilio services in the future.

3. Launch IBM's Red Hat OpenShift Lab

Visit the IBM Open Labs page and click on Launch Lab under Lab 1.

Red Hat OpenShift labs page

โ„น๏ธ Having issues accessing the OpenShift Labs page? Try clearing any cookies from ibm.com and logging in again, or using a private browser window. Sometimes, cookies can confuse the Lab bot.

Step 1: Get Started with Twilio Sync

Create your Twilio account and create a Twilio Sync document.

Step 2: Deploy Your Application to Red Hat OpenShift

Red Hat OpenShift makes it ridiculously easy to deploy an application from a GitHub repo, even if you don't have any experience creating a container image. In fact, it will create the image for you using its source to image feature. In this step, we'll use the code we've already been looking at as well as source-to-image in order to deploy our hybrid cloud application.

3. Here is Lizzie's GitHub: https://github.com/drnugent/twilio_voting (we'll use the tree/3stocks branch)

Step 3: Link it all Together: Run your Hybrid Cloud Application

Conclusion & Next Steps

Congratulations on deploying our massively scalable real-time voting application in a hybrid cloud environment! ๐ŸŽกโ›ฑ๏ธ๐Ÿš€ Just to cover what we've done:

  • We deployed a Red Hat OpenShift cluster on IBM Cloud, running Kubernetes to make effective use of our compute resources
  • We deployed an application directly from our GitHub repo, automatically building a container image and spinning it up into our production environment
  • We used Twilio's cloud services to

In future posts, we'll explore more about Red Hat OpenShift, hybrid cloud deployments, and cloud native software architecture. Please if you'd have ideas for future integrations!

Resources

Top comments (0)