My first Opalis presentation: the good, the bad and the ugly

My first Opalis presentation is history!

At Ferranti we hold monthly pizza sessions where someone shows what’s buzzing inside a specific technology area. Since Opalis is hot within SC it was the ideal candidate Smile.

Creating a powerpoint about it is easy, but creating a demo requires some creativity, or else the scripting guys shoot you down.

My demo had to be:

– Quite complex, but not to the point where non-tech people would see an abstract drawing on the screen

– Be almost unmanageable to recreate using scripting. Almost everything Opalis can do is scriptable, but Opalis has the advantage of defining workflows, keeping them central and, most importantly, keep it understandable for people who have a life Winking smile By creating a workflow that does more than printing out all log files on a disk you have a stronger argument against the scripting-kiddies.

– Recognizable. Fully configuring a switch over SSH is nifty, but isn’t a daily annoyance in IT and not everyone knows how a switch works. Things like populating AD, provisioning VM’s and handling SCOM alerts is something almost everyone knows about (and knows the pain of manually managing it).

With this in mind I began to create some scenario’s. At first I was ambitious (managing storage, network devices), but as there aren’t any IP’s for it (yet) I was destined to SSH-commands. Since our demo-storage doesn’t have anything SSH-like and there is only one gigabit switch running the show, I decided to create some less impressive but more practical things.

Before the demo-SCSM broke down:

Provision a VM from a SCSM request (shamelessly stolen from the nice demo Rad Travis and Jim Pitts gave)

VMProv1

Afterwards (poetic justice?):

– Use Opalis’ CLI tool to launch a workflow which attaches a disk to a VM

– Copy user details from a database (simulating AX) to an AD environment correctly populating groups and OU’s

– Simulate a disk-full alert in SCOM and let Opalis handle it by compressing the log files

So I went on my merry way and began creating the AD workflow, which immediately gave the following issue:

Except for the SC ones, all IP’s are hit-and-miss concerning server 2008 (X64) support. Microsoft will release some updates, but for know the AD-pack is worthless on anything 64-bit, and maybe even 2008.

Luckily, there was an old Opalis-system still running 2003. So I made it the primary action-server for the AD-workflow.

Second caveat: data manipulation. Although it is extremely useful to be able to perform some basic functions on data, there is no real way to store it in an object that has the sole purpose of transforming the data (maybe with the new data manipulation pack). So I decided to use powershell to map a row-string provided by the Query-SQL object and use the Field() function to extract and assign data to variables. I then published all variables and voila, easily selectable data on the pipeline!

The last caveat for this workflow was the set-password object: it simply doesn’t work when you want to use a randomly generated password. There is (again) a simple workaround: Powershell! By using the Quest-snapin (mandatory prerequisite for the AD-pack) I could easily create a script allowing the password to be set.

NOTE: There is some delay between the account-creation and the ‘recognition’ of it, so you should set a delay on the link to the set-password object or it will fail.

AD

My second workflow was a break from the previous one: adding a disk of a specified size to a VM using the SCVMM-pack.

I initially envisioned this workflow a lot more complex to the point where the disk would be set online and partitioned by the operating system. But trying to match a windows-disk to a virtual disk in SCVMM is more difficult than it seams.

The only built-in partitioning CLI-tool of Windows is diskpart and although it has its own scripting-support, you can’t filter with it and getting the right disk-number is guessing work. I believe you can use the ‘virtual disk’s-property of Get-VM and some count function to get the amount of disks and then just generate a diskpart-script filling in the X from “select drive X” with the counted ‘disk’-occurrences of Get-VM. Alas, I was time-constrained and the overall solution felt somewhat messy.

So I decided to add some ‘wow’ into it by using the Opalis-CLI tool to launch the policy. This would then show that Opalis-workflows can be stored behind a ‘big, red button’.

VMProv2

My last workflow was a new big one: using Opalis to remediate a disk-full alert.

The setup for the alert wasn’t that difficult: Create a 1GB disk, create a big enough file (using fsutil) and tweak the SCOM-diskmonitor to scan more frequently.

I also created 2 resolution-states in SCOM: “Accepted By Opalis” and “Escalated by Opalis”. This would be used to show the interaction possible between SCOM and Opalis.

I configured the monitor-alert to detect disk-space alerts and update them to the appropriate resolution-state. The values I extracted from the alert where MonitoringObjectName (the diskname) and MonitoringObjectPath (the computer ).

I created a branching flow where one part would delete temporary files in case the disk was a system disk, the other one compressing all log files on the drive using a powershell-script.

Again I wanted to automatically extend the disk in case that the previous actions failed to resolve the issue, but as mentioned previously, this isn’t easily done.

So I checked if at least 10% of the disk was free afterwards and escalated or closed the alert depending on the outcome.

FullDisk

Although it was challenging by times, I had a very fun time creating these flows. It allows you to define practices and measure the highs and lows of the product.

To conclude this post (which is becoming quite long, me and telling how stuff works…), some general advice for people who are setting their first steps on Opalis like me:

– For now, try to use Server 2003 as your primary action server, or be prepared to script a lot

– For almost every object you miss in Opalis, there is a perfect alternative to be found in powershell, commandprompt or similar functions

– Label all objects and links, it makes your flow much more easier to read

– Color-code links to make it more apparent what each of them does (Red = Errorhandling, Green = Succesful, Blue = Delayed link, …).

– Use the nesting-of-workflows function to create standard and rollback policies

– Create a backout-policy for each normal policy

– And most importantly, there is almost nothing that can’t be done by Opalis, except making you a sandwich (for now). It’s possibilities are as limited as your imagination, and scripting/development skills Winking smile

Here are my demofiles and powerpoint for whom it may interest.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to My first Opalis presentation: the good, the bad and the ugly

  1. Mohamed Fawzi says:

    The attachment is corrupted

  2. Bas says:

    Nice post 🙂 and thanks for providing the resulting files as well. That’ll speed up the learning curve!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s