The latest release of SimpliVity OmniStack 3.5 provides a new feature that allows administrators to automate SimpliVity OmniStack Data Virtualization Platform tasks through the OmniStack REST API. The automation provided by the REST API is remarkably simple and easy to use, yet very powerful, allowing administrators that may not be programming experts to create scripts which make day-to-day tasks easily repeatable and error free. This first release includes a number of useful functions including:
- SimpliVity Rapid Clone a virtual machine (VM)
- Create a backup policy
- Assign a backup policy to a VM
- Backup a VM
- Restore a VM
- Move a VM between data centers in a SimpliVity Federation
OmniStack REST API also provides an easy way to generate reports on different aspects of a SimpliVity environment. It’s simple to create custom reports for things like capacity utilization and complete backups across all virtual machines in the SimpliVity Federation.
It also provides easily consumable documentation by accessing any OmniCube Virtual Controller (OVC) in a SimpliVity Federation with a web browser. OmniStack REST API calls are documented with the required and available parameters, which can be passed to the calls. The API calls can also be executed directly from the web based interface. This means you can see the expected impact of your calls, before you actually implement them.
Let’s take a look at a quick example of how an administrator could automate provisioning a new virtual machine using the OmniStack REST API. Cloning a VM is usually a quick and simple task with SimpliVity Rapid Clone and the vSphere Client, but there is usually a bit more to the process other than just creating a clone like assigning a backup policy to the new virtual machine. Here is an example workflow for cloning a VM using SimpliVity Rapid Clone, assigning a backup policy to the new VM, and finally powering on the VM:
The REST API calls to complete the process of provisioning a new VM are as follows:
- GET /api/oauth/token – This call authenticates the user and issues a token which is used to authenticate other calls.
- GET /api/virtual_machines – A filter is passed with this call to obtain the VM ID for a VM in the SimpliVity environment.
- POST /api/virtual_machines/vm_id/clone – Use SimpliVity Rapid Clone to clone a virtual machine (vm_id).
- GET /api/policies – Gets the current backup policies configured in the federation along with the associated policy ids.
- POST /api/virtual_machines/vm_id/set_policy – Sets the backup policy of a virtual machine.
As I also mentioned, the REST API can be used for reporting on the SimpliVity environment. For example, a report on the available backups, the date/timestamp of the backup, the location of the backups, and the status of each backup can be easily generated for a specific virtual machine or for all virtual machines in an environment.
This report was generated with just a few simple lines in a script using the /api/virtual_machines and /api/backups REST API calls to retrieve data from the SimpliVity Federation. The report could be scheduled to create an HTML report that is published to an internal site or as an output to an administrator’s email.
The OmniStack REST API is just another tool in the datacenter infrastructure administrator’s toolbox to automate task or report on the status of the environment – all with a purpose of simplifying IT.
Hersey Cartwright is an IT professional with extensive experience designing, implementing, managing, and supporting technologies that improve business processes. Hersey is Solutions Architect for SimpliVity covering Virginia, Washington DC, and Maryland. He holds the VMware Certified Design Expert (VCDX-DV #128) certification. Hersey actively participates in the VMware community and was awarded the VMware vExpert title in 2016, 2015, 2014, 2013, and 2012. He enjoys working with, teaching, and writing about virtualization and other data center technologies. Follow Hersey on Twitter @herseyc.