This is something that has gone a bit under the radar generally speaking (even mine!). A couple of days ago, VMware released its vRealize Cloud Client. But what is it you ask?
Well, essentially cloud client is a tool built to automate various tasks within vCAC 6.X, like:
- Creating blueprints / catalog items
- Requesting catalog items
- Activating vCAC Actions on existing items
- Creating IaaS Endpoints
- Automate SRM fail-overs under vCAC management(!!!)
- Launch vCO Workflows (!!!!)
- Write scripts using cloudclient cli
A Bit of Background
So, this awesome great tool, was initially built internally to help support some of the complex automation we do around here at VMware R&D , hence, cloudclient is now in version v3.0. Personally, I like tools like these, that come out directly from an engineering necessity. Mainly, because they come from the purest of use-cases – our own VMware internal use-cases.
Unlike vCAC CLI which went out as GA with vCAC 6.1, and is also more of a cli tool to operate vCAC’s REST APIs, CloudClient lets you do a lot of things within vCAC , with simple, one-lined commands!
What Can You Use it For?
From a customer perspective, first this tool brings great openstack-novacli-like functionality and can help your developers to consume Infrastructure as a Service, without interacting with the vCAC GUI, and to automate the request of machines using scripts.
So lets say I want to test a build using Jenkins, I can call cloud client from any shell (cmd / linux) or external script, and request a predefined catalog vm for my testing automatically. After that, you can list your items and operate on the VM / MutliMachine environment you got with cloudclient.
Using Cloud Client
First, grab cloudclient ! After you’ve done that, you’ll need to make sure that wherever you run it (bash / cmd ) ‘java’ is set as an operable program – meaning , you have the “C:\program files\Java\jre7\bin\” folder configured to your ‘Path’ environment variable so you can run java.exe from where you’re running cloudclient.
After everything is set, just run cloudclient.bat / cloudclient.sh (and accept the EULA once, be patient! this awesome cli thing is FREE ! )
Once you accepted the EULA, you should see this:
Next , if you’re wondering about the options in this thing, is to type ‘help’ which will show you all commands available with CloudClient.
Keep in mind, that you can always use the Tab key to auto-complete what commands can come next! Also, if you’re clicking Tab and nothing appears, just try adding minus signs like: “vra command –” and then press tab to see what parameters are available.
In order to log-in to vRA, we’ll type:
[code]vra login userpass –user firstname.lastname@example.org –password MyPassword –server vcac-va.domain.com –tenant mytenant
If you’ve done it right, you should get a ‘Successful’ prompt back! For out next example, lets list all available catalog items:
[code]vra catalog list[/code]
And finally, to make a request happen, we’ll need to perform a command similar to this:
[code]vra catalog request submit –groupid vmdemo –id CentOSx64 –reason Because –properties vminfo.project=ERP,provider-VirtualMachine.CPU.Count=2,provider-VirtualMachine.Memory.Size=2048[/code]
Inspecting this command carefully, you can see i’ve submitted a couple of properties with the request:
So CPU Count & Memory Size are regular vCAC (vRA) properties, though when submitted through API , they need to have the ‘provider-‘ prefix , which is the same as saw when exploring the REST API through Firefox.
Some behaviour changes with 6.0 / 6.1 – In 6.1, if CPU/Memory are not set, request will go through with minimum CPU/Memory for the blueprint. In 6.0 (though I haven’t tested it) I believe the request will fail. So FYI :)
I must say, this is just a very short introduction to cloudclient and it’s capabilities. So go ahead, explore it, and if any more posts are needed – i’ll be sure to write them.
So leave your comments below! If you want, the official download page for CloudClient is linked Here