nginx

Okay, Wrecking Crew Inc. is not a real company but a fictitious one that was used during Alan Renouf and Li Zheng's VMworld session, #INF5803 - Deploy Hundreds of VMs Instantly via Forking (aka vSphere Instant Clone). During the session, Wrecking Crew Inc. was described as a modern online gaming company who was about to launch a new product. They found out that their game was going to be more popular than they had originally anticipated and needed to be able to quickly spin up a large number of instances of their game to handle the load.

Though this was a fictional company to help set the stage for the demo, the underlying use case is an actual challenge for many of our customers. One of the examples that Alan used was the traditional Black Friday sale which occurs on the Friday after Thanksgiving in US. As you can imagine, being able to quickly scale up your online application based on customer demand can really give retailers an real edge over their competition. In todays world, waiting a few additional seconds for a site to load can mean the difference between a sale and customer going else where for their business. Online retail is just one of the many industries and verticals that can easily benefit from the Instant Clone capability.

To help further demonstrate the use case, a recorded demo was shown utilizing the new PowerCLI Extensions which provides access to the Instant Clone feature from an Automation standpoint. I actually built the demo for Alan and Li's session and I thought I would share some more details along with the video in case you were not able to attend the session in person, which I was not able to do.

I wanted to also give a quick shoutout to my buddy Rawlinson Rivera for his help with Intel and getting us access to their 64 Node NVMe VSAN Cluster. Our friends over at Intel were kind enough to allow us to quickly record a demo before they had to pack and ship the hardware to San Francisco for VMworld.

To provide some additional context on what you will see in the video, a diagram is provided below. The environment initially consists of two Photon VMs which runs the Consul Cluster which provides service discovery and configuration capabilities and the Nginx Load Balancer which is highlighted in the purple and blue box. Each of those VMs run their respective application which runs inside of a Docker Container and is highlighted in the smaller boxes. On each ESXi host, we have Photon VM which contains our Node.js application that we will be Instant Cloning from. This Photon VM is also referred to as the Parent VM and where all the new forked children VMs will be spawn off of.

This Photon VM also runs an instance of Consul, Registrator and the Node.js application inside of a Docker Container. As new instances are brought online which is highlighted in the black box, they will automatically register themselves with the Consul Cluster. As the Docker Containers are started up, Registrator will be notified to automatically add the new instances to the Nginx Load Balancer, making our application servers available for use immediately. When our application server powers down, Registrator will automatically detect that the Docker Container for our Node.js application is no longer running and automatically unregister it from the Nginx Load Balancer. To simply scale up or down the application, it is simply Instant Cloning our Photon (Parent) VM and powering it on or off, there are no additional steps required.

Without further ado, here is the video of the demo. If you want additional commentary and you attended VMworld US but could not make it to Alan and Li's session, you can now watch it online here. This session will also be repeated in VMworld EMEA for those attending in a couple of weeks. I would highly recommend you check out the session as there is a lot of awesomeness in the session along with technical deep dive of the Instant Clone technology.

Last week at VMworld, I co-presented a Technical Deep Dive on vSphere's Content Library feature (INF5106) which was first introduced in our vSphere 6.0 release. One of the demos that I showed case was the 3rd Party Content Library capability which allows you to publish your own Content Library without the need of a vCenter Server. For those of you who attended in person, you may have recalled that I had used a Docker Container to quickly standup an Nginx endpoint for hosting my 3rd Party Content Library.

I have just published my Docker Container called lamw/tp-content-library-demo on Dockerhub . If you wish to build the Docker Container yourself, you can take a look at my Github project vmworld2015-3rd-party-content-libraryfor more details. You can also subscribe to my other 3rd Party Content Library which includes variety of Nested ESXi OVF Templates, for more details you can take a look at the blog post here.

Requirements:

Linux Container Host for running the Docker Container like VMware Photon for example

vSphere 6.0 environment

Instructions:

Step 1 - Download the 3rd Party Content Library Docker Container by running the following command:

docker pull lamw/tp-content-library-demo

Step 2 - Start the Docker Container by running the following command:

docker run -d -p 80:80 lamw/tp-content-library-demo

Step 3 - Verify that the Nginx webserver is properly running by visiting the following URL (replace with the IP Address/Hostname of your Container Host): http://192.168.1.143/vghetto/

If everything was setup correctly, you should see a variety of files from our sample 3rd Party Content Library along with the various JSON metadata files describing the library itself.

Step 4 - To subscribe to the 3rd Party Content Library, go ahead and create a new Content Library using the vSphere Web Client and start off by specifying the name of the Content Library you wish to create.

Step 5 - Next, go select the "Subscribed content library" option and paste in the following URL: http://[CONTAINER-HOST-IP]/vghetto/lib.json which is the 3rd Party Content Library endpoint running in our Docker Container.

Step 6 - Lastly, go ahead and select a storage backing for the library. In this case, I have selected a vSphere Datastore and then click finish to create the library.

Once the Content Library has successfully been created, we can then click into it to see that we are no subscribing to the 3rd Party Content Library that we had just hosted on our Nginx Docker Container as seen in the screenshot below.

If you are interested to learning more about the Content Library feature, we will be repeating the Content Library Technical Deep Dive session at VMworld EMEA for those of you who will be attending. Hope to see you there!

Primary Sidebar

Search this website

Author

William Lam is a Staff Solutions Architect working in the VMware Cloud on AWS team within the Cloud Platform Business Unit (CPBU) at VMware. He focuses on Automation, Integration and Operation of the VMware Software Defined Datacenter (SDDC).