Introduction to the XL Deploy File plugin

An application can depend on external resources for its configuration. The application accesses these resources from a predefined location or using a predefined mechanism. A resource can be described as a file, an archive (ZIP), or a folder which is a collection of files.

You can use the XL Deploy File plugin to define these resources in a deployment package and manage them on a target host. It can deploy a file.File, file.Folder, or file.Archive configuration item (CI) on an overthere.Host CI.

The file, folder, or archive can contain placeholders that the plugin will replace when targeting to the specific host, allowing resources to be defined independent of their environment.

Using the File plugin, you can:

  • Deploy a file-based resource on a host.
  • Upgrade a file-based resource on a host.
  • Undeploy a file-based resource on a host.

Use in deployment packages

This is a sample deployment package (DAR) manifest that defines a file, folder, and archive resource:

<udm.DeploymentPackage version="1.0" application="FilePluginSample">
    <file.File name="sampleFile" file="sampleFile.txt"/>
    <file.Archive name="sampleArchive" file="sampleArchive.zip" />
    <file.Folder name="sampleFolder" file="sampleFolder" />
</udm.DeploymentPackage>

Customizing copy behavior

If the location on the host where the file, folder, or archive will be copied, known as the targetPath, is shared with other resources, you can set the targetPathShared property on the relevant CI type to true. XL Deploy will not delete the target path when updating or undeploying a deployed application. XL Deploy will only delete the artifacts that were copied to the target path.

Example: There is a shared directory called SharedDir, which contains a directory that was not created by XL Deploy called MyDir. If targetPathShared is set to true, XL Deploy will not delete /SharedDir/MyDir/ when updating or undeploying a deployed application. If targetPathShared is set to “false”, XL Deploy will delete /SharedDir/MyDir/.

If /SharedDir/MyDir/ exists and XL Deploy will deploy a folder named MyDir, XL Deploy will not delete /SharedDir/MyDir/ during the initial deployment. Files with the same name will be overwritten. XL Deploy will delete /SharedDir/MyDir/ during an update or undeployment.

You can also customize the copy commands that the remoting plugin uses for files and directories. For more information see, Remoting plugin and Overthere connection options.