A few new plug-in capabilities were added in UrbanCode Deploy 6.0.1 that have gone relatively unnoticed. I would like to take the opportunity to highlight them in a few posts.
First, the ability for an agent to auto-discover things is a new plug-in capability. Let’s explore how it works. The purpose of this feature is to get a jump start on configuring your resources and agent/machine properties by having an agent proactively look for the existence of things on the machine it is running on. For example, if you are a WebSphere shop you most likely make extensive use of the WebSphere plug-in. And part of that process involves capturing the location of WebSphere on a given server. The WebSphere plug-in has that capability today.
If you look at the WebSphere plug-in, you will see two unique steps in the plug-in. One is called WebSphere Discovery. You will notice if you open the plugin.xml file that the step has a new element in its definition:
This type of step causes special behavior to occur when a new agent is added to a resource in the resource tree. Every auto-discovery step in every plug-in gets run by the agent when this occurs. For the WebSphere plug-in, this step looks for the existence of WebSphere by searching for standard WebSphere installation locations. If it finds it, it creates a sub-resource to represent the WebSphere cell and sets a role property on that resource defining the path to WebSphere found on that machine.
Like I said earlier, auto-discovery steps are automatically run when a new agent resource is defined in the resource tree. Auto-configure steps are manually executed on specific resources that have auto-configure roles applied to them.
At a minimum this save you some typing. But imaging if you have hundreds or thousands of WebSphere servers. This helps to insure that you always have the right WebSphere information for that server.
But there is more you could automatically learn about a WebSphere box. There are WebSphere nodes, server, etc. that could also be discovered. Or maybe you want to create some things on WebSphere once you know WebSphere is there. The other feature is called auto-configure.
Again, there is an auto-configure step in the WebSphere plug-in.
The additional step element indicates why type of resource role this auto-configure step can be run on. In the WebSphere case, the previous auto-discovery step identified WebSphere and created a sub-resource identifying the WebSphere cell. You can now run auto-configure on this WebSphere cell resource. However, before you do, you must provide some additional information to the WebSphereCell resource, namely the WebSphere username and password. The auto-configure step then goes out and discovers the full WebSphere architecture and creates the necessary sub-resources to capture that architecture.
The last thing that is present in the plugin.xml file are the properties associated with any of the resource roles that your auto-discover or auto-configure steps will create. These property groups define the properties that will automatically get applied to resource roles when they are created.
In my next post we will talk about the ability to include processes and templates with your plug-in.