+

Search Tips   |   Advanced Search

Administrative job types

In a flexible management environment, we can use wsadmin.sh to submit administrative jobs to the job manager. This topic provides detailed information about the administrative jobs, the job parameters, and sample command syntax.

In a flexible management environment, we can configure an administrative agent and job manager to submit jobs to multiple targets or target groups in the configuration. Then, we can submit administrative jobs to queue jobs across the managed environment. Each administrative job has a corresponding job type, which defines the required parameters to submit the job. We can use the commands in the AdministrativeJobs command group to submit administrative jobs to the job manager.

We can submit administrative jobs to manage the applications.


Common parameters for all job types

Use the submitJob command to submit administrative jobs. Job submissions consist of the following information:

Required parameters

Each submitJob command requires at least the jobType parameter. Many submitJob commands also require the targetList or jobParams parameters:

Parameter Description Type
jobType Type of job to perform. Many job types exist in the flexible management environment including application management, product maintenance, configuration, and application server runtime control jobs. String
targetList Specifies one or more managed targets where the job runs. String
jobParams Specifies configuration information in addition to the job type and target in order to run the job. Job parameters are specific to each job type. String

Optional generic parameters

In addition to the job specific parameters, we can include any of the following optional parameters with the job submission:

descriptions. Run a submitJob command with its required
Parameter Description Type
group Name of the group of managed targets where the job runs. String
username User name to use at the targets when the job is run. If the user name and password are not specified, and security is enabled, the user ID at the job manager is used. String
password Password for the user name to use at the targets when the job is run. If the user name and password are not specified, and security is enabled, the user ID at the job manager is used. String
privateKeyFile Fully qualified private key file to use at the targets when the job is run. Specify the full path to the keystore. String
passphrase Fully qualified passphase to use at the targets when the job is run. Specify a passphrase if the keystore requires a passphrase. String
useSudo Specifies to enable use of a substitute user to perform commands on the target host. The default is not to use sudo. The sudo option is supported on AIX, HP-UX, Linux, and Solaris operating systems only.

Enable useSudo to change users before a job runs, and then specify the user name and password for the substitute user as needed. sudo means "substitute user do". If the target host does not require a password, leave the password fields blank. The following selection combinations are valid:

  • Enable useSudo, and do not specify values for sudoUsername and sudoPassword. These selections use the default user set in the /etc/sudoers file and use the password of the connection user.

  • Enable useSudo, specify a value for sudoUsername, and do not specify a value for sudoPassword. These selections use the specified user and use the password of the connection user.

  • Enable useSudo, specify a value for sudoUsername, and specify a value for sudoPassword. These selections use the specified user and sudo password.

Boolean
sudoUsername User name for the substitute user. For information on when to specify a value for sudoUsername, see the useSudo description. String
sudoPassword Specifies a password for the substitute user. For information on when to specify a value for sudoPassword, see the useSudo description. String
description Specifies a description for the job. String
activationDateTime Date and time to activate the job in the format "2006-05-03T10:30:45-0000". The -0000 section of the activationDateTime parameter value represents RFC 822 format. We can specify Z as a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z". If we do not specify the time zone, the system uses the time zone of the job manager. String
expirationDateTime Expiration date for the job, in the format "2006-05-03T10:30:45-0000". The -0000 section of the activationDateTime parameter value represents RFC 822 format. We can specify "Z" as a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z". If we do not specify the time zone, the system uses the time zone of the job manager. String
executionWindow Recurring interval, if any, for the job. String
executionWindowUnit Unit of measure for the recurring interval. Valid values include HOURS, DAYS, WEEKS, MONTHS, CONNECT, and ONCE. The default value is HOURS. String
email Email address where the system sends job notifications. String

Enter wsadmin commands from the bin directory of the job manager profile. This topic shows examples in the Jython scripting language.

Example usage:

AdminTask.submitJob('-jobType installApplication -targetList [Target1 Target2 Target3]
 -jobParams [applicationName MyApp] -email admin@company.com ')

Interactive mode:

Job result example usage:

Running a submitJob command returns a job token such as 124231200726586682. For information on the job token, run a getJobTargetStatus command:

An administrative job logs results such as the following:

  • Job status results typically progress from DISTRIBUTED to ASYNC_IN_PROGRESS to SUCCEEDED. We might need to run a getJobTargetStatus command more than once, until the result is FAILED, REJECTED, or SUCCEEDED.

    By default, a job remains active for one day (24 hours).


    Submit a job to collect inventory

    The inventory administrative job collects inventory data from the targets. This inventory data includes the available job types and the status of the managed resources, such as applications and servers, for each target.

    When a target is a host, the inventory data includes information on the host such as operating system name, version, Installation Manager, package group, packages, profiles, and other resources.

    The inventory job to find Liberty profile resources, variables for the WLP_WORKING_DIR, WLP_SHARED_DIR, or WLP_ADDITIONAL_DIRS must be defined. See Setting variables for Liberty profile servers.

    (iseries) Note: The centralized installation manager can not discover profiles for Application Client and Plugin on IBM i platforms.

    Job parameters None.

    Example usage

      AdminTask.submitJob('-jobType inventory -targetList [Target1 Target2 Target3]')


    Submit a job to collect target status

    The status administrative job collects status data from the targets. Use this job, instead of the inventory job, if you only want to refresh data on the managed resources, such as applications, and servers, for each target.

    When a Liberty profile server is the target, this job updates the server status of Liberty profile server resources only. It does not discover new server resources or remove deleted server resources. To discover new server resources, submit an inventory job instead.

    Job parameters None.

    Example usage

      AdminTask.submitJob('-jobType status -targetList [Target1 Target2 Target3]')


    Submit jobs to manage files

    We can use the file management jobs to collect, distribute, and remove files. For example, we can submit the collectFile job to transfer a file to the job manager. The distributeFile job transfers a file from the job manager to the targets for the job. The removeFile job removes a file that was previously distributed to the target:

    We can use file management jobs with remote host targets. Use distributeFile to send a file to remote hosts, collectFile to collect files from remote hosts, and removeFile to delete files from remote hosts.


    collectFile

    The collectFile administrative job collects a target file and transfers it to the job manager. If the source location is a directory instead of a file, the job recursively compresses the directory contents and transfers the resulting compressed zip file.

    Job parameters

    Parameter Description Type
    source Source location of the file or directory of interest. The system determines the file location is relative to the profile_root directory of the target. String
    destination Destination location. The value is relative to a directory named profile_root/config/temp/JobManagerName/jobToken/targetName. String
    distributionProvider Optionally specifies the name of the distribution provider. String

    Example usage

    The following example runs the collectFile job:

    AdminTask.submitJob('[-jobType collectFile -targetList [Target1]
     -jobParams [[source logs][destination targetLocationOfFile]]]')


    distributeFile

    The distributeFile administrative job transfers a file from the job manager to the targets for the job. The system stores the file at the target in preparation for subsequent jobs that will use the file. The installApplication and updateApplication administrative jobs reference the destination that you provide to the distributeFile job as the location of the application content on the target. Additionally, we can use this job to distribute script files and properties-based configuration files.

    The file to distribute from the job manager initially must be in the /config/temp/JobManager directory of the job manager profile. Then, the system moves the file into the downloadedContent directory of the administrative agent or dmgr profile. The destination parameter is relative to the downloadedContent directory and can be a file name or a relative path name. We can use a relative path to create separate subdirectories under the downloadedContent directory to organize downloaded files.

    Avoid trouble: To submit the distributeFile job before submitting other jobs, first place the file to be distributed under the JobManager directory. To create the JobManager directory manually...

    1. Use an administrative user with *ALLOBJ and *SECADM permission, use the command prompt to change directories to <WAS_UserHome>/profiles/<jobmanagerprofile>/config/temp.

    2. Enter the following command: mkdir JobManager

    3. Enter the following command: chown -R QEJBSVR JobManager

    4. Copy the file to be distributed to the JobManager directory.

    5. From the administrative console, submit the distributeFile job.
    gotcha

    Job parameters

    Parameter Description Type
    source Source location of the content to distribute. String
    destination Destination location on the target where the system saves the content. String
    distributionProvider Optionally specifies the name of the distribution provider. String

    Example usage

    AdminTask.submitJob('-jobType distributeFile -targetList [Target1 Target2 Target3]
    -jobParams [[source file:/MyApp.ear][destination MyApp.ear]]')


    removeFile

    The removeFile administrative job removes a file that was previously distributed to the target. The location parameter is relative to the downloadedContent directory, and it should be the same location as the location that was specified for the destination parameter when the file was distributed.

    Job parameters

    Parameter Description Type
    location Location of the file to remove from the target. Use the destination value from the distributeFile job. String
    distributionProvider Optionally specifies the name of the distribution provider. String

    Example usage

      AdminTask.submitJob('-jobType removeFile -targetList [Target1 Target2 Target3] -jobParams [location MyApp.ear]')


    Submit a job that runs a wsadmin script

    We can submit a job to run a wsadmin script on a managed target of the job manager. The managed target can be a deployment manager or an unfederated application server. Before running a wsadmin script on a managed target, transfer the wsadmin script, and any script profile, from the job manager to the managed target using the distributeFile job. Remember any destination value specified when distributing the file. Then use the following job to run the wsadmin script. Use the destination value for the scriptFileLocation parameter. If we specified a profile destination value, optionally use the profile destination value for the profileLocation parameter.

    The status result of a runWsadminScript job depends on the return code of the script. When the return code is zero, the job is marked as successful. When the return code is a value that is not zero, the job is marked as failed.

    Job parameters

    a submitJob runWsadminScript command with at least a scriptFileLocation
    Parameter Description Type
    scriptFileLocation Location of the script file to run on the managed target. The location is the destination that was given when the file was distributed to the target. String
    profileLocation Optionally specifies the location of the profile script to run with the wsadmin script. This parameter corresponds to the -profile parameter of wsadmin. The location is the destination specified when the file is distributed to the target. String
    scriptParameters Optionally specifies parameters to give to the wsadmin script. String

    Example usage

    AdminTask.submitJob('[-jobType runWsadminScript -targetList [DmgrManagedNodeName]
     -jobParams [ [scriptFileLocation myScript.py] [profileLocation scriptProfile.py]
     [scriptParameters [param1 param2]] ]]')

    For wsadmin scripts that process multiple keyword-value pairs for command parameters, such as argv[] command parameters, use scriptParameters to specify the keywords and values:

    AdminTask.submitJob('[-jobType runWsadminScript -targetList [myNode01]
     -jobParams [ [scriptFileLocation myScript.py] [scriptParameters [-keyword1 value1 -keyword2 value2]] ]]')


    Submit jobs to manage applications

    We can use the application management jobs to distribute, install, update, remove, and control applications on the application server. For example, we can submit the distributeFile, installApplication and startApplication jobs to deploy applications in the environment. To remove applications from the environment, submit the stopApplication, uninstallApplication, and removeFile jobs. Use the following application management jobs to administer the application configurations:


    installApplication

    The installApplication administrative job installs and binds an application or application element into the target environment. We must run the distributeFile job and distribute the deployable content to the targets before we can install the application.

    The installApplication job does not provide a means for providing binding information, or other deployment attributes. If we need that capability, we can use the runWsadminScript, or configureProperties jobs.

    Important: Before we can submit this job, the profile_root/downloadedContent directory must exist for the deployment manager or administrative agent. Create this directory, if it does not already exist.

    Job parameters

    a submitJob installApplication command with at least an applicationName
    Parameter Description Type
    applicationName Specifies an application name to use to identify the application to install. Often this is the base file name of the enterprise application (for example, MyApp for MyApp.ear), but we can choose any name. String
    appLocation Optionally specifies the location of the application file to install. By default, the installApplication job appends the .ear file format notation to the application name, and searches for the application in the default destination location.

    Thus, if specified MyApp for applicationName, by default the appLocation is downloadedContent/MyApp.ear of the managed target. If we specify a value for appLocation, use the destination value that specified when distributing the application.

    String
    serverName Optionally specifies the name of the server where the system installs the application. String
    nodeName Optionally specifies the node of interest, which identifies the server in a WAS Network Deployment cell. String
    clusterName Optionally specifies the name of the cluster in which the application is installed. String

    Example usage

    AdminTask.submitJob('-jobType installApplication -targetList [Target1 Target2 Target3]
     -jobParams [[applicationName MyApp]]')

    or:

    AdminTask.submitJob('-jobType installApplication -targetList [Target1 Target2 Target3]
     -jobParams [[applicationName MyApp][appLocation MyApp.ear][clusterName TestCluster]]')


    startApplication

    The startApplication administrative job starts a previously installed application on the target. The system changes the application status to active or RUNNING, loads the application in the run time, and opens the application to receive client requests. This is the last step in the application deployment process.

    Job parameters

    parameter description. Run a submitJob startApplication
    Parameter Description Type
    applicationName Name of the application to start. String

    Example usage

      AdminTask.submitJob('-jobType startApplication -targetList [Target1 Target2 Target3] -jobParams [applicationName MyApp]')


    stopApplication

    The stopApplication administrative job stops the application on the target. The system changes the application status to stopped and no longer receives client requests. We can use the startApplication job to restart the application. This is the first step in the application removal process.

    parameter description. Run a submitJob stopApplication
    Parameter Description Type
    applicationName Name of the application to stop. String

    Example usage

      AdminTask.submitJob('-jobType stopApplication -targetList [Target1 Target2 Target3] -jobParams [applicationName MyApp]')


    updateApplication

    The updateApplication administrative job updates an application or application element in the target environment. We must run the distributeFile job and distribute the deployable content to the targets before we can update the application.

    Important: Before we can submit this job, the profile_root/downloadedContent directory must exist for the deployment manager or administrative agent. Create this directory, if it does not already exist.

    Job parameters

    a submitJob updateApplication command with at least an applicationName
    Parameter Description Type
    applicationName Specifies an application name to use to identify the application to update. Often this is the base file name of the enterprise application (for example, MyApp for MyApp.ear), but we can choose any name. String
    appLocation Optionally specifies the location of the application file to install. By default, the updateApplication job appends the .ear file format notation to the application name, and searches for the application in the default destination location.

    Thus, if specified MyApp for applicationName, by default the appLocation is downloadedContent/MyApp.ear of the managed target. If we specify a value for appLocation, use the destination value that specified when distributing the application.

    String
    serverName Optionally specifies the name of the server where the system updates the application. String
    nodeName Optionally specifies the node of interest, which identifies the server in a WAS Network Deployment cell. String
    clusterName Optionally specifies the name of the cluster in which the application is updated. String

    Example usage

      AdminTask.submitJob('-jobType updateApplication -targetList [Target1 Target2 Target3] -jobParams [[applicationName MyApp]]')

    or:

      AdminTask.submitJob('-jobType updateApplication -targetList [Target1 Target2 Target3] -jobParams [[applicationName MyApp][appLocation MyApp.ear][clusterName TestCluster]]')


    uninstallApplication

    The uninstallApplication administrative job uninstalls the application from the targets.

    Job parameters

    Parameter Description Type
    applicationName Name of the application to remove. String

    Example usage

    AdminTask.submitJob('-jobType uninstallApplication -targetList [Target1 Target2 Target3]
     -jobParams [applicationName MyApp]')


    Submit jobs to manage servers

    The system administrator can use the application server configuration jobs to modify the configuration for remote and local application servers.


    createApplicationServer

    The createApplicationServer administrative job creates an application server in the target environment.

    Job parameters

    parameter descriptions. Run a submitJob createApplicationServer
    Parameter Description Type
    serverName Name of the application server to create. The server name must be unique on the target node. String
    nodeName When the target is a WAS Network Deployment cell, specify the node name to indicate on which node in the cell the server is to be created. You do not have to specify the node name for a base node. String
    templateName Optionally specifies the server template. String
    templateLocation Optionally specifies the location where the template is stored. Use the default, system defined location unless specify a template location. String
    genUniquePorts Optionally specifies to generate unique http ports for a server. By default, the product generates unique port numbers. Boolean
    (zos) specificShortName For z/OS environments only, optionally specifies the specific short name of the server. Each server must have a unique specific short name. By default, the product assigns a unique specific short name. The value must be 8 characters or fewer and all uppercase. String
    (zos) genericShortName For z/OS environments only, optionally specifies the generic short name of the server. All members of a cluster share the same generic short name. Individual servers must have unique generic short name. By default, the product assigns a unique generic short. The value must be 8 characters or fewer and all uppercase. String
    (zos) bitMode For z/OS environments only, optionally specifies the bit mode of the server. Valid values are 31 and 64 bit. If no value is given, the product assigns the default bit mode. Integer

    Example usage

    AdminTask.submitJob('-jobType createApplicationServer -targetList
     [Node1 Node2 Node3] -jobParams [serverName AppServer01]')


    deleteApplicationServer

    The deleteApplicationServer administrative job removes an application server from the target environment.

    Job parameters

    parameter descriptions. Run a submitJob deleteApplicationServer
    Parameter Description Type
    serverName Name of the application server to delete. String
    nodeName When the target is a WAS Network Deployment cell, specify the node name to indicate from which node in the cell the server is to be deleted. You do not have to specify the node name for a base node. String

    Example usage

      AdminTask.submitJob('-jobType deleteApplicationServer -targetList [Node1 Node2 Node3] -jobParams [serverName AppServer01]')


    createProxyServer

    The createProxyServer administrative job creates a proxy server in a cell of a deployment manager that is a managed target of a job manager.

    Job parameters

    a submitJob createProxyServer command with serverName and nodeName
    Parameter Description Type
    serverName Name of the proxy server to create. String
    nodeName Node in which the proxy server will reside. String

    Example usage

      AdminTask.submitJob('[-jobType createProxyServer -jobParams [[serverName testServer1][nodeName testNode1]] ]')


    deleteProxyServer

    The deleteProxyServer deletes a proxy server from a cell of a deployment manager that is a managed target of a job manager.

    Job parameters

    a submitJob deleteProxyServer command with serverName and nodeName
    Parameter Description Type
    serverName Name of the proxy server to delete. String
    nodeName Node in which the proxy server resides. String

    Example usage

      AdminTask.submitJob('[-jobType deleteProxyServer -jobParams [[serverName testServer1][nodeName testNode1]] ]')


    createCluster

    The createCluster administrative job creates a cluster. To create the cluster in a cell, you must register the deployment manager of the cell with a job manager.

    Job parameters

    Parameter Description Type
    clusterConfig.clusterName Name of the server cluster. String
    clusterConfig.preferLocal Optionally enables node-scoped routing optimization for the cluster. String
    clusterConfig.clusterType Optionally specifies the type of server cluster. String
    (zos) clusterConfig.shortName Optionally specifies the short name of the server cluster. String
    replicationDomain.createDomain Optionally creates a replication domain with a name set to the name of the new cluster. String
    convertServer.serverNode Optionally specifies the name of the node of the existing server to convert to the first member of the cluster. String
    convertServer.serverName Optionally specifies the name of the existing server to convert to the first member of the cluster. String
    convertServer.memberWeight Optionally specifies the weight value of the new cluster member. String
    convertServer.nodeGroup Optionally specifies the name of the node group to which all cluster member nodes must belong. String
    convertServer.replicatorEntry Optionally specifies that a replicator entry for this member is created in the cluster replication domain. The replicator entry is used for HTTP session data replication. String

    Example usage

      AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [clusterConfig.clusterName newCluster1]]')

    If we specify additional parameters on the createCluster command, use the format of [stepName.parameterName parameterValue] in the -jobParams list of parameters.

      AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterConfig.clusterName newCluster1] [clusterConfig.clusterType PROXY_SERVER] ]]')


    deleteCluster

    The deleteCluster administrative job deletes a cluster. To delete the cluster in a cell, you must register the deployment manager of the cell with a job manager.

    Job parameters

    Parameter Description Type
    clusterName Name of the server cluster to delete. String
    replicationDomain.deleteRepDomain Optionally used to indicate that the cluster replication domain is to be deleted when the cluster is deleted. String

    Example usage

      AdminTask.submitJob('[-jobType deleteCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterName newCluster1] [replicationDomain.deleteRepDomain true] ]]')


    createClusterMember

    The createClusterMember administrative job creates a cluster member on a cluster, which is in a cell. We must register the deployment manager of the cell with a job manager.

    Job parameters

    parameter descriptions. Run a submitJob createClusterMember command with at least the clusterName, memberConfig.memberNode, and
    Parameter Description Type
    clusterName Name of the server cluster to which the new cluster member belongs. String
    memberConfig.memberNode Name of node where the new cluster member is to reside. String
    memberConfig.memberName Name of the new cluster member. String
    memberConfig.memberWeight Optionally specifies the weight of the new cluster member. String
    memberConfig.memberUUID Optionally specifies the universal unique identifier (UUID) of the new cluster member. String
    memberConfig.genUniquePorts Optionally specifies to generate unique port numbers for HTTP transports defined in the server. String
    memberConfig.replicatorEntry Optionally specifies that a replicator entry for this member is created in the cluster replication domain. The replicator entry is used for HTTP session data replication. String
    (zos) memberConfig.specificShortName Optionally specifies the short name of the cluster member. String
    firstMember.templateName Optionally specifies the name of the application server template to use as the model for new cluster members. String
    firstMember.templateServerNode Optionally specifies the name of the node of an existing server to use as a template for new cluster members. String
    firstMember.templateServerName Optionally specifies the name of the server to use as model for new cluster members. String
    firstMember.nodeGroup Optionally specifies the name of the node group to which all cluster member nodes must belong. String
    firstMember.coreGroup Optionally specifies the name of the core group to which all cluster members must belong. String

    Example usage

    AdminTask.submitJob('[-jobType createClusterMember
     -targetList [DmgrManagedNodeName]
     -jobParams [ [memberConfig.memberName newCluster1mem1]
       [memberConfig.memberNode FederatedNode] [clusterName newCluster1] ]]')


    deleteClusterMember

    The deleteClusterMember administrative job deletes a cluster member from a cluster, which is in a cell. We must register the deployment manager of the cell with a job manager. The cluster must have at least one cluster member on a federated node.

    Job parameters

    parameter descriptions. Run a submitJob deleteClusterMember command with at least the clusterName, memberNode, and memberName
    Parameter Description Type
    clusterName Name of a server cluster to which the cluster member to be deleted belongs. String
    memberNode Name of the node where the cluster member resides. String
    memberName Server name of the cluster member to be deleted. String
    replicatorEntry.deleteEntry Optionally specifies to delete the replicator entry having the server name of this cluster member from the replication domain of the cluster. String

    Example usage

    AdminTask.submitJob('[-jobType deleteClusterMember -targetList   [DmgrManagedNodeName] -jobParams [ [memberName newCluster1mem1]
     [memberNode FederatedNode] [clusterName newCluster1] ]]')


    configureProperties

    The configureProperties administrative job applies a properties file to the application server configuration. This job uses the applyConfigProperties command in the PropertiesBasedConfiguration (AdminTask) to configure the properties for the target.

    Job parameters

    a submitJob configureProperties command with at least the propertiesFileLocation
    Parameter Description Type
    propertiesFileLocation Location of the properties file to apply to the targeted application server.

    The path specified for this parameter is the relative path from the profile_root/downloadedContent directory for the deployment manager. Create this directory, if it does not already exist, before you start the configureProperties administrative job.

    String
    variableMapLocation Optionally specifies the location of a variable map file to include with the properties file. String

    Example usage

      AdminTask.submitJob('-jobType configureProperties -targetList [Target1 Target2 Target3] -jobParams [propertiesFileLocation myProperties.props]')


    Submit jobs to manage the server runtime

    The system administrator can use the application server runtime control jobs to start and stop application servers.


    startServer

    The startServer administrative job launches and initializes the application server of interest.

    Job parameters

    Parameter Description Type
    serverName Application server to start. String
    nodeName If the target of the job is a deployment manager node, specify the name of the federated node where the server exists. String

    Example usage

      AdminTask.submitJob('-jobType startServer -targetList [Target1 Target2 Target3] -jobParams [serverName AppServer01]')


    stopServer

    The stopServer administrative job stops the application server of interest. Use the startServer job to restart the application server.

    Job parameters

    Parameter Description Type
    serverName Application server to stop. String
    nodeName If the target of the job is a deployment manager node, specify the name of the federated node where the server exists. String

    Example usage

      AdminTask.submitJob('-jobType stopServer -targetList [Target1 Target2 Target3] -jobParams [serverName AppServer01]')


    startCluster

    The startCluster administrative job starts a cluster. To start a cluster in a cell, you must register the deployment manager of the cell with a job manager.

    Job parameters

    Parameter Description Type
    clusterName Name of the cluster to start. String
    rippleStart Optionally specifies whether the cluster is started in a ripple start. The default value is false. String

    Example usage

    The following example starts a cluster:

      AdminTask.submitJob('[-jobType startCluster -targetList [DmgrManagedNodeName] -jobParams [clusterName newCluster1]]')

    The following example ripple starts a cluster.

      AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterName newCluster1] [rippleStart true] ]]')


    stopCluster

    The stopCluster administrative job stops a cluster. To stop a cluster in a cell, you must register the deployment manager of the cell with a job manager.

    Job parameters

    Parameter Description Type
    clusterName Name of the cluster to stop. String

    Example usage

      AdminTask.submitJob('[-jobType stopCluster -targetList [DmgrManagedNodeName] -jobParams [clusterName newCluster1]]')


    Submit a job to run commands

    The system administrator can use the runCommand job of the job manager to run a command on a remote host. The command might be a command-line utility such as startServer in a app_server_root/bin directory, a wsadmin command, or an operating system command.

    Job parameters

    Parameter Description Type
    command Name of the command to run. String
    workingDir Location of the command file on the remote host. The default value is the app_server_root directory on the remote host. String

    Example usage

    AdminTask.submitJob('-jobType runCommand -targetList Target1
     -username user1 -password ******* -jobParams [[command ./versionInfo.sh]]')

    AdminTask.submitJob('-jobType runCommand -targetList Target1
     -username user1 -password ******* -jobParams [[command versionInfo.bat]]')

    AdminTask.submitJob('-jobType runCommand -targetList Target1
     -username user1 -password *******
     -jobParams [[command "./java -version"][workingDir /opt/IBM/WebSphere/AppServer/java/bin]]')

    AdminTask.submitJob('-jobType runCommand -targetList Target1
     -username user1 -password *******
     -jobParams [[command "java -version"][workingDir C:/WAS_v800/IBM/WebSphere/AppServer/java/bin]]')


    Submit a job to manage profiles

    The system administrator can use the manageprofiles job of the job manager to create, augment, or delete a WAS profile. This job runs the manageprofiles administrative command.

    Job parameters

    Parameter Description Type
    wasHome Location of the WAS installation. This is the app_server_root path on the remote host. String
    responseFile Location of the manageprofiles response file that resides in the job manager. String
    username User name to use at the targets when the job is run. If the user name and password are not specified, and security is enabled, the user ID at the job manager is used. String
    password Password for the user name to use at the targets when the job is run. If the user name and password are not specified, and security is enabled, the user ID at the job manager is used. String

    Example usage

    AdminTask.submitJob('-jobType manageprofiles -targetList Target1 -username user1 -password *******
     -jobParams [[wasHome /WAS80GA][responseFile /temp/mp1.txt]]')


    Submit Installation Manager jobs

    The system administrator can use Installation Manager jobs to install Installation Manager instances, update Installation Manager with a repository, manage Installation Manager offerings, and install WebSphere Application Server products.

    Supported configurations: IBM Installation Manager 1.4.3 or later is required.


    installIM

    The installIM administrative job installs a new instance of Installation Manager by sending an installation kit from the job manager to the hosts.

    Job parameters

    Parameter Description Type
    kitPath Location of the Installation Manager kit. If not specified, the job finds the most recent IM installation kit from the default location. String
    dataPath Location of the Installation Manager data. String
    installPath Location to install the Installation Manager on the target host. Specify this parameter only if there are multiple installation locations that exist within the current cell on the same host. String
    skipPrereqCheck When set to true, optionally specifies that no prerequisite checking be performed when installing Installation Manager and that Installation Manager disk space checking be disabled.

    The default value is false. Prerequisite and disk space checking is performed unless the true value is specified.

    Boolean
    acceptLicense Must be set to true, if we do not specify this parameter, the job will fail. Boolean

    Example usage

      AdminTask.submitJob('-jobType installIM -targetList [Host1 Host2 Host3] -jobParams [acceptLicense TRUE] [kitPath /IM/agent.installer.zip] -username user1 -password pw')

    If we do not specify the IBM Installation Manager installation kit path, the installIM job searches for the most recent IBM Installation Manager installation kit that is suitable for the target platform from the installation kit repository on the job manager. By default, the installation kit repository is app_server_root/IMKits. We can change the location from the job manager. Click Jobs > Installation Manager installation kits, and then change Installation Manager installation kits location to a different location.


    updateIM

    The updateIM administrative job updates an existing Installation Manager with a repository, rather than send an installation kit from the job manager. This updateIM command requires Installation Manager Version 1.4 or later.

    Job parameters

    Parameter Description Type
    repository Location of the repository to update the Installation Manager. The path can be for a local file on the job manager computer, or a URL that points to a remote file. String
    installPath Location of the Installation Manager installation. String
    keyringFile If the offering repository specified in the response file requires log in, specifies the location of the keyring file to use . If the repository does not require log in, then do not specify this parameter. String
    keyringPassword Optionally specifies the password for the keyring file. If the keyring file does not require a password, then do not specify this parameter. String
    acceptLicense Must be set to true, if we do not specify this parameter, the job will fail. Boolean

    Example usage

      AdminTask.submitJob('-jobType updateIM -targetList [Host1] -jobParams [acceptLicense TRUE][ [repository /IM/repository] [installPath /IM] ]')


    manageOfferings

    The manageOfferings administrative job can install, update, modify, rollback or uninstall offerings in Installation Manager. Submit a job that uses an Installation Manager response file and, optionally a keyring file, to manage an offering using a remote repository.

    Avoid trouble: By default, the job enforces the specified data location to be an absolute path.

    • We must begin the path with a drive letter.

    • (iseries)

      (zos) We must begin the path with /.

    To remove this restriction, set the following Java property to true: com.ibm.ws.admin.cimjm.disableDataLocationAbsolutePathCheck=true.gotcha

    Job parameters

    Parameter Description Type
    responseFile Location of the response file to update, modify, rollback, or uninstall Installation Manager offerings. The path can be for a local file on the job manager computer, or a URL that points to a remote file. String
    IMPath Location of the Installation Manager installation. If this parameter is not specified, the job tries to discover and use the path of the default Installation Manager on the target host. If no Installation Manager is found or more than one Installation Manager is found, the job fails. In this situation, the submitJob manageOfferings command must specify the Installation Manager path. String
    keyringFile Location of the keyring file to use if the offering repository specified in the response file requires log in. If the response file does not require log in, then do not specify this parameter. String
    keyringPassword Optionally specifies the password for the keyring file. If the keyring file does not require a password, then do not specify this parameter. String

    Example usage

      AdminTask.submitJob('-jobType manageOfferings -targetList [Host1 Host2 Host3] -jobParams [responseFile /IM/agent.installer.zip] -username user1 -password pw')


    findIMDataLocation

    The findIMDataLocation administrative job can add or search for Installation Manager data locations.

    If a path contains a semicolon (;), enclose the path with double quotes ("). For example: "/opt/my,path";/opt/data1. The job can detect data locations recorded in the Installation Manager registry. On unix platforms, the default registry for a non-administrative installation is located in <userhome>/etc/.ibm/registry. The default registry for an administrative installation is located in /etc/.ibm/registry. You do not need to add data locations that are recorded in the default registry. The job performs the following steps:

    • Validates the data locations specified in the "Additional IM data locations field" and the data locations found by the job during search (if search the system is set to true)

    • Appends the valid data locations to the existing list of data location for future use

    • Removes duplicate data locations

    • Runs the inventory job

    When the job is finished, the inventory for the target is current.

    Job parameters

    a submitJob findIMDataLocation command with at least the responseFile parameter. We can specify both the searchSystem and dataLocations
    Parameter Description Type
    targetList Location of the target systems of the job. String
    searchSystem Specifies CIM to search the entire target system for Installation Manager data locations. String
    dataLocations Location of usable Installation Manager data. The job only lists Installation Manager data locations that are usable to the current target user that is registered on the Administrative Console. String

    Example usage

      AdminTask.submitJob ('[-jobType findDataLocation -targetList targetList -jobParams [[searchSystem true] [datalocations path_to_data_locations_separated_by_semicolon] ]]')


    Submit Liberty profile jobs

    New feature:

    We can submit jobs to install and uninstall Liberty profile resources, and to start and stop Liberty profile servers. A Liberty profile server is a fast to start, dynamic application server which we can add features to and administer by editing XML configuration files. Liberty profile servers are available in WebSphere Application Server v8.5.newfeat

    A Liberty profile installation requires a Java development kit (JDK) or Java runtime environment (JRE) to run jobs that start or stop the server. Set the JDK or JRE location by completing one of the following actions:

    • Set the JAVA_HOME property to the JDK or JRE location in the server.env file. The job reads the JAVA_HOME property and sets it on the target environment before running the command to start or stop the server. However, this property is not used by the Liberty profile server command if you start or stop the server manually.

      (zos) The server.env file must be in EBCDIC encoding.

    • (zos) Set the JAVA_HOME property to the JDK or JRE location in the user .bashrc file.

    • (zos) Append the JDK or JRE path to the PATH environment variable.

    • Set the JAVA_HOME property to the JDK or JRE location as a system environment variable.

    • Append the JDK or JRE path to the PATH system variable.

    If JAVA_HOME is not specified in server.env or in the user environment, the job manager looks for the JDK or JRE in the user search path.


    installLibertyProfileResources

    The installLibertyProfileResources job extracts resources in a Liberty profile image to destination directories relative to the root directory. Before running this job, the following conditions must exist:

    • A host computer must be registered with the job manager.

    • The image, a compressed zip file, must contain Liberty profile resources in a directory structure that satisfies job manager rules. See Packaging Liberty profile resources.

    • The root directory to install the resources on the target host must be defined. At minimum, set the WLP_WORKING_DIR variable to a valid directory that is on a target host. To install the resources to a shared directory on the target host, set the WLP_SHARED_DIR variable to a valid directory. See Setting variables for Liberty profile servers.

    During deployment of the resources, the product applies variable substitution to the bootstrap.properties file within each Liberty profile server.

    (zos) The server.env file must be in EBCDIC encoding.

    The job extracts the image on the target host by trying the following methods in sequence:

    • Use the unzip utility on the host.

    • Use the jar utility on the host, including the jar utility from a SDK found by an inventory job.

    • Use the unzip utility that is copied to the remote host for the duration of the job, if not specifically disabled by the administrator. The unzip utility is deleted after the job is completed.

    • Unzip the zip file on the job manager and copy files one at a time to the destination host. This method applies only if the Liberty profile server image resides on the job manager.

    The job fails without installing a resource if the resource instance already exists in a destination directory.

    Job parameters

    Parameter Description Type
    image If the compressed file that provides the Liberty profile image resides on a job manager host, specifies the full path name of the compressed file; for example:

      /resources/my_liberty_server.zip

      c:/resources/my_liberty_server.zip

    String
    url If the compressed file that provides the Liberty profile resources does not reside on a job manager host, specifies the URL path for the compressed file . Supported scheme names for the universal resource locator (URL) include http, https, ftp, and file.

    Restriction: To specify a URL protocol other than file, the target host must have a wget utility. Select an http, https, or ftp remote download protocol that the wget utility on the target host supports. If the wget utility does not support your selected protocol, then the job cannot install the resources.

    For example, specify one of the following URLs for the resources file, my_liberty_server.zip.

    If the Liberty profile server resources reside on an HTTP or HTTPS server:

    http://www.mycompany.com/resources/my_liberty_server.zip
     https://www.mycompany.com/resources/my_liberty_server.zip

    If the resources reside on an FTP server:

      ftp://www.mycompany.com/resources/my_liberty_server.zip

    If the resources reside on the target host computer, the URL can use the file scheme to describe the path and name of the compressed file:

      file:///resources/my_liberty_server.zip

      file://c:/resources/my_liberty_server.zip

    If the URL is password-protected, you must also specify values for urluser and urlpassword.

    String
    share Whether to install Liberty profile resources to a shared directory. When set to true, the resources are installed to the location defined by the WLP_SHARED_DIR variable. If the WLP_SHARED_DIR variable is undefined or does not specify a valid directory, the product returns an error and does not extract resources from the image.

    When false, the default value, the job installs the resources to the location defined by the WLP_WORKING_DIR variable.

    Boolean
    urluser User name for the URL. If we specified a URL and the URL is password-protected, specify a user name. Otherwise, do not provide a value for urluser. String
    urlpassword Specifies a password that enables the urluser to access the URL. If we specified a URL and the URL is password-protected, specify a password. Otherwise, do not provide a value for urlpassword. String

    Example usage

    The following example has the image on the same host as the job manager and installs to WLP_WORKING_DIR:

    AdminTask.submitJob('[-jobType installLibertyProfileResources -targetList [host]
     -description installLibertyProfileResources
     -jobParams [ [image /tmp/liberty/wlpwithjava.zip] [share FALSE] ]]')

    The following example has the image on a target host, specifies a file URL for the image, and installs to WLP_WORKING_DIR:

    AdminTask.submitJob('[-jobType installLibertyProfileResources -targetList [host]
     -description installLibertyProfileResources
     -jobParams [ [url file://c:/LibertyWorking/LibertyWorkingwjava.zip] [share FALSE] ]]')

    The following example has the image on a remote, password-protected ftp server and installs to WLP_WORKING_DIR:

    AdminTask.submitJob('[-jobType installLibertyProfileResources -targetList [host]
     -description installLibertyProfileResources
     -jobParams [ [urlpassword ftp_pwd] [url ftp://www.mycompany.com/projects/liberty/image-0111003.zip]
         [share FALSE] [urluser ftp_user] ]]')

    The following example has the image on a remote, password-protected http server and installs to WLP_WORKING_DIR:

    AdminTask.submitJob('[-jobType installLibertyProfileResources -targetList [host]
     -description installLibertyProfileResources
     -jobParams [ [urlpassword http_pwd] [url http://www.mycompany.com/projects/liberty/image-0111003.zip]
        [share FALSE] [urluser http_user] ]]')

    The following example has the image on a remote, password-protected https server and installs to WLP_SHARED_DIR:

    AdminTask.submitJob('[-jobType installLibertyProfileResources -targetList [host]
     -description installLibertyProfileResources
     -jobParams [ [urlpassword http_pwd] [url https://www.mycompany.com/projects/liberty/image-0111003.zip]
        [share TRUE] [urluser http_user] ]]')


    uninstallLibertyProfileResources

    The uninstallLibertyProfileResources job removes a resource from administration by the job manager. The resource previously was installed to a destination directory on the host by the installLibertyProfileResources job or, after manual installation by unzipping a Liberty profile image, was found by the inventory job.

    The product returns an error and does not remove the resource if any of the following conditions exist:

    • The command specifies more than one resource type to remove.

    • The resource name resolves to more than one resource of the same name.

    • The resource does not exist in a directory that the job manager can access and search.

    Avoid trouble: If the job fails, some files might be deleted. The resource might be in a corrupt state. If we manually change resource files to fix the problem, after changing the files, run an inventory job to update the inventory.gotcha

    Job parameters

    Parameter Description Type
    projectName Name or resource ID of the project to remove. The product searches all the servers for the project. For each identified server running, the product stops the server before attempting to remove the resource. String
    runtimeName Name or resource ID of the Liberty profile run time to remove. The product searches all the servers for the run time. For each identified server running, the product stops the server before attempting to remove the resource. String
    sdkName Name or resource ID of the SDK to remove. String
    serverName Name or resource ID of the server to remove. If the server is running, the product stops the server before removing the resource. String
    applicationBinaryName Name or resource ID of the application binary to remove. String
    forceDelete Optionally, specifies whether to delete resources even if their status cannot be detected. The default is false, to not delete resources. When the value is true, server resources are deleted even if the status of the server resources cannot be detected or the servers cannot be stopped. If the status for a server cannot be detected, the uninstallLibertyProfileResources job fails unless this forceDelete option is specified. Boolean

    Example usage

    The following example removes the DefaultWebApplication.war application binary from job manager administration:

    AdminTask.submitJob('[-jobType uninstallLibertyProfileResources -targetList [host]
     -description uninstallLibertyProfileResources
     -jobParams [ [applicationBinaryName DefaultWebApplication.war] ]]')


    startLibertyProfileServer

    The startLibertyProfileServer job starts one or more Liberty profile server resources. The status of the server resources changes from Stopped to Started.

    A Liberty profile server requires a Java development kit (JDK) or Java runtime environment (JRE) to run this job. Set the JDK or JRE location by completing one of the following actions:

    • Set the JAVA_HOME property to the JDK or JRE location in the server.env file. The job reads the JAVA_HOME property and sets it on the target environment before running the command to start the server. However, this property is not used by the Liberty server command if you start the server manually.

      (zos) The server.env file must be in EBCDIC encoding.

    • (zos) Set the JAVA_HOME property to the JDK or JRE location in the user .bashrc file.

    • (zos) Append the JDK or JRE path to the PATH environment variable.

    • Set the JAVA_HOME property to the JDK or JRE location as a system environment variable.

    • Append the JDK or JRE path to the PATH system variable.

    Job parameters

    Parameter Description Type
    startResource Specifies a path name of the Liberty profile server resource to start. String

    Example usage

    The following example starts the Liberty profile server resource server1:

    AdminTask.submitJob('-jobType startLibertyProfileServer -targetList host
     -description startLibertyProfileServer
     -jobParams [[startResource runtime/wlp/liberty_server/server1 ]]')


    stopLibertyProfileServer

    The stopLibertyProfileServer job stops one or more running Liberty profile server resources. The status of the server resources changes from Started to Stopped.

    A Liberty profile server requires a Java development kit (JDK) or Java runtime environment (JRE) to run this job. Ensure that the JDK or JRE location is set on the target. For information on setting a JDK or JRE location, see startLibertyProfileServer.

    Job parameters

    a submitJob stopLibertyProfileServer command with the stopResource
    Parameter Description Type
    stopResource Specifies a path name of the Liberty profile server resource to stop. String

    Example usage

    The following example stops the Liberty profile server resource:

    AdminTask.submitJob('-jobType stopLibertyProfileServer -targetList host
     -description stopLibertyProfileServer
     -jobParams [[stopResource project/proj1/runtime/wlp/liberty_server/defaultServer]]')


    generateMergedPluginConfigForLibertyProfileServers

    The generateMergedPluginConfigForLibertyProfileServers job creates a single plugin-cfg.xml file by merging all the plugin-cfg.xml files that were generated for the liberty profile server on the targeted hosts.

    For this job, we can specify a Liberty profile server on multiple target hosts. After the Liberty profile server is found, a plugin-cfg.xml file is generated on that server, then copied back to the job manager. When all plugin-cfg.xml files have been generated for all targeted Liberty profile servers, they are merged into one plugin-cfg.xml file. This merged file is placed in the job manager directory app_server_root/profiles/job_manager_profile/config/temp/JobManager/job_ID/_mergedPluginDir/.

    This job requires a JMX (JMX) connection to Liberty profile servers on the target hosts. We can configure the JMX connection using either the local connector or the HTTP/REST connector. Specify the connector feature name in the server.xml file of the Liberty profile servers. The following example shows feature names in a server.xml file for both the local and HTTP/REST connectors:

    <featureManager>
      <feature>localConnector-1.0</feature>
      <feature>restConnector-1.0</feature>
      ...
    </featureManager>
    If we use the HTTP/REST connector, specify a user name and password for the JMX connection when submitting the job.

    The job stops and the product returns an error if any of the following conditions exist:

    • A targeted Liberty profile server is not running.

    • No JMX connector is configured for a targeted Liberty profile server.

    • The command does not specify valid credentials for a JMX connection.

    Job parameters

    parameter descriptions. Run a submitJob generateMergedPluginConfigForLibertyProfileServers
    Parameter Description Type
    serverName Name or resource ID of the server for which to generate plugin-cfg.xml files on the targeted hosts. The Liberty server must be running on the targeted hosts. String
    jmxuser User name for a JMX connection. Specify this parameter if you use the HTTP/REST connector for a JMX connection. String
    jmxpassword Password for a JMX connection. Specify this parameter if you use the HTTP/REST connector for a JMX connection. String

    Example usage

    The following example generates a merged plugin-cfg.xml file for liberty server defaultServer on target hosts, host1 and host2:

    AdminTask.submitJob('[-jobType generateMergedPluginConfigForLibertyProfileServers
     -targetList [host1 host2] -description generateMergedPluginConfigForLibertyProfileServers
     -jobParams [[jmxpassword ********][serverName runtime/wlp/liberty_server/defaultServer][jmxuser c]]]') 


    Related tasks

  • Administer jobs in a flexible management environment
  • Registering nodes with the job manager using commands
  • Grouping nodes in a flexible management environment
  • Running administrative jobs
  • Running administrative jobs across multiple nodes
  • Scheduling future administrative jobs
  • Manage administrative jobs
  • Packaging Liberty profile resources
  • Set variables for Liberty profile servers

  • AdministrativeJobs (AdminTask)

    manageprofiles command

  • JobManagerNode (AdminTask)