Install Liberty profile resources using the job manager
We can use the Install Liberty profile resources job to remotely install the resources in multiple-host Liberty profile server environments. The resources, which must be stored in one or more compressed (.zip) file before installation, are extracted by the job manager to destination directories relative to a specified root directory.
Before running the Install Liberty profile resources job, the following conditions must exist:
- The job manager must be running.
- At least one target host computer must be registered with the job manager.
- The 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 hosts must be defined. Before attempting to install working resources, set the WLP_WORKING_DIR WebSphere variable to a directory path that is valid for the target hosts. Similarly, before attempting to install shared resources, set the WLP_SHARED_DIR WebSphere variable to a valid directory path. We can define global defaults for these variables and override the values on specific hosts as needed. See "Setting variables for Liberty profile servers."
Your ID at the job manager must be authorized for the administrator role or the operator role to submit jobs.
When registering a target host with the job manager, we can save operating system security information. When you submit a job to one or more targets for which security information has not been saved, specify an authorized operating system user name and either password or public-private key information for the user name. The security credentials must be valid for all job targets.
Status from Liberty profile servers is automatically sent to the STATUS_LISTENER_ADDRESS port. To change the STATUS_LISTENER_ADDRESS port number, use the Ports page of a deployment manager console (System administration > dmgr > Ports) or job manager console (System administration > Job manager > Ports). If we change the STATUS_LISTENER_ADDRESS port number after installing Liberty profile server resources, you will no longer receive automatic status from the previously installed Liberty profile resources.
We can use the console of the job manager or the deployment manager to install Liberty profile resources on one or more host targets. From the console, choose the Install Liberty profile resources job, specify the location of the compressed file and other job options, review the summary, and submit the job.
Instead of using a console, we can run the installLibertyProfileResources job script in the AdministrativeJobs command group. See the Administrative job types topic.
- Click Jobs > Submit from the navigation tree of the console.
- Choose a job to install Liberty profile resources.
- Select the Install Liberty profile resources job type from the list.
- Optionally specify a description of the job.
- Click Next.
- Choose the job targets on which to add the Liberty profile resources.
- Select a group of targets from the list, or select Target names.
Only groups of targets that are valid for the job type selecteded are displayed in the list of target groups.
- If we selected Target names, then specify a target name and click Add, or click Find and specify the chosen targets on the Find targets page.
- If we did not choose to save security authentication information when registering the target hosts with the job manager, specify an operating system user name and password or public-private key information for access to the target hosts. The security credentials must be valid for all the job targets.
- Click Next.
- Specify parameters for the install Liberty profile resources job.
- If the compressed file containing the Liberty profile resources resides on the job manager server, for Path of the Liberty profile server resources compressed file, specify the full path name for the compressed (.zip) file.
If the compressed file does not reside on the job manager server, skip this step and specify a URL path for the compressed file.
For example, suppose Liberty profile resources exist in the /resources/my_liberty_server.zip compressed file. Specify the full path name for the compressed file:
- If the compressed file containing the Liberty profile resources does not reside on the job manager server, for URL path of the Liberty profile server resources compressed file, specify the URL path for the compressed file.
Supported scheme names for the universal resource locator (URL) include http, https, ftp, and file.
Restriction: To use URL path of the Liberty profile resources compressed file with a 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 Liberty profile resources file, my_liberty_server.zip.
If the Liberty profile 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 Liberty profile resources reside on an FTP server:
If the Liberty profile resources reside on the target host computer, the URL can use the file scheme to describe the path and name of the compressed file:
- If the compressed file containing the Liberty profile resources does not reside on the job manager server and the URL is password-protected, specify a user name and password.
- For User name required to access URL, specify a user name that can access the URL specified for step 4(b).
- For Password required to access URL and Confirm password, specify a password that enables the user to access the URL.
- To install Liberty profile resources that can be shared across servers, select Install to shared location.
By default, this option is not selected and the job installs resources to the location set by the WLP_WORKING_DIR WebSphere variable. When this option is selected, the job install resources to the location set by the WLP_SHARED_DIR WebSphere variable.
- To run optional iSeries scripts that authorize the Liberty profile installation and its embedded servers, select Run optional installation scripts on IBM i targets.
When selected, the following command is run for each Liberty profile that the job manager is installing on IBM i targets:
When installing one or more servers in a shared topology, the following command is run:
liberty_profile_home_of_server/bin/iAdmin GRANTAUTH --rolename server --userprofilename QEJBSVR --userdir server_area_root
server_area_root is the grandparent of the server directory. For example, if the server is installed to the /usr/servers/myserver directory, then server_area_root is /usr and the command is:
liberty_profile_home_of_server/bin/iAdmin GRANTAUTH --rolename server --userprofilename QEJBSVR --userdir /usr
When uninstalling a Liberty profile installation, the following command is run on IBM i targets:
- Click Next.
- Schedule the job.
The times and dates specified are relative to the job manager.
- Optionally specify one or more email addresses where notifications are sent when the job finishes.
If we specify multiple email addresses, separate them with commas.
- Select when the job is available for submission.
- Select the job expiration.
- Optionally specify a recurring interval for the job, a start date and time for the interval, and an end date and time for the interval.
- Click Next.
- Review the summary, and click Finish to submit the job.
The job manager server runs the job and attempts to add the Liberty profile resources to the target hosts.
The job extracts the image on a 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 image resides on the job manager.
What to do next
On the Job status page, click the ID of the install Liberty profile resource job and view the job status. Click the status refresh icon
to refresh the displayed status.
If the job is not successful, view any error messages that result from running the job, correct the error condition, and submit the job again.
Avoid trouble: If the job fails with the message Undefined variable WLP_WORKING_DIR, click Environment > WebSphere variables, select the scope, and click New. Create a variable with the name WLP_WORKING_DIR and a value that specifies a directory path to which to install Liberty profile resources, such as /liberty/working. If the job fails with the message Undefined variable WLP_SHARED_DIR, create a variable with the name WLP_SHARED_DIR and specify a directory path to which to install shared Liberty profile resources, such as /liberty/shared. Then, submit the job again.gotcha
If the job is successful, click Jobs > Target resources to see Liberty profile resources in the list of resources.
Start and stop the job manager Packaging Liberty profile resources Set variables for Liberty profile servers Checking job status
Administrative job types Find targets Find target resources Target resources collection