Archive for April, 2015

Advanced Gating Rules in vRealize Code Stream

Recently VMware released vRealize Code Stream which is an application release automation and continuous delivery solution that allows developers and operations teams to release software more frequently and efficiently, all the while leveraging their investments in existing developer and operations tools. It offers Pipeline Automation to model any release process for any kind of software, Artifact Management to assure the right artifact versions for each release and a Release Dashboard to get full visibility into your release process.

One of the key features in vRealize Code Stream is the ability to define Gating rules which allows to control what happens between individual stages in a pipeline. Let’s say you want to run an automated test, or a manual approval is required before you deploy into a production environment. vRealize Code Stream lets you define gating rules between stages to allow for these types of validations.

If the gating rule is not configured, then the process proceeds to the next stage regardless of the outcome of tasks in the current stage.

gating

The default gating rules are  Test Acceptance Threshold and Approvals.

Advanced Gating Rules– At the moment a specific Gating rule can either be Approval based or Test acceptance based but not both at the same time. So if I need to achieve both (for example run some automated Selenium test and also get approval) then how can I achieve that?

In the future we are planning to introduce a complex Gating Plugin which could take many options based on any task output and take a Boolean decision (approve/reject) based on options configured. For now we can write a vRealize Orchestrator workflow which can take task output as one of the input and approval workflow name as another input. The idea here is that you can create one workflow where you include a workflow element which is tied to Test Threshold workflow followed by another workflow element which is tied to the Approval workflow. All you need is the same input which you have in Test Threshold as the input parameter to this new workflow as well. Tag this new workflow as vRCS_GATING_RULE (global tag). To tag a workflow in vRO just run this workflow: “Library > Tagging > Tag workflow” and enter the tag as vRCS_GATING_RULE.

After you tag your workflow in vRO with vRCS_GATING_RULE, when you configure your gating rule in the pipeline template and select “If outcome of a vRO workflow is successful”, you will then see your new workflow appear in the same selection box as “Approval” and “Test Acceptance Threshold”.

If you select the newly added workflow, it will help you achieve a more complex Gating rule to include both an approval step and an automated test step at the same time.

Here is the vRO workflow for your convenience:

http://tinyurl.com/lqp996e

Jobe done!

Advertisements

, , ,

Leave a comment

Deploy OVA/OVF from vRealize Automation Portal

Lately I had to deliver a use case around automating the deployment of an ova appliance, more specifically IBM WebSphere DataPower. So spin up a virtual image, add to network etc…
Luckily I managed to find and ova/ovf plugin for vRealize Orchatrator I can use: https://solutionexchange.vmware.com/store/products/vmware-vcenter-orchestrator-ovf-transfer-plug-in from one of VMware’s partners called SVA (http://www.sva.de) and I would like to take this opportunity to thank Sascha Bitzer and Christian Strijbos from SVA for putting this plugin together and improving it based on my feedback.

The latest version of the this plugin is returning VC:VirtualMachine object from the importVM action, which is great because then I can then use this output parameter to feed into other workflow steps such as for example powering-on the ova once it has finished deploying, which is what I am doing in this vRO workflow:

vro1

The scriptable task’s job is to retrieve the VM name from the array output coming from the previous “Get Virtual Machines by name” workflow step. It will always be one VM so no need for an array but I was too lazy to change it:

System.log(“found VMs ” + vms.length);

for (var i in vms) {
var outputvm = vms[i];
}
System.log(“out vm = ” + outputvm);

In vRA Portal, I then used the Advanced Service Designer (ASD) to add a new Catalog item which looks like this:

ova

So please first install the plugin from VMware Solution Exchange and then you can optionally use my workflow which is attached here for your convenience:

http://tinyurl.com/ofsmfbr

Jobe done!

, , ,

Leave a comment

vRealize Application Services Fails to Connect to vRA Cloud Provider

Recently I was using vRealize Automation (vRA) 6.2.1 with vRealize Application Services (vRAS) 6.2 and I encountered a strange issue. When I went to vRAS > Cloud Provider and select “Validate connection” I got “Could not connect to the Cloud Provider at https://(Your_vRA_IaaS_VM): BusinessGroup not found id= dd55fda1-df67-4b38-b93e-f6301f9e9696 – java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING”.

This used to work so I was a bit annoyed the night before a big demo I was supposed to be delivering.

I tried unregistering vRAS with vRA “unregister-vcac-server” and registering again with this command: “register-vcac-server –componentRegistryUrl vCACServerURL –ssoAdministratorUsername UserName –ssoAdministratorPassword Password” but the problem remained. Strangely when I restarted the entire vRA IaaS Windows box then the error in vRAS would disappear for a couple of minutes but then come back again.

This got me thinking it was a timing issue as vRA as a platform is “time sensitive” so all components need to be synched on the same time zone with similar NTP settings. And indeed when I looked at the Windows IaaS machine it was on Pacific Time and then when I SSH’ed into the vRAS appliance it was on UTC time so quite a big difference.

So I did the following:

1. Set the timezone on the vRAS appliance to the same as the vRA appliance, vRA Identity Appliance and IaaS Windows VM:

PDT

2. Login as darwin_user into a Putty session to the host name of your vRAS server. Then sudo up to root by typing su – and press enter then enter the root password.

3. Change directory to etc by typing cd /etc and press enter. Edit the ntpd.conf and add an ntp server type vi ntpd.conf and press enter. Click insert to change the server address to your NTP time source and hold SHIFT and press ZZ to save it:

ntp

4. Now type “chkconfig –level 35 ntp on” and press enter. Then start the NTP service: “service ntp start”.

5. Restart the vRAS service: “service vmware-darwin-tcserver restart”. You should be good to go now.

6. On the vRA IaaS Windows VM run the following command in a PowerShell windows as admin:

“w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL”

and then:

“Stop-Service w32time” followed by “Start-Service w32time”

Remember more than 1 minute time difference between vRA IaaS VM, vRA appliance, vRA Identity Appliance and vRealize App Services may cause these type of issues so get your “timings” right.

In vRAS Cloud Provider you should now see the following:

provider

Job Done!

,

Leave a comment