This post is from the XebiaLabs blog and has not been updated since the original publish date.
Feature Spotlight: The XL Deploy Plan Analyzer
Ever wondered how XL Deploy comes up with a deployment plan? To give you more insight in XL Deploy's planning logic, XL Deploy 3.9 features the Plan Analyzer that allows you to inspect a deployment plan while it's being built up.
SetupIn this article, we will use a simple Deployment Package containing an EAR file and a DataSource and deploy it to JBoss Application Server v5. Of course, this functionality also works with any of the middleware plugins available for XL Deploy: IBM WebSphere, Oracle WebLogic, Microsoft .NET, Apache HTTP server among others. Here's the setup in XL Deploy: Our application is called ConsumerApp/1.0 and we will deploy it to the QA environment. This is a simple environment with one JBoss server running on a unix host. We start the deployment by dragging the 1.0 package from the Packages window to the Deployment Workspace, followed by the QA environment. The XL Deploy Autoflow engine can now generate the deployment plan. Based on the current situation, the XL Deploy's Autoflow engine finds out which steps are actually necessary to do a full deployment, upgrade or undeployment. This is in contrast with workflow-based solutions, where you are either tied to a fixes script, or have to edit the deployment procedure by hand every time there is a slight variation.
Analyzing the PlanTo inspect the deployment plan while it is being built up, we click the Analyze button on the bottom of the screen We now see our deployment specification on the left-hand side and the generated plan on the right. Currently it contains only one step, called "Update the repository with your Deployment". This is the default step that XL Deploy creates when there is an empty plan in order to do its housekeeping. We now drag the consumer-app.ear deployable onto JBoss Server to see how the plan changes. With the addition of a single deployed, five steps are added to the plan. Some steps have an preview icon in front of them. These steps have scripts attached to them. By double-clicking on the step, we can see the contents of the generated script. With this information, you will know in advance exactly what actions XL Deploy will execute on the remote server. Apart form the contents of the script that will be executed, the Preview popup offers the following valuable information:
- Step number - The position of the step in the deployment plan
- Description - the name of the step
- Order - The order associated with the step. The order determines the sequence of steps in the plan, with lower order numbers coming before higher ones. The selected Orchestrator can influence this - see the section on the Planning Stage of the XL Deploy documentation.
- Source path - The location of the script template relative to XL Deploy's classpath. For example, relative to
SERVER_HOME/extor packaged in the relevant plugin.