vRO (VMware Aria Automation Orchestrator, formerly vRealize Orchestrator) is one of the best automation tools. It allows you to connect any information systems built on different technologies and interacting via different protocols into a single system. For the most common systems and protocols, there are already ready-made plug-ins (plug-in modules) and/or process packages that provide vRO with access to the functions of these IT systems.
The standard vRO delivery includes integration with the VMware vSphere virtualization platform. The presence of a vRO plugin for interaction with vCenter greatly simplifies working with this platform. oVirt is also a virtualization platform, it is a free “analog” of VMware vSphere, but vRO does not have built-in oVirt support (and will not), nor ready-made plugins from third-party developers. You will have to implement integration with oVirt yourself, this can be done in two ways:
- Develop a package of processes interacting with oVirt via REST API. To perform any action, be it reading information or creating/updating an object, a REST request is generated and sent to the oVirt server. After creating the minimum of elementary processes necessary for your tasks, you can develop more complex processes from them. Most external systems are integrated with vRO in this way;
- Develop an integration plugin that provides vRO with capabilities similar to those of the standard VC plugin. Plugins are specialized Java applications that extend the functionality of vRO with additional object classes for developing scenarios. Each plugin can also contain a set of workflows for solving some standard tasks.
Plugin development
Since we really wanted to work with different virtualization platforms in a single style, then, despite the fact that plugin development is much more difficult, we chose this implementation option. The plugin was developed using vRealize Orchestrator Plug-in SDK and oVirt Java SDK.
The plugin also supports tree display of objects and their properties in the vRO inventory and in the object selection tool. oVirt does not yet distribute virtual machines by directory structure, so they are all displayed in one place. This is inconvenient for users when manually selecting VMs, perhaps in future versions of the plugin, distribution by folders will be implemented using additional tags.
It made no sense to develop an oVirt plugin, the classes of which would completely repeat all the methods and properties of objects from the VC plugin. These two virtualization platforms differ in both their internal structure and capabilities. However, for convenience, at the top level (at the plugin and sdk connection level), the methods are made similar to the VC plugin methods.
For example, searching for virtual machines by name mask and rebooting them:
// VCPlugin | // OVPlugin |
The code for changing the number of vCPUs for a given VM, in this case the code is already very different, due to differences in the structures of the API classes:
|
|
Installing and updating the plugin
- Upload the latest version of the plugin .vmoapp file;
- Log in to vRO Control Center (https://<vro-server>/vco-controlcenter/) as root;
- Open the Manage Plug-ins page;
- Click “Browse” and select the plugin .vmoapp file;
- Click “Upload”;
- Read the plugin information, if you are satisfied, accept the license agreement and click “Install”.
- The plugin will be installed or updated.
- Attention! After installing/updating plugins, the vRealize Orchestrator server service automatically restarts (vRO is approximately unavailable for 7 – 10 minutes);
- Make sure that the correct plugin information and version are specified on the “Manage Plug-ins” page;
- If you updated the plugin, changes to classes, attributes, and methods will be available only after clearing the browser cache and reloading the vRO page;
- Run the “Add a oVirt connection” process to create a new connection:
- In the oVirt API URL field, specify the full address to the API (for example, https://<ovirtengine-server>/ovirt-engine/api);
- The username must be specified with the domain, for the administrator it is admin@internal.
Project development
The current version of the plugin does not use all the capabilities of the oVirt API, we will be finalizing the plugin and expanding its functionality. Be sure to write about all the errors you notice, missing or non-working methods, as well as any other wishes you may have in Issues on the github project page or in the comments to the article.
The main problem in developing this plugin was the lack of detailed documentation on working with the vRO plug-in SDK. The manuals and examples published online are intended only for initial acquaintance with the SDK. If you or your technical partner have access to the full documentation, please share it!