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.Application
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.DeploymentPackage
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.DataSourceSpec
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 typejee.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.Ear
or wls.Ear
. Only use this if you really need WebSphere or WebLogic-specific features. The jee.Ear
type will deploy just fine too.
Right-click on MyApp and choose New ► jee ► jee.Ear
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:
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'