Importing deployment environment definitions using the command line

You can import deployment environment definitions using the This topic applies only to the z/OS platformwsadmin.shThis topic applies only to the Distributed platformswsadmin command. You can use the This topic applies only to the z/OS platformwsadmin.shThis topic applies only to the Distributed platformswsadmin command to perform the same definition-import task that you perform in the administrative console. This capability allows you to use a script to import many deployment environment definitions to a deployment manager freeing the administrative console for other tasks and enables you to replicate working configurations to other deployment managers.

Before you begin

Required security role for this task: When security and role-based authorization are enabled, you must use a userid and password with administrator or operator authority to perform this task.

About this task

Use the command line to import deployment environment definitions in the following situations:

Procedure

  1. This topic applies only to the Distributed platformsOpen a command window.

    This topic applies only to the Distributed platformsThe wsadmin command can be found at either the <WPS>/profiles/dmgr_profile/bin directory, or the <WPS>/bin directory.

    This topic applies only to the z/OS platformTelnet into UNIX System Services.

  2. This topic applies only to the Distributed platformsCopy the deployment environment definition XML file you are importing to the system.

    This topic applies only to the z/OS platformCopy the deployment environment definition XML file you are importing to your chosen directory

  3. This topic applies only to the Distributed platformsEnter the This topic applies only to the Distributed platformswsadmin command to enter the This topic applies only to the Distributed platformswsadmin environment. This topic applies only to the z/OS platformEnter the This topic applies only to the z/OS platformwsadmin.sh command from the WAS_HOME/profiles/dmgr_profile/bin or the WAS_HOME/bin directory.
  4. Use the importDeploymentEnvDef command to import the deployment environment definition from the file you just copied to the deployment manager. You can rename the deployment environment when you import it.
    Note: If administrative security is on, you will be prompted for a user ID and password, if you do not supply it in the command.

Example

This example imports the deployment environment myDepEnv and renames it eastDepEnv on the deployment manager myDmgr with administrative security enabled.This topic applies only to the Distributed platforms
wsadmin -connType SOAP -host myDmgr -port 8879 -user dmgrAdmin -password -dmgrPass 
> $AdminTask importDeploymentEnvDef {-filePath
c:/dmgr01/importedEnvironments/myDepEnv.xml -topologyName eastDepEnv}
This topic applies only to the z/OS platform
wsadmin.sh -connType SOAP -host myDmgr -port 8879 -user dmgrAdmin -password -dmgrPass 
> $AdminTask importDeploymentEnvDef {-filePath
/dmgr01/importedEnvironments/myDepEnv.xml -topologyName eastDepEnv}
The -connType parameter specifies the type of connection to be used; the default argument is SOAP.
Note: As the default is SOAP, you do not need to give explicitly if SOAP is the connection type that is being used.
The -host parameter specifies the host used for the SOAP or RMI connection. The default value for -host is the local host.
Note: If the node is running on the local host, you do not need to specify -host
Note: If you disable administrative security, you do not need to specify a user ID and password.

What to do next

Optiional: Validate the imported deployment environments.