One of the new features of vRealize Automation in version 7.1 is the ability to scale out or scale in your servers. This sort of scaling is a horizontal scaling of the number of servers. For instance, if you had deployed a single web server, you can scale out to two, three etc. When you scale in, you can go from four servers to three and so on.
The use cases here could really vary widely. The easiest to get started with would be some sort of a web / database deployment where the web servers have some static front end web pages and can be deployed over and over again with the same configurations. If we were to place the web servers behind a load balancer (yep, think NSX here for you vSphere junkies) then your web applications can be scaled horizontally based on when you run out of resources.
The example that we’ll see in this post are done manually, but you could get really elaborate and have a monitoring solution like vRealize Operations, trigger a script or vRO workflow whenever CPU % got too high on your web servers and automatically scaled out using the vRA API. This would be like a homemade version of Amazon’s Auto Scaling Groups in AWS.
Scale a vRealize Automation Item
To get started, I’ve chosen a multi-machine blueprint that I downloaded from vmtocloud.com that deploys some Docker hosts and a Docker Swarm server to manage them. I’ve placed these servers in an on-demand network through NSX. For your deployment tests, any multi-machine deployment will work fine, but I wanted to show NSX and the great work done by Ryan Kelly over at vmtocloud.com some love.
To start I’ve deployed a catalog item that has a single Docker host (Docker 15 in the screenshot) and a Swarm Host (Swarm01 in the screenshot). We’re going to scale out the Docker host because evidently, we’ve got so many containers running, we need another host. To start click on the Actions dropdown on the item.
Under the Actions drop down, choose “Scale Out” if you wish to add additional servers and “Scale In” if you wish to decrease the number of servers used.
Once the Scale Window appears, select the object that you wish to scale and change the number of virtual machines to your desired amount. The number of machines provisioned is still dependent upon the rules that were created during the blueprint creation. Remember this if you find that you can’t scale out an item, check the underlying blueprint to ensure that more than one virtual machine is available to be deployed.
Once you hit “Submit” a summary dialog window will open to show you what the changes to the item will be when finished. Click OK if your settings look correct.
When the deployment finishes, the vRA item should show the additional objects that you have requested to scale out to. In this case an additional virtual machine named “Docker16” was deployed.
It’s important to note that when scaling out an item through this process, event subscriptions still run as they should. For example, whenever a machine is deployed in my lab, a vRO workflow is kicked off through an event subscription that adds the machine to Active Directory. Scaling out still executes this event subscription workflow.