Around the office, we have more and more internal teams that are latching on to Orchestrator and wanting to use it for building all sorts of integrations and automations, but one of the things that comes up from time to time is how to get the ability to have some sort of complete installation process that doesn’t require a separate step for installing Integration Packs or runbooks. In this case, enabling the automatic registering and deployment of an Integration Pack would really enable a streamlined installation process.
Note from the legal dept: The process described here is not officially supported by Microsoft and are provided only as an example to the community.
Neither I nor Microsoft, nor any other person, animal, vegetable or mineral assumes responsibility for the process demonstrated here. USE AT YOUR OWN RISK!
Before I start, here are links to the previous parts of the “COM” series:
Going back into the COM interface for Orchestrator, I can see that there is an “AddIntegrationPack” method available, and it takes a “Variant” type (which is usually XML for the Orchestrator Interface). The only thing is I don’t know what that XML looks like. However, luckily enough, there is also a “GetIntegrationPacks” method that I can use to return XML and I can figure out the format needed! As it turns out, the XML format looks like this:
So now I know that if I use this format when adding an Integration Pack, I should be fine. But where do I get this information, and what does this really get me?
First of all, it’s useful to know how the whole process of registering and deploying Integration Packs works. If you missed the earlier post on the topic, you should see it here:
As it turns out, the format of the XML is actually the format of the .CAP file located inside the .OIP file. What this process of "AddIntegrationPack” does is the registration part. It doesn’t cover the rest of the stuff that Deployment manager does like copying the files to the right places or deploying the MSI to make the IP functional. It’s really just adding info to the database. However, this is a crucial part to getting an IP working. So in addition to the COM interface stuff, I will have to add some other stuff to be fully functional. Here’s the whole process in a nutshell:
In order to do all of this from PowerShell, I relied on some cool code provided on Rikard Ronnkvist’s blog that allowed me to read properties from within an MSI file, including loading another COM object (WindowsInstaller.Installer) and some new type definitions that I load dynamically in my script.
Here is the script:
To run the script, open a PowerShell(x86) console on the Management Server using Run As Administrator (required to access the Common Files directories), and then just do the following:
You can see how this process can enable you do incorporate IP installation and deployment into the actual installation (like via an MSI) of an application. Keep watching for more fun and exciting articles on automating administration of Orchestrator.
The script shown above is also attached to the article. Enjoy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.