Discovery in the IBM WebSphere AS plugin

Discovery is the process of scanning your environment and creating configuration items (CIs) in the Deploy repository based on the configurations that are found. Discovery allows you to easily set up your infrastructure. However, the discovered CIs may not always be completed, as some CIs contain properties that cannot be automatically discovered, such as passwords. You must enter these properties manually.

The WebSphere Application Server (WAS) plugin can only discover WebSphere CIs using a Deployment Manager. Discovery using Administrative Agents is not supported.

Discovery process

The process includes the following steps:

  1. Create a CI that represents the starting point for discovery. This is often a host CI).
  2. Start discovery, passing this CI.
  3. Store the discovered CIs in the repository.
  4. Manually complete the discovered CIs by providing missing properties.

Note: The discovered CIs are stored in the repository under Infrastructure. You can optionally add the discovered CIs to an environment, or do so at a later time.

Create a CI starting point

Create a starting point for the discovery process by specifying the host for which discovery will start.

The following is an example of using the command-line interface (CLI) to create a starting point that you can use for discovery:

  1. A CI for the WebSphere Application Server host.
  2. A CI for the Websphere Deployment Manager running on the host.

Create a CI with the required discovery parameters filled in

    wasHost = factory.configurationItem('Infrastructure/', 'overthere.SshHost', {
            'address': 'was-61',
            'username': 'root',
            'password': 'rootpwd',
            'os': 'UNIX',
            'connectionType': 'SFTP'})


Create a WAS deployment manager

    dmManager = factory.configurationItem( + '/wasDM', 'was.DeploymentManager', {

The possible values for version are: WAS_61, WAS_70, WAS_80, and WAS_85. The final segment of the CI ID (wasDM in this example) must match the WebSphere cell name.

Start discovery passing a CI

After the CI starting point has been created, you can use it to perform discovery. The Deploy CLI discovery functionality is synchronous, meaning that the CLI will wait until the discovery process finishes.

The process of discovery works exactly like a regular task:

deployit> taskId = deployit.createDiscoveryTask(dmManager)
deployit> deployit.startTaskAndWait(taskId)
deployit> discoveredCIs = deployit.retrieveDiscoveryResults(taskId)

Note: There are no single or double quotes around dmManager, because it is an object, and not a string. The result of this command will be an object containing a list of discovered CIs.

Store the CIs in the repository

Deploy returns a list of discovered middleware CIs. They are not yet persisted. Ensuring that you have appropriate database permissions to store them in the repository, use the following code:


Complete discovered middleware CIs

The easiest way to see which discovered CIs require additional information is by printing them. You will need to manually complete any CIs that contain passwords displayed as ********. To print the stored CIs, the following code can be used:

for ci in discoveredCIs: deployit.print(;

You can edit the created CIs in the Repository node using the Deploy GUI.

Adding CIs to environments

You must group middleware that is used as a deployment target together in an environment. To create an environment using the CLI:

env = factory.configurationItem('Environments/DiscoveredEnv', 'udm.Environment')

To add the discovered CIs to the environment:

env.values['members'] = [ for ci in discoveredCIs]

Note: Not all of the discovered CIs should necessarily be stored in an environment. For example, in the case of WAS, some nested CIs may be discovered of which only the top-level one must and can be stored.

Store the new environment:


The newly created environment can now be used as a deployment target.

Enable discovery for additional CI types

You can configure the CI types for which discovery is enabled using the following line in the XL_DEPLOY_SERVER_HOME/conf/ file:


To add more CIs, uncomment the line and add the CI names. For example:

was.DeploymentManager.deployedsToDiscover=was.VirtualHost,was.SharedLibrary, was.StringNameSpaceBinding