Monthly Archives: September 2014

Using vSphere Tags via vCO

As vSphere 5.5 currently stands, the only way to interact with vSphere tags is via PowerCLI.   This leaves vCO out of the party without some effort to build it manually.   I am working on a solution where I wanted to include tags in some automation to enable some awesomeness so I explored if it was possible to expose to this vCO without huge effort.  Success!

Snip20140930_54

It wasn’t too difficult to build this.  The two most difficult parts were setting up the PowerShell host for vCO (google it… it’s difficult.. at least it was for me the first time around), and parsing of the XML returned from PowerShell to vCO to get the data I wanted.   These workflows are a bit rough but they work as a first draft.   For anything production caliber you’ll want to evaluate the performance impact of hitting the powershell host as often, and definitely change the password field from string (proof of concepts!).

What I have built so far is a workflow “JaaS Tags- Add Tag” that accepts strings for the name of the tag, and virtual machine name.  This fires off powershell commands in a vCO action:

 

To show how it works running manually in the vCO client:

Snip20140930_60

 

And to show that the tag is actually applied, you can find it in the Web Client:

Snip20140930_57

Now, I also have a workflow to find VMs from the tag that is supplied.  I needed flexibility out of these in the solution that i’m working on so the output from this one is two arrays – one of the name in a string, and one of VC:VirtualMachine type.

Snip20140930_55

 

 

Running this guy manually, just supply the tag name:

Snip20140930_59

And to show the output parameters, you can see that in the vCO client:

Snip20140930_61

Yay Tags!   Now you can include these workflows in other solutions to utilize tags in ways they weren’t intended.  Stay tuned for the solution I built this for.

I’ve posted an export of this package to FlowGrab, check it out here:  https://flowgrab.com/project/view.xhtml?id=d2623373-838f-4ee2-8d6e-c6f582cb452f

 

 

 

Tagged , , , , ,

Small Things: vCAC 6.1 – "Data Collection" catalog entry

For anyone that does template configuration changes in vCAC can attest to how big of a pain it is to reconfigure the agents, shut down the machine, snapshot, browse the menu structure to where you force data collection, click collect data for all the items, browse to the blueprint config and wait for it to complete.    Well, hopefully this tip can speed that up just a little, or at least make it less of a headache for you.

vCAC 6.1 comes with a ton of vCO workflows out of the box.  One that caught my eye is “Force data collection”.

Snip20140919_22

 

Adding this workflow as a catalog item is a breeze under Advanced Services – Service Blueprints.  When complete it will show up like any other service or template:

Snip20140919_25

 

And does its job quite well:

Snip20140919_30

 

One warning, you will want to set a constant value for the one question it will prompt for in this workflow.   Edit the blueprint as such:

Snip20140919_26

 

And choose your IaaS (windows) server:

Snip20140919_27

 

I quickly installed a fresh new instance of vCAC & IaaS today, and not sure if it was an error during install or not but at first mine didn’t show any hosts here in the above screen shot.   I had to go into vCO with the client and run this workflow to add it.  Your results may vary.

Snip20140919_31

 

EDIT Sept 22 2014:   I wasn’t clear about where to find this workflow.  It’s found within these folders:

Orchestrator
Library
vCloud Automation Center
Infrastructure Administration
Extensibility
> Force Data Collection

Tagged , , ,

vCO Workflow Collaboration with FlowGrab

flowgrab_logo_beta_gray_bgGithub for vCO!

A while back I posted about the vFLOWer tool that provided a way of unpackaging a vCO package into xml that can be easily pushed to a version control system like Git.  The same company, ByteLife, has taken it a step further and have opened a site in beta that allows sharing and collaboration of vCO packages called FlowGrab.   My understanding is that the tools that made up vFLOWer are run on each packge that is uploaded such that I can be version controlled, diff’ed, merged.  Although this developer functionality is not part of their public feature set yet, what is there does look to be useful in sharing workflows with others.  It’s a heck of a lot more useful than posting the full package file to a blog post or GitHub, or worse yet, requiring you to git clone the XML output from vFLOWer, repackage it and then import.   Painful.  This is a step towards automation of all of that.Snip20140827_14

I thought I would give this offering a quick try with a package I had laying around.  This is a workflow that I use for notifications that reaches out to Pushover over REST.  I blogged about it a bit when I explored pulling data from Weather Underground here.   This package includes workflows that power on and power off VMs based on a keyword, and send an alert when complete.  You can use this as an example of how to use the pushover workflow in your own to do something useful.  Reusable content! Yay!

The process starts as normal, exporting the package from vCO:

Snip20140827_1
The name will be automatically filled in, this is your package file.  Save this to disk.

Snip20140827_2

 

Now what’s handy about this site is you don’t have to go through all the trouble of using vFLOWer as I previously posted about, simply browse to their site. Create an account.  Create your project and upload your package.  Done!.

Snip20140831_8

 

After you post your project, it is available for others to view:

Snip20140918_16
Clicking on the download link downloads the actual package file, not XML than you then have to build.

Snip20140918_17

Now when you go to import this into another vCO instance, you are shown that a number of the contents already exist because I reused some library content for this example:

Snip20140918_18

Snip20140827_3

 

Now the package exists, and you should see the new workflows:

Snip20140827_4

 

Snip20140827_5

 

If you try to run the Power On or Power Off scripts as is you’ll get an error because you haven’t added the REST host and operation for Pushover yet.  This older blog post of mine shows how to set those up.

Snip20140918_19

 

Tagged , , ,

Small Things: NUC Sack

I transitioned some of my home lab onto tiny Intel NUC machines this year and just love the form factor and the fact that they are so portable. In fact I flew with them, that tiny NAS in the picture and a router to an event to demo some projects.  If only they went to 32 gb or higher, they would be perfect.

My buddy @jrrickard and his co-worker 3d printed me a rack for these little guys that we’re loving calling the “NUC Sack”.   Love love love it!!! Thanks guys!

If you want to print one yourself they posted the files on github here.   I’m told if you want to use this with the taller NUCs that will take a spinning disk inside, add 15mm to each of the sections.

NUC-SAC

Tagged ,

Small Things: vSphere 5.5 U2 – C# Client, Editing HWv10 VMs

Maybe I’m just becoming an old get off my lawn ex-operations curmudgeon in my “old” age, but I find the vSphere Client hard to part with (this message brought to you by Me, and only Me, and no one but Me).  I found it very annoying that if you upgraded any VM hardware versions to 10, you could no longer edit settings in the old client – even something common like mounting an ISO.

vSphere 5.5 U2 has brought us this, yay!  This allows editing of any features present in the old client which is good enough for basic stuff.

Snip20140917_15

 

 

EDIT: Whoops.. fixed the screenshot

Tagged ,