My notes and ramblings, normally about automation

REST - Configuring VMware Cloud on AWS EDRS Policies

· Read in about 3 min · (461 Words)
REST VMware AWS

There’s been a new batch of features released for VMware Cloud on AWS!

While there’s a lot of important new features, there’s one in particular I’d like to focus on. This new feature is called Elastic DRS (EDRS). EDRS allows you to automatically right-size your SDDC for the current workload demand and do it all by way of a policy. Even better, there are RESTful APIs to help you automate the configuration of this policy!

More information about EDRS can be found on this blog by my teammate, Frank Denneman: Introduction to Elastic DRS

Let’s check out some of these new REST APIs for EDRS.

EDRS Policy Management API

There are a couple different methods we can use to view and update the EDRS policy for our SDDC. However, before diving right into retrieving a policy, let’s start a little higher and get a more holistic view of an SDDC’s configuration.

We can retrieve the EDRS policies for all of the clusters in our SDDC with the following method:

GET /vmc/autoscaler/api/orgs/{{orgid}}/sddcs/{{sddcid}}/edrs-policy

The response should read like the following: Example Output: SDDC EDRS Configuration

To obtain the EDRS policy for a single cluster, we’ll need to reference the cluster_id property from the above call. This method will be like the following:

GET /vmc/autoscaler/api/orgs/{{orgid}}/sddcs/{{sddcid}}/clusters/{{clusterid}}/edrs-policy

The response should read like the following: Example: Single Cluster EDRS Configuration

Now that we can retrieve the EDRS policy, we can now make updates to the policy as well. We can take the prior response and use that as the body for the next method. When you’re making modifications to the prior body, keep a couple things in mind:

  • enable_edrs – Boolean, input should read either true or false
  • max_hosts – Optional, input cannot be higher than the maximum number of hosts per SDDC Cluster
  • min_hosts – Optional, input cannot be lower than the minimum number of hosts per SDDC Cluster
  • policy_type – Optional, input should read either performance or cost. Performance is the default value.

Example Body:

{
    "enable_edrs": true,
    "policy_type": "performance",
    "max_hosts": 16,
    "min_hosts": 4
}

Example: Example: Making an EDRS modification to a cluster

Another thing to note about this method, which you’ll notice by the status above, this runs asynchronously and outputs a running task.

Summary

Elastic DRS is one of the latest features to be added to the already incredible VMware Cloud on AWS service. EDRS allows you to automatically right-size your SDDC for the current workload demand and do it all by way of a policy. In keeping with our API-first focus, this feature comes complete with a couple RESTful APIs to help manage the configuration in an automated way. We covered a couple samples in the above post and each of these are available as part of the vSphere Automation SDK for REST. Download it today and get started integrating these new APIs into your existing processes and/or workflows!