I make no bones about it, bare-metal nodes in AWS is pricey. The questions becomes if we want to save money and have DR with AWS, how do keep the number of nodes small until we failover?
In AWS all the Nutanix rules still apply. We need a minimum of a three-node cluster to get started. If we have enough storage capacity, we can keep accepting replications from an on-prem cluster and not worry about CPU and memory constraints. You could also use your on-prem AHV supported backup software to backup directly to S3. Then when you have an outage, you could quickly build a Nutanix Cluster in AWS and start restoring the data to that cluster.
I was a asked to automate the process of adding nodes to a small Nutanix Cluster in AWS and then start a failover using Leap (DR runbooks) and X-play(automates actions based of events and alerts) in Prism Central (PC). The below video is what I came up with.
The code to add a node via API from the Cluster portal is listed here:
You can change the number of nodes that you want to add or just make the call multiple times.
The API call to the Leap – Recovery plan can be a little daunting. There is an easy way to get the code for it. In Google Chrome if you open the developer tools (Ctrl+Shift+I) and as you hit the failover button you will see the batch API request. The general section will give you the API call and the Payload section will have the API body if you view the parsed section. From here you just have to copy and past the code into X-play and you’re on your way.
Once difference that I would make in the video is to change the event to fire when cluster services are down. There is really 100 different ways to do this. I think main point is that there is API for the Clusters portal and X-play is really flexible on responding to events and alerts. When you combine the two, magic happens.
If you have questions, please leave comments.