About Author: Joerg Lew

Posts by Joerg Lew

0

The Dream of a self-healing Datacenter: Integrate vCenter Operations (vCOPS) with Orchestrator

Workflows in vCenter Orchestrator allow you to automate tasks in vCenter. That’s “Kindergarten“.

Workflows also allow you to orchestrate IT-Services all over the infrasctructure, leveraging all that generic or specific plugins (Wanna see the list? Go to VMware’s Solution Exchange: https://solutionexchange.vmware.com/store/category_groups/15/categories/21).
That’s the “Advanced to Master“-Level.

Kicking-off “healing” workflows based on “unhealthy” conditions in your datacenter fully-automated, using vCO as a headless orchestration platform? That sounds like a job for Wizards!
Well, let’s see……

Orchestrator Wizard (bearded)

The Basics

What is VMware vCenter Operations?
Quoting http://www.vmware.com/products/datacenter-virtualization/vcenter-operations-management/overview.html:
“… Automate performance, capacity, and configuration management with patented analytics and an integrated approach to management. Eliminate the finger pointing, improve team collaboration and reduce manual problem solving efforts by as much as 40% with automated root cause analysis… blah blah Marketing blah 🙄 ”

In short: It’s great! 

VMware vCenter Operations (vCOPS)


What do we need in vCenter Orchestrator?
Just some basic facts
: Orchestrator Workflows are triggered mostly in one of these three ways:

  • Manually: By an administrator (using the vCO-Client), or an Helpdesk-Agent (using the weboperator Webview, or the Perspectives-Plugin) or  a customer/end-user (via a self-service portal (built in Wavemaker of course  ;-))
  • As Scheduled Task in vCO: The workflow will be started by the vCO server on a regular base, e.g. for reporting, checking for exhausting snapshots, …… (It’s even possible to schedule a workflow programmatically, see a nice example here: http://communities.vmware.com/thread/318791)
  • By an external System: Another component of your Infrastructure kicks-off the workflow via the API. This could be an high-level Business-Process engine (like VMware Service Manager), a system to manage classroom-environments, a release management system, an I/S/P/X/Y/Z-aaS Manager, whatever…

And there is a fourth, not so well known way to start a workflow:

Policies in Orchestrator to start Workflows on signals

  • Event based: The workflow is started when a specific event occurs . You can either use a “Waiting event”-Element in the workflow, or you can create a Policy in vCO. For both vCO-Plugins can provide Triggers.
    Examples:  The AMQP-Plugin (which can be triggered e.g by a Blocking Task in vCloud Director), or the SNMP-Plugin (listens to SNMP-Traps, sent e.g. from vCenter or other systems…)
    Waiting Event in a workflow

Subtotal:

vCenter Operations (vCOPS) can send SNMP-Traps when unwanted situations occur.

vCO can start workflows when an SNMP-Trap is received.

So: Integrate (again)!

Step 1:  Install the SNMP-Plugin on your vCO-Server. RTFM on https://www.vmware.com/support/pubs/vco_plugins_pubs.html

Step 2: Run the Workflows Library / Trap Host Management / Set the SNMP trap port and Start the trap host to make vCO (exactly: the SNMP-Plugin) listen to SNMP traps.

Step 3: Run the Workflow Library / Device Management / Register an SNMP device and make vCO listen to SNMP traps exactly from vCOPS. Make sure you use the hostname / IP of the vCOPs Analytics VM, not the UI VM!

Run Workflows to setup the environment

Step 4: Configure vCOPS to send SNMP-Traps to the Orchestrator server. Open the vCOPS Manager Administration, and define your vCO-Server as (receiving) Host.

Enable SNMP notifications in vCenter Operations

Step 5: Configure vCOPS  to “activate” alerting: Open the menu “Notifications” in vCOPs usual webinterface (not the Administration anymore), and create a “New Rule” and enable all the Conditions you want to be notified on.
(I’m not sure if this step is really necessary,  I didn’t find any information if these rules are for email only, or if they are also used for SNMP notifications 😕 )

Create Rules to enable alerting

Step 6: For a first test: Run the Workflow Library / SNMP Wait for a trap on an SNMP device. Select the vCOPS Analytics VM as SNMP Device, you registered it in Step 3!
The Workflow should stall at the “Waiting Element” for an SNMP trap from vCOPS. Now break something in your datacenter 😈 , so that vCOPS sends a trap…

Waiting for something bad...

Once the trap is received by vCO, the workflow should continue and finish successfully. In the Logs-Tab of the Workflow-Token you can find some details about the trap.

Step 7To be the wizard: Create a new Policy based on the Policy Template which comes with the SNMP Plugin.
Apply a new  Orchestrator Policy

Then edit the created Policy to select the Workflow to be started when a trap is received:

Step 8: Start the Policy! (That’s something you will forget only once, after hours of senseless troubleshooting…)

DON'T FORGET TO START THE POLICY!

Finito!

Now every condition in your datacenter which leads to an alerting in vCenter Operations will trigger a Workflow in Orchestrator, which can deal with the problem. And the best: All that without writing a single line of code!

From there I leave it to you…

<site note>
Integrating a Systems Monitoring tool with vCenter Orchestrator is not a new:
up.time software provides a vCO plugin for years:
http://support.uptimesoftware.com/orchestrator.php
http://www.uptimesoftware.com/uptimeblog/uncategorized/cloud-computing-and-popular-culture/
</site note>

The Dream of a self-healing Datacenter

Proofing that it’s possible, consider what you can do (or better: what you can let do fully-automated) with an integration of vCenter Operations and vCenter Orchestrator:

  • Run a workflow that automatically creates a Ticket or updates the CMDB on vCOPS alerts
  • A datastore runs out of capacity? A workflow will fix it automatically, increase the LUN on the storage system and the VMFS partition. Or just full-stack provision a new datastore and add it to the storage cluster.
  • YourMightyStorageVendor(tm) provides an additional workflow: If now your storage system runs out of capacity, new disks will automatically be ordered by the workflow 🙂
  • Response time for Outlook users to high? A workflow will deploy new Exchange CAS instances to scale-out (and leverage the Powershell-Plugin to adjust it settings)
  • Your web-app is getting “Slashdotted”? See how Radware already leverages vCO to scale it fully-automated: http://www.youtube.com/watch?v=4rkV3ebQens
  • “No worries, Captain! I already put 80% energy to the front shields to prepare for the Klingonian attack!”
  • With the brand-new vCenter Operations for VMware View and a View API/Plugin for vCO you could… … …

***RING – RING – YOUR WAKEUP CALL – RING – RING ***

SIGH! What a nice dream…  :mrgreen:

0

There’s a new guitar in town!

An Orchestra typically needs more than one musician. And for a blog about vCenter Orchestrator it’s also a good idea to have more than one authors!

***DRUMROLL***  Let me introduce ……***DRUMROLL***… Christian Strijbos as co-author for vcoportal!

Christian works as Senior IT-Architect for a VMware Consulting Partner in Germany, helping customers of all sizes and all industries to design, implement, automate and orchestrate (obviously  :-D) their VMware environments. He holds VCDX3 and VCDX4 certifications (magic number: 64).

Current work in progress: Wavemaker and Orchestrator and (better(?): versus  :mrgreen: )  LDAP, much more in the pipeline… So, stay tuned for great articles coming soon!

0

Using Onyx to speed-up Workflow development

In the VMTN Community Forums for Orchestrator recently one question came up:

“…how to use orchestrator to change the Video Card Setting of a VM to “Auto-detect settings” the next time the VM reboots?” (read the full thread here: http://communities.vmware.com/message/2040860#2040860)

That is a typical task for a workflow developer: Automate something you can easily click in vSphere Client, but it maybe hard to figure out, how to automate it.

ONYX to the rescue!

See this video how to get to the solution in less than 15 minutes  :-D… (You can download the resulting workflow below, but that shouldn’t be necessary anymore 😛 !)

It’s a quick shot screencast, so no audio….

If you like the style, drop me a comment, and I will create more videos (with explanations  😎 ) in future!

Change VM Video Settings Workflow
Change VM Video Settings Workflow
Change-VM-settings-to-auto-detect-video-memory.workflow
2.1 KiB
Details...
0

Safe your job, create unmaintainable workflows!

The need for unmaintainable workflows

As an external consultant as well as permanent employee it’s always a good idea to make yourself indispensable for your customer/company. This ensures ongoing engagement/a safe job.

In IT in general you can achieve this by devloping unique solutions nobody else except yourself can understand (and maintain). I’m sure: You all can instantly give at least one example for an IT-component where youself/your teammates/everybody else follow the policy: “Never touch a running system“.

 <buzzword-for-the-robots>The modern term for this is NoOps.</buzzword-for-the-robots>

 As a workflow developer you also can follow some simple rules to make sure: You, and only you, will be able to maintain, re-use or even exand your workflows!

Here we go…:

Documentation, Labeling, Description Fields

Avoid Documentation, and use the default labels for workflow elements. So one has really click into each element, read the code, see the bindings to figure out what happens here.


When naming workflows and actions, and their parameters and attributes: Don’t be too obvious! A simple “name” or “vm” or “theArray” is enough.

Be aware of the Description fields! They are shown in so  many different places (when you re-use the elements, mouse-over in the schema, for documentation, …), that your really want to avoid this disclosure of “what this element is for”.

Logging

For the usage of System.log(), System.debug() and co. you have the choice:

  • Don’t log at all! Your NoOps-Team will thank you for that.
  • Log everything! It’s always a good challenge for the NoOps-Team to find the really important messages in hundrets of lines with traced-out variables (Eastern is coming!)…
  • Just log values! The value of a variable is what’s interesting. Nobody wants to know what variable it is… System.log(myVariable) does the trick.
  • Pro-Tip: You can even improve confusion by logging WRONG things, e.g. when you copy&paste scripts to re-use it in another context.

Workflow Design

Especially important for Library-Workflows which are intended to be called by other Workflows:
Hardcoding values in the script, not exposing important parameters as INPUT-parameters and  creative usage of  the data types ANY and Properties (of course whithout proper documentation) will ensure that it’s you, and only you, who can re-use the workflow.

In General:
Use the default namesactionResult” and “errorCode” when binding Action elements and Exception paths…

Forget about the “Add note…”-Feature! Structuring workflow part with coloured background just creates a better visual structure for the workflow.

Workflow Organization

Duplicate Workflows for small adjustments! This helps to keep your work big if something has to change in there for the next version.

Don’t use too many Workflow Folders, or clear labes for them! Leave it to the user to figure out which workflows are intended to be called manually, and which ones are just the “drivers” for them.

Create hidden dependencies! Calling Actions or nested Workflows not via the corresponding Elements, but within scriptable tasks creates nice surprises if one is changing the called.

Optimize your JavaScript coding style

You can find a long list of tips for that here: http://thc.org/root/phun/unmaintain.html

Forget vCO, just do scripting!

Who needs the visual, self-explaning graphical flowcharts of vCenter Orchestrator when you can to something like this??:

Pro-Tip: Use the PowerShell-Plugin or the PowerSSHell-Plugin to combine the best of both worlds. This will garantuee your job forever!

:mrgreen: HAPPY APRIL FOOLS’ DAY!!! :mrgreen:

Special Greetings to my mates in Sofia 😎 : Please do not take that criticism of some parts of the vCenter-Plugin-Library personal! I know it’s an hard challenge to maintain this inherited aged content 🙄 . You do a great job, especially with all the new “written-from-scratch” Plugins! Keep them coming!!! 😀

Got more?

Comment on the post and share your finest ideas  how to create poor workflows! 😈

0

Updating the vCenter Orchestrator Appliance to 4.2.1

Note to myself: RTFM!!! RTFM!!! RTFM!!!!

What happend?
I tried to update my vCO Appliance to the current Version 4.2.1 using the built-in update-feature (that’s what we have an appliance for). It stucked with the screen “Installing vCO Appliance – 4.2.1.0 Build 612841, please wait…”, and the vCO service was not running anymore. Even a reboot of the appliance didn’t bring the service up again.

To save you this troubleshooting time:
This behaviour is not really expected, but documented in the Known Issues-Section of the vCenter Orchestrator 4.2.1 Release Notes

Therefore, the complete process to

Update the vCO Appliance to version 4.2.1

1. Login to the Appliance Configuration page

2. Start the Update in the “Update“-Tab

3. Leave the Update-Tab open, and oen a new browser tab with the Orchestrator Configuration, goto Database, confirm that there is a problem 🙂 (“Mismatching database version”)

 

4. On the top of the Database-Section, click to “Update

5. Start the vCO Service in Startup Options

6. Confirm in Appliance Configuration / Update-Tab the new vCO version

7. Orchestrate again!