Deploy Manifest Format
The manifest file included in a deployment package (DAR file) describes the contents of the archive for Deploy. When importing a package, the manifest is used to construct CIs in Deploy's repository based on the contents of the imported package. The format is based on XML.
A valid Deploy XML manifest file contains at least the following tags:
<?xml version="1.0" encoding="UTF-8"?>
<udm.DeploymentPackage version="1.0" application="PetClinic">
<deployables>
...
</deployables>
</udm.DeploymentPackage>
Adding artifacts
Within the deployable tags you can add the deployables that make up your package. For example, a package that includes an ear file and a directory containing configuration files would be specified as follows:
<deployables>
<jee.Ear name="AnimalZooBE" file="AnimalZooBE-1.0.ear">
</jee.Ear>
<file.Folder name="configuration-files" file="conf">
</file.Folder>
</deployables>
In this example, the:
- Element name is the type of configuration item that will be created in Deploy.
- Name attribute corresponds to the specific name the configuration item will get.
- File attribute points to an actual resource found in the package.
Adding resource specifications
The deployables element can contain more than just the artifacts that comprise the package. You can also add resource specifications to it. For instance, you can add the specification for a datasource. You define these specifications in a similar manner as artifacts, but they do not contain the file attribute:
<was.OracleDatasourceSpec name="petclinicDS">
<url>jdbc:mysql://localhost/petclinic</url>
<username>petclinic</username>
<password>my$ecret</password>
</was.OracleDatasourceSpec>
In this example, the specification was.OracleDatasourceSpec is created with the properties url, username and password set to their corresponding values.
Setting complex properties
The above example showed how to set string properties to a certain value. In addition to strings, Deploy also supports references to other CIs, sets of strings, maps of string to string, Booleans and enumerations. The following sections provide some examples.
Refer from one CI to another
To refer from one CI to another CI:
<sample.Sample name="referencing">
<ciReferenceProperty ref="AnimalZooBE" />
<ciSetReferenceProperty>
<ci ref="AnimalZooBE" />
</ciSetReferenceProperty>
<ciListReferenceProperty>
<ci ref="AnimalZooBE" />
</ciListReferenceProperty>
</sample.Sample>
Set of strings properties
To set a set of strings property to contain strings "a" and "b":
<sample.Sample name="setOfStringSample">
<setOfStrings>
<value>a</value>
<value>b</value>
</setOfStrings>
</sample.Sample>
List of strings properties
To set a list of strings property to contain strings "a" and "b":
<sample.Sample name="listOfStringSample">
<listOfStrings>
<value>a</value>
<value>b</value>
</listOfStrings>
</sample.Sample>
Map of string to string properties
To set a map of string to string property to contain pairs "key1", "value1" and "key2", "value2":
<sample.Sample name="mapStringStringSample">
<mapOfStringString>
<entry key="key1">value1</entry>
<entry key="key2">value2</entry>
</mapOfStringString>
</sample.Sample>
Boolean and enumeration properties
To set a Boolean property to true or false:
<sample.Sample name="booleanSample">
<booleanProperty>true</booleanProperty>
<anotherBooleanProperty>false</anotherBooleanProperty>
</sample.Sample>
To set an enum property to a specific value:
<sample.Sample name="enumSample">
<enumProperty>ENUMVALUE</enumProperty>
</sample.Sample>
Embedded CIs
You can also include embedded CIs in a deployment package. Embedded CIs are nested under their parent CI and property. Here is an example:
<iis.WebsiteSpec name="NerdDinner-website">
<websiteName>NerdDinner</websiteName>
<physicalPath>C:\inetpub\nerddinner</physicalPath>
<applicationPoolName>NerdDinner-applicationPool</applicationPoolName>
<bindings>
<iis.WebsiteBindingSpec name="NerdDinner-website/88">
<port>8080</port>
</iis.WebsiteBindingSpec>
</bindings>
</iis.WebsiteSpec>
The embedded CI iis.WebsiteBindingSpec type is an embedded CI under it's parent, iis.WebsiteSpec. The property bindings on the parent stores a list of iis.WebsiteBindingSpec instances.
Using placeholders in CI properties
You can use Deploy placeholders to customize a package for deployment to a specific environment. CI properties specified in a manifest file can also contain placeholders. These placeholders are resolved from dictionary CIs during a deployment. This is an example of using placeholders in CI properties in a was.OracleDatasourceSpec CI:
<was.OracleDatasourceSpec name="petclinicDS">
<url>jdbc:mysql://localhost/petclinic</url>
<username>{{DB_USERNAME}}</username>
<password>{{DB_PASSWORD}}</password>
</was.OracleDatasourceSpec>
Placeholders can also be used in the name of a CI:
<was.OracleDatasourceSpec name="{{PETCLINIC_DS_NAME}}">
<url>jdbc:mysql://localhost/petclinic</url>
<username>{{DB_USERNAME}}</username>
<password>{{DB_PASSWORD}}</password>
</was.OracleDatasourceSpec>
Deploy also supports an alternative way of using dictionary values for CI properties. If the dictionary contains keys of the form deployedtype.property, these properties are automatically filled with values from the dictionary, provided they are not specified in the deployable. This enables you to use dictionaries without specifying placeholders. For example, the above scenario could also have been achieved by specifying the following keys in the dictionary:
was.OracleDatasource.username was.OracleDatasource.password
Scanning for placeholders in artifacts
Deploy scans files in packages for the presence of placeholders, adding them to the placeholders field in the artifact so that they can be replaced upon deployment of the package.