The vSphere Automation SDK for Ruby has been around for almost four years now. Originally released as the vCloud Suite SDK for Ruby in 2015, this was the first VMware supported Ruby SDK and was used to interact with the REST based vSphere 6.0 API endpoint. Once vSphere 6.5 was released, all of the vCloud Suite SDKs were updated to support that version of vSphere and were renamed to be the vSphere Automation SDKs. This was also the release which introduced these SDKs to GitHub and made them available as open-source resources! Due to that, and fast forwarding a bit through adding support for vSphere 6.7, VMware Cloud on AWS, and NSX-T, we have our latest release!
This new version of the vSphere Automation SDK for Ruby is a big one for two main reasons. One, this SDK is now available on RubyGems! Originally, this came through as an issue on the repository and was, by far, the most active issue we’ve had to date. We listened to the feedback and made it happen. The migration over to RubyGems is notable because not only does it offer a new simplified installation process, it also allows for easier integration into other projects! A sincere thank you to everyone that voiced their feedback.
The second big reason, this is the first vSphere Automation SDK to have been created using completely open-sourced tooling! This allows us to really streamline the process of being able to bring our consumers the latest and greatest API updates in a fraction of the time. It also allows you to create the SDK yourself, in an easy and predictive manner.
To highlight how much easy it is to create this SDK, we can cover it in just a few steps. We start by using the VMware-OpenAPI-Generator to pull down the available vSphere REST API specs and convert them to OpenAPI specs. From that point, we use the OpenAPI-Generator to convert the OpenAPI spec into a Ruby based client library. That’s it, it’s created!
I mentioned a simplified installation process earlier, let’s walk through it real quick.
If you remember the prior blog post, the installation process was a multi-step process. We had to clone the repo locally, install an upgraded version of Ruby through a package manager of your choice, install Bundler, build our Gem, then finally install the Gem itself.
This version of the vSphere Automation SDK allows us to go directly to the gem installation process. We also have the ability to singularly install only the Gems for the specific services we’re looking to develop against. (Note: vsphere-automation-cis is a dependency of each Gem because this is the service responsible for authentication.)
To install the SDK on a MacOS system, open terminal and run the following command:
gem install vsphere-automation-sdk
There is one caveat to this new install method, the samples! When installing this SDK through RubyGems, the sample code will not also be provided. The GitHub repository will continue to contain a wealth of sample code.
As with all of our vSphere Automation SDKs, we continue to welcome any and all issues and community contributions to the GitHub repo!
The vSphere Automation SDK for Ruby has received a fantastic new update. This new version of the SDK has been created completely with open-source tooling and has also been released on RubyGems! These updates allow us to streamline the process for our developers and partners to continue developing against vSphere, VMware Cloud on AWS, and NSX-T environments with the most up-to-date resources and to do that as quickly as possible.
More information about this release can be found: vSphere Automation SDK for Ruby GitHub Repository