Skip to content

Ant targets for deploy.ant.xml

Rich Groot edited this page Jan 25, 2015 · 5 revisions

Ant targets for deploy.ant.xml

The Ant build file 'deploy.ant.xml' is the cornerstone of both the DCM command line and the DCM plugin. This is intended to be forward-compatible as the underpinnings of DCM are updated.

The Quick Start page describes how to get DCM up and running and the Easy On Ramp page describes the most straightforward approach for applying DCM to your DataPower deployment requirements.

Required properties for all targets:

dcm.dir - fully qualified path to DCM
host - hostname or IP address of target appliance
port - XML Management Interface port on the target appliance (usually 5550)
pwd - password for userid
uid - userid on target appliance

Optional properties for all targets:

work.dir - fully qualified path to working directory - Ant will delete/recreate this directory
schema.dir - fully qualified path to directory where SOMA schema files may be cached by DCM
dumpinput - true/false for gathering debugging information prior to sending request to appliance
dumpoutput - true/false for gatchering debugging information after sending request to appliance

The targets on this page are listed in alphabetic order to make it easy to find a particular one. These targets are used most often:

  • domain-create
  • domain-quiesce
  • domain-unquiesce
  • idcred-from-def
  • import-dpo or import-from-def
  • load-balancer-group-from-def
  • save
  • upload-from-def
  • valcred-from-def

backup-device

Backup an entire appliance. Note that this is not a secure backup that contains all the keys and certificates, this is just a plain appliance backup.

Required properties:

device.backup.file - path to write backup .zip file to

backup-domains

Backup one or more domains.

Required properties:

domain - name of first domain to backup
backup.file - path to write backup .zip file to

Optional properties:

domains - names of additional domains to backup (blank separated)

certificate-from-def

Create one or more certificate objects, optionally uploading the certificate files.

The definition file must contain /dcm:definition/dcm:certificate elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:certificate for the details of the <dcm:certificate> element.

Required properties:

domain - name of domain
cert.file - path to DCM definition file

check-access

Ensure that the target appliance is accessible using the provided properties.

Sets the firmware.version property so that it may be used by other targets.

checkpoint-delete

Delete a checkpoint.

Required properties:

domain - name of domain
checkpoint.name - name of checkpoint to delete

checkpoint-restore

Restore a checkpoint. Note that this restores objects and files but nothing in the cert: directory.

Required properties:

domain - name of domain
checkpoint.name - name of checkpoint to restore

checkpoint-save

Save the contents of the domain as a checkpoint. Note that this include objects and files but nothing in the cert: directory.

Required properties:

domain - name of domain
checkpoint.name - name of checkpoint to save

domain-create

Create the domain, if it does not exist, and save the default domain.

Required properties:

domain - name of domain

domain-delete

Delete the domain, if it exists, and save the default domain.

Required properties:

domain - name of domain

domain-recreate

A combination of the domain-delete, domain-create, and save targets.

Required properties:

domain - name of domain

domain-reset

Reset the domain to its initial state (identical to Domain Reset on the System Control page in the DP browser interface).

Required properties:

domain - name of domain

domain-quiesce

Quiesce all services in the domain prior to applying changes to objects/files in the domain.

Required properties:

domain - name of domain

domain-restart

Rstart the domain (identical to Domain Resstart on the System Control page in the DP browser interface).

Required properties:

domain - name of domain

domain-unquiesce

Unquiesce all services in the domain after applying changes to objects/files in the domain.

Required properties:

domain - name of domain

firmware-rollback

Rollback the firmware on the appliance.

Currently this target does not wait for the rollback to finish and there isn't a target yet that waits for the appliance to come back online.

firmware-update

Update the firmware on the appliance. Note that the license is not automatically accepted, currently, and that may change in a future DCM release.

Currently this target does not wait for the update to finish and there isn't a target yet that waits for the appliance to come back online.

Required properties:

new.firmware.file - path to .scrypt[1234] file containing firmware appropriate to the appliance

host-alias-remove

Ensure that the specified host alias is not defined on the appliance.

Required properties:

host-alias.name - name of host alias

host-alias-set

Ensure that the specified host alias is defined on the appliance.

Required properties:

host-alias.name - name of host alias
host-alias.ip - IP address to associate with this host alias

Optional properties:

host-alias.comment - comment for the host alias
host-alias.mAdminState - enabled/disabled (default enabled)

host-alias-set

Ensure that the specified host alias is defined on the appliance.

Required properties:

host-alias.name - name of host alias
host-alias.ip - IP address to associate with this host alias

Optional properties:

host-alias.comment - comment for the host alias
host-alias.mAdminState - enabled/disabled (default enabled)

idcred-from-def

Create one or more idcred objects along with the underlying key/cert objects, uploading key/cert files to the cert: directory. The DCM definition file allows a great deal of control over this process.

The definition file must contain /dcm:definition/dcm:idcred elements.

See DCM Definitions File Format for the format of the definition file, DCM Definitions: dcm:certificate for the details of the <dcm:certificate> element, and , DCM Definitions: dcm:key for the details of the <dcm:key> element.

Required properties:

domain - name of domain
idcred.file - path to DCM definition file

idcred-from-key-and-cert

Create (or overwrite) an idcred object along with the underlying key/cert objects, uploading the key/cert files to the cert: directory.

Required properties:

domain - name of domain
idcred.cert.file - path to certificate file
idcred.key.file - path to key file
idcred.objname - name of Crypto Identification Credential object to create

Optional properties:

idcred.cert.pwd - password for certificate file, will prompt console if not specified
idcred.key.pwd - password for key file, will prompt console if not specified
ignoreexpiration - true/false to ignore expiration of certificate

idcred-from-p12

Create (or overwrite) an idcred object along with the underlying key/cert objects, uploading the key/cert files to the cert: directory, based on a PKCS#12 file.

Required properties:

domain - name of domain
idcred.p12.file - path to PKCS#12 file containing a key and certificate
idcred.objname - name of Crypto Identification Credential object to create

Optional properties:

idcred.p12.pwd - password for p12 file, will prompt console if not specified
ignoreexpiration - true/false to ignore expiration of certificate

import-from-def (was import-changed)

Import a .zip file into the target domain. Changes may optionally be specified using a DCM definition file.

The definition file must contain /dcm:definition/dcm:deployment-policy elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:deployment-policy for the details of the <dcm:deployment-policy> element.

Required properties:

domain - name of domain
import.file - path to export (.zip) file to import

Optional properties:

import.changes.file - path to DCM definition file

import-dpo

Import a .zip file into the target domain, applying a deployment policy object that already exists in that domain.

Required properties:

domain - name of domain
import.file - path to export (.zip) file to import
deployment.policy.object - name of deployment policy object to apply

key-from-def

Create one or more key objects, optionally uploading the key files.

The definition file must contain /dcm:definition/dcm:key elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:key for the details of the <dcm:key> element.

Required properties:

domain - name of domain
key.file - path to DCM definition file

load-balancer-group-from-def

Create one or more load balancer group objects based on the definition file. Note that this is most useful when overwriting a load balancer group object that already exists and is referenced by an XML Manager object. Otherwise, creating a new load balancer group object also requires modifying an XML Manager object by adding a reference to the new load balancer group object. See objects-from-def to add that reference.

The definition file must contain /dcm:definition/dcm:loadbalancergroup elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:loadbalancergroup for the details of the <dcm:loadbalancergroup> element.

Required properties:

domain - name of domain
lbg.file - path to DCM definition file

objects-from-def

Create, modify, or delete any object. This is an enormously flexible target and as a result requires some skill and familiarity with the underlying SOMA XML.

The definition file must contain /dcm:definition/dcm:object-* elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:object-* for the details of the <dcm:object-\*> elements.

Required properties:

domain - name of domain
objects.file - path to DCM definition file

restore-backup

Restore one or more domains from an export file created by backup-device or backup-domains.

Required properties:

domain - name of domain
backup.file - export .zip file

Optional properties:

domains - additional domains to restore (blank separated)
dry-run - true/false to skip doing restore (default false)

save

Save the configuration in the domain (identical to Save Config in the DP browser interface).

Required properties:

domain - name of domain

set-log-level

Set the default log level in the domain. Note that this affects only the default log level, it does not affect any other log targets in the domain.

Required properties:

domain - name of domain
log.level - debug, info, noice, warn, error, critic, alert, emerg  

upload-dir

Upload a directory, creating/overwriting files and directories as needed. It is not possible to rename files or directories during this upload.

This target is very powerful when combined with a custom (your own) use of Ant's element. Write a element that combines/filters/renames a set of files to some temporary directory then upload the contents of that directory.

Required properties:

domain - name of domain
upload-from.dir - path (directory) whose contents are uploaded
upload-to.dir - DP path (e.g. local:///bob) where the contents are uploaded to

upload-from-def

Upload files and directories based on an Ant element.

(Note that this target employs a limited form of the <dpupload> Ant task definition, where each dcm:upload element results in a <dpupload> containing an <include> element (see Ant FileSet). It is possible to write your own target that directly invokes <dpupload> and incorporating the full power of the Ant FileSet.)

The definition file must contain /dcm:definition/dcm:upload elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:upload for the details of the <dcm:upload> element.

Required properties:

domain - name of domain
upload.file - path to DCM definition file

valcred-from-def

Create one or more valcred objects along with the underlying certificate objects, uploading certificate files to the cert: directory. The DCM definition file allows a great deal of control over this process.

The definition file must contain /dcm:definition/dcm:valcred elements.

See DCM Definitions File Format for the format of the definition file and DCM Definitions: dcm:valcred for the details of the <dcm:valcred> element.

Required properties:

domain - name of domain
valcred.file - path to DCM definition file

valcred-from-dir

Create a valcred object and certificate objects based on the files in the specified directory, uploading those files in the process.

Note that the Crypto Certificate objects are automatically named based on the names of the certificate files.

Required properties:

domain - name of domain
valcred.dir - path to a directory containing only certificate files
valcred.objname - name of the valcred object