Skip to main content
DevOps Image

This post is from the XebiaLabs blog and has not been updated since the original publish date.

Last Updated Feb 18, 2013 — DevOps Expert

XL Deploy Cookbook: Creating a Deployment Package using the XL Deploy UI

DevOps

Deployment Packages are usually created outside of XL Deploy. For example, packages are built by tools like Maven or Jenkins and then imported using a XL Deploy plugin. (See documentation of the Maven XL Deploy Plugin and Jenkins XL Deploy Plugin). Or you manually write a Manifest.MF file for the XL Deploy Archive format (DAR format) and import the package using the XL Deploy UI. Designing a Deployment Package can sometimes be a cumbersome process. To quickly assemble a package, it is more convenient to edit it in the XL Deploy UI.Note: You should be running XL Deploy 3.8 or higher.

Creating an application

In XL Deploy, all deployable content is stored in a Deployment Package. The Deployment Package will contain the EAR files, HTML files, SQL scripts, DataSource definitions, etc. Deployment Packages are versions of an Application. An application will contain one or more Deployment Packages. So before we can create a Deployment Package, we need to create an Application. To create an application, login to the XL Deploy UI and go to the Repository tab. Right-click on Applications and choose New ► udm ► udm.ApplicationimageGive it the name 'MyApp' and press save.

Creating a Deployment Package

Now let's create a Deployment Package that has all the content of version 1.0 of Myapp. Right-click on MyApp and choose New ► udm.DeploymentPackageimageGive it the name '1.0' and press save. We now have an empty MyApp 1.0 package.

Adding Deployable content

We're now ready to add actual deployable content to the package. Remember that in XL Deploy, all configuration items (nodes in the repository tree) are typed. That is, you have to tell XL Deploy on beforehand which type a configuration item is, so XL Deploy will know what to do with it. First we'll add a simple deployable without file content. Let's create a deployable DataSource in the package. Right-click on MyApp and choose New ► jee ► jee.DataSourceSpecimageGive it the name 'MyDataSource' and JNDI-name 'jdbc/my-data-source'. Press Save. That's it! We've just created a functional Deployment Package that will create a DataSource when deployed to a JEE Application Server like JBoss or WebSphere.

Adding artifacts

Artifacts are configuration items that contain files. Examples are EAR files, WAR files, but also plain files or folders. Let's add an EAR file to our MyApp/1.0 deployment package. It will be of type jee.Ear. Note that if you're using specific middleware like WebSphere or WebLogic, you also have the option to add and EAR of type was.Earor wls.Ear. Only use this if you really need WebSphere or WebLogic-specific features. The jee.Eartype will deploy just fine too. Right-click on MyApp and choose New ► jee ► jee.EarimageGive it the name 'PetClinic.ear'. We can now upload the actual EAR file. Hit 'Browse file' and select an EAR file from your local workstation. If you're running the XL Deploy Server locally, you can find an example EAR file in XL Deploy-server/importablePackages/PetClinic-ear/1.0/PetClinic-1.0.ear. When creating artifacts (configuration items with file content), there are some things to take into account. First, you can only upload files when creating the configuration item. It's not possible to change the content afterwards. The reason for this is that Deployment Packages should effectively be read-only. If you change the contents, you may create inconsistencies between what has deployed onto the middleware and what is in the XL Deploy repository. This may lead to surprising errors. Placeholder scanning of files is only done when they're uploaded. Use the 'Scan Placeholder' checkbox to enable or disable placeholder scanning of files. When uploading entire directories for the file.Folder type, you will need to zip the directory first, since you can only select a single file for browser upload.

Specifying property placeholders

It's easy to specify property placeholders. For any deployable configuration item, you can enter a value surrounded by double curly brackets. For example: {{PLACEHOLDER}}. The actual value used in a deployment will be looked up from a dictionary when a deployment mapping is made. For example, open MyDataSource and enter JNDI_VALUE as placeholder:imageThe value for Jndi Name will be looked up form the dictionary associated with environment you deploy to.

Export as DAR

When you're finished modeling the application, you can export it as a DAR file. Once downloaded, you can unzip it and inspect its contents. For example, the generated manifest file can server as a basis for automatic generation of the DAR. To export as DAR, right-click on '1.0' and choose 'Export'image

More from the Blog

View more
May 06, 2021

Use Value Stream Management to release apps with confidence

DevOps
Many companies worldwide use a blend of DevOps and agile methods to he ...
Read More
Agile or DevOps on Its own Is not enough
Apr 23, 2021

Agile or DevOps on Its own Is not enough

DevOps
As every company becomes a software company, it becomes increasingly i ...
Read More
Mar 16, 2021

Does successful change management require DevOps?

DevOps
Around the world, digital product providers are looking to reduce dysf ...
Read More
Mar 04, 2021

Getting key stakeholder buy-in for changes perceived as risky

DevOps
Organizational leaders must recognize that change is vital for the sur ...
Read More
Contact Us