Deployment Package
1 Introduction
This manual describes how to create a deployment package as a ZIP file which is part of the concept of delivering out of the box functionality. The deployment package contains:
- Publishing Server plugins as deployable jar files
- Java Libraries for Glassfish domain lib folder.
- PluginConfig XML files.
- Xml data file(s) containing content data acceptable by EntityDataService
The ZIP is later processed by the PubServer Updater, which installs the files and plugins from the ZIP file.
Deployment packages can be used as well to transfer configurations from one installation to another installation, for example from the development system to the acceptance and production systems.
To create a deployment package is more work than to export some configuration files but for regular processes you should consider using them. The process is less error prone than export and import via ison. Furthermore, deployment packages have the convenient feature that the tenant (called client in older publications) is converted automatically. So moving of configurations is easy between two systems which use a different tenant.
2 Prerequisites
Familiarity with ISON configuration is needed.
3 Create deployment package
3.1 Prepare Data
To create a package, the user must create a folder in the repository folder of the Deployment Manager plugin. This folder includes other folders which contain uploaded files like Publishing Server plugin, libraries or import scripts. This is a standard functionality of ISON Repository Explorer.
The first step is creating a folder structure for the packaging which includes the uploaded files and the deployment package config XML. The folder structure can be arbitrary.

Repository folder of pubserer deployment manager
The next step is to upload files to the package folder(s). There is a new type of config file geared towards deployment package needs - binary.

Upload binary file to repository folder of pubserer deployment manager
The file is wrapped into the standard config file XML structure.
3.2 Create deployment setup configuration file
The Deployment Manager Plugin gets the information about the files it has to package in a plugin configuration file which is stored in the configuration folder of the plugin. For each package (zip file), there is a separate config file.
To create a deployment package which includes a set of files which should be deployed, the user has to create a config file for the DeploymentManager plugin. There is no wizard which supports the creation of such a file in the first version. The user must use the standard ISON functionality of the Repository Explorer to create a config file.


After the creation:

The new config file can be opened in an XML editor. It should have this XML wrapper, which makes it to a plugin config file. The type of the configuration is set to DeploymentPackage.
<con:PluginConfig xmlns:con="com.priint.pubserver.config.manager/20130620" xmlns:usr="com.priint.pubserver.plugin.deployment">
<con:name>packagingSetup.xml</con:name>
<con:type>DeploymentPackage</con:type>
<con:description>This is an Deployment Package</con:description>
<con:custom>
<dep:deploymentpackage >
....
</dep:deploymentpackage >
</con:custom>
<con:dependencies/>
<con:instances/>
</con:PluginConfig>
The DeploymentPackage config file has a few attributes and four separate lists which point to files on the file server or repository designated for the deployment package:
| Tag | Type | Description |
| name | Attribute | Name of the package (package name cannot contain underscore character ‘_’) |
| version | Attribute | Version number of the package |
| description | Element | Description of the package |
| jarFiles | Element | List of jarFile elements (see below) |
| dbimports | Element | List of DBImport elements (see below) |
| pluginconfigfiles | Element | List of PluginConfig elements (see below) |
| pluginconfigfilestodelete | Element | List of PluginConfigFileToDelete elements (see below) |
3.2.1 Defining jar file(s )
The JarFile section describes one of the plugin jar files which should be a part of the deployment package:
| Tag | Type | Description |
| jarType | Attribute | There are two types of jar files which can be added to the package: application (plugin) jar which are deployed as an application to the application server or a library file which is copied to the domain lib folder of the application server. There are two possible values:
|
| path | Element | There are two possible sources of the jar files:
|
For the file from the repository (repository prefix) the path should start from the folder of the plugin where the file is located. This is what we see in ISON tree – please look at the screenshots below.
Examples:
Uploaded plugin:
repository:com.priint.pubserver.plugins.deploymentmanager.PubServerDeploymentManager/WerkII/ChrisPackage/uploads/plugins/DemoDataProcessing.jar
Uploaded lib:
repository:com.priint.pubserver.plugins.deploymentmanager.PubServerDeploymentManager/WerkII/ChrisPackage/uploads/SomeThirdPartyLib.jar
active Domain Lib Library:
server:SomeThirdPartyLib.jar


Example:
<dep:jarFiles>
<dep:jarFile jarType="1">
<dep:path>
repository:com.priint.pubserver.plugins.deploymentmanager.PubServerDeploymentManager/WerkII/TestPackage/DemoDataMapping.jar
</dep:path>
</dep:jarFile>
</dep:jarFiles>
3.2.2 Defining repository config files
The PluginConfigFile section describes one of the config files located in the Publishing Server Repository which should be a part of the deployment package:
| Tag | Type | Description |
| repositoryentry | Element | Repository path |
The path should start from the folder of the plugin where the file is located.

Additionally, there is a possibility to export all files (and subfolders) of the specified plugin folder. To do this, we need to end the path with ‘/’ which means that it is a folder (we can also use ‘/*’ at the end of the path).

Example:
<dep:pluginconfigfiles>
<dep:pluginconfigfile>
<dep:repositoryentry>
DataProviderManager/WerkII/default/AmountFirstPrice.xml
</dep:repositoryentry>
</dep:pluginconfigfile>
<dep:pluginconfigfile>
<dep:repositoryentry>
EntityManager/WerkII/custom/aio/
</dep:repositoryentry>
</dep:pluginconfigfile>
</dep:pluginconfigfiles>
3.2.3 Defining repository file(s) to delete
During package deployment, one may want to delete some files from the repository.
A package can contain list of repository configuration files to delete if existing on the target system. Files can be deleted before uploading repository files from the package (p. 3.2.2)) or after.
| Tag | Type | Description |
| afterupload | Attribute | A flag to decide when it is deleted (after upload (true) or before (false) |
| repositoryentry | Element | Repository path |
Example:
<dep:pluginconfigfilestodelete>
<dep:pluginconfigfiletodelete afterupload="false">
<dep:repositoryentry>EntityManager/WerkII/custom/aio/
</dep:repositoryentry>
</dep:pluginconfigfiletodelete>
<dep:pluginconfigfiletodelete afterupload="true">
<dep:repositoryentry>EntityManager/WerkII/custom/aio/kp.xml
</dep:repositoryentry>
</dep:pluginconfigfiletodelete>
</dep:pluginconfigfilestodelete>