My previous blog posts about the brand new System Center Orchestrator 2012 Release Candidate (SCO) were about the installation experience and the basics of Integration Pack (IP) deployment. In this blog post I want to explore the Orchestrator Integration Toolkit.
I was very impressed with the setup experience of SCO 2012 RC, also the IP deployment wasn’t that hard. The Integration Toolkit setup is a different story. When you want to start the setup on a fully patched machine, you’ll see a message like this:
There’s nothing wrong with a message like this but you would expect having a browser window open after you click OK, redirecting you to the web page mentioned in the message box. Not going to happen! So you have to manually open http://wix.codeplex.com and install WIX 3.5 on the machine before you can start the setup. Install the WIX 3.5 and restart the Setup. Once you can proceed with the setup, it’s really simple and doesn’t deserve any screenshot here.
After the setup finished you’ll see a new folder with two new items in the start menu:
Command-Line Activity Wizard
This wizard simply lets you create an activity based on a simple command-line (including arguments). In this post I will demonstrate how this wizard works based on a very simple example: creating an event log entry.
You may wonder why I want to create an event log entry when SCO already has a “Send Event Log Message” activity. I just want to demonstrate to concept how simple it is to integrate existing tools in runbooks. You may also wonder why I’m just not using the “Run Program” activity. Well, sometimes you want or need to wrap existing tools into something you can distinguish visually in your runbook or limit access to parameters for the runbook designer.
Anyway, let’s start the fun. Before we can create our own IP we need to generate a .NET assembly containing our activities. The “Command Line Activity Wizard” helps us to do that. When you start the wizard you’ll see a button “Load existing assembly” which you can ignore for now. Click on Next:
This wizard page asks for basic assembly information: name, location in filesystem (where the assembly will be saved), clicking on the “Assembly Information” button also allows you to add additional meta data, like version, company, etc. After providing the assembly details, click on next.
This screen allows you to add one or more command-lines (each can be an activity in the Runbook Designer) to your assembly. Click on “Add…” to add a new command:
For this example we use a very simple command line: eventcreate /L APPLICATION /T INFORMATION /SO MySample /D “This is a test event.” /ID 200
To make it even more fun, we allow the event ID to be injected from the workflow. Switch over to the Arguments tab:
Note that we still haven’t added the /ID parameter to the command line. First we need to add a new parameter for that. Click on the “Add…” button:
After we created the parameter you can use the “Insert” button to put it in the command-line:
Type /ID and then use the Insert button to insert the variable $(EVENTID)
The Published Data tab allows you to put the output of the command to the data bus of the runbook. In this case, eventcreate will not create any valuable output for us, so we skip this.
Let’s close the Add/Edit Command dialog with OK and proceed with the wizard. The wizard will then create a .NET assembly wrapper for the activities and writes it to the path you’ve selected previously in the Assembly Details wizard page. The last wizard page includes a button “Build Integration Pack”, allowing you to make an IP from your assembly.
Before we proceed to the next wizard: remember that button “Load existing assembly” from the first page of the Command-Line Activity Wizard? You can use it to load .NET assembly wrapper from this wizard and add/edit/remove activities. I strongly recommend that you use the “Assembly Information” page and apply proper versioning on your assemblies to keep track which assemblies/IPs are in use.
Integration Pack Wizard
This wizard allows you to package a complete, ready to ship integration pack. The first page of the integration pack wizard has a button “Import Integration Pack” which we will ignore for now. Click on next:
This page allows you to control how the IP will present itself to the user.
Click on “Add” to add one or more activities from libraries like those we just created:
Browse to the .NET assembly wrapper we created with the previous wizard, select the class, you may adjust the name, description and the icon for the activity. Click OK and proceed with the wizard. The next wizard page allows you to bundle other files or dependent applications in your IP. When your IP is deployed all the bundled files are also deployed. In our case we do not need to bundle anything. Click on next to specify the .oip file we want to save our activities in:
After the wizard is finished, your .oip file is ready to deploy. Once again, if you want to change your IP (add, remove or edit activities) you can use the “Import Integration Pack” button on the very first page of the wizard. Note that this wizard automatically increases the version of the IP when you edit an existing one!
Now let’s test our IP/activity in a runbook. First we need to register and deploy the IP we just created. Take a look at my previous blog post on how to install and deploy IPs. Once you’ve deployed your IP, you’ll see the activities in your runbook (you need to restart the designer if it was running while you deployed the IP):
Test the Activity
Just integrate your activity in a runbook, check it in and launch the runbook using the Orchestrator Console.