Submitting jobs to manage profiles on a remote host
We can submit the Manage profiles job to create, delete, augment, back up, list, and restore profiles on remote hosts. Profiles are sets of files that define the runtime environment. On local host computers, we can use the manageprofiles command or the Profile Management Tool to manage profiles. After a remote host computer is registered with a job manager, we can use the Manage profiles job to run the manageprofiles command on the remote host. The remote host must have a WAS installation.
Restriction: The Manage profiles job is only available on distributed and IBM i operating systems. It is not available on z/OS operating systems.
Before we can run the Manage profiles job, complete each of the following steps:
- Start the job manager.
- Make a remote host a target of the job manager. In the job manager console, click Jobs > Targets > New Host and complete the fields on the New targets page.
A host is a computer. A remote host typically is a different computer than the one on which the job manager is installed. The remote host must have a WAS installation. The product does not need to be running on the remote host for the Manage profiles job to complete successfully.
- Create an XML response file that defines tasks you want the manageprofiles command of the product installation on the remote host to perform.
Any of the tasks provided by the manageprofiles command can be included in the response file. For descriptions of create, delete, list, and other profile management tasks, see information about the manageprofiles command.
For example, to create the profile test1 in an installation on a remote host, create the following response file named test_response_file.txt:
create profileName=test1 profilePath=/WAS_v850/IBM/WebSphere/AppServer/profiles/test1 templatePath=/WAS_v850/IBM/WebSphere/AppServer/profileTemplates/default(iseries)create profileName=test1 profilePath=/QIBM/ProdData/WebSphere/AppServer/V85/ND/profiles/test1 templatePath=/QIBM/ProdData/WebSphere/AppServer/V85/ND/profileTemplates/default
create profileName=test1 profilePath=C:\\WAS_v850\\IBM\\WebSphere\\AppServer\\profiles\\test1 templatePath=C:\\WAS_v850\\IBM\\WebSphere\\AppServer\\profileTemplates\\default
Specify the command task in the first line of the response file, and use a separate line for each manageprofiles command parameter. For the response file, do not include a hyphen-minus symbol (-) before the manageprofiles command parameters. Use a parameter=value format. For example, a manageprofiles command that is entered on a command line has the following format:manageprofiles -create -profileName MyProfile -templatePath app_server_root/profilesTemplates/default -enableAdminSecurity true -adminUserName user1 -adminPassword security -cellName MyNewCell -nodeName MyNewNode
A response file for a Manage profiles job uses the following format for the same command:create profileName=MyProfile templatePath=app_server_root/profileTemplates/default enableAdminSecurity=true adminUserName=user1 adminPassword=security cellName=MyNewCell nodeName=MyNewNode
Avoid trouble: For Windows operating systems, in the response file use double-backslashes (\\) or a forward slash (/) to separate directories in file paths. If the response file uses a single backslash (\) as a directory separator, the job fails with an error.gotcha
We can use the administrative console of the job manager or the deployment manager to submit a job that manages profiles of a remote WebSphere Application Server installation. From the console, choose the Manage profiles job, specify the remote host computer, specify job options, review the summary, and submit the job. When the job runs, the job manager performs the profile management tasks described in the response file and changes the profile configuration in the product installation on the remote host.
Instead of using a console, we can run the manageprofiles job script in the AdministrativeJobs command group. See the topic on administrative job types.
- Click Jobs > Submit from the navigation tree of the administrative console.
- Choose a job to manage the profiles of a remote host target.
- Select the Manage profiles job type from the list.
The Manage profiles job is only available in the list if the job manager has a host as a target. Stand-alone application servers or deployment managers registered with the job manager are targets, but not hosts.
- Optionally specify a description of the job.
- Click Next.
- Choose the job targets.
- Select a group of targets from the list, or select Target names.
- 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.
On the Find targets page, the job type is automatically set to manageprofiles to filter search results. Click Find on this page to view the list of hosts in the Excluded targets list. Select the target, click > to move the host name to the Chosen targets list, and then click OK.
- If user authentication is required, specify a user name, password, or any other authentication values as needed.
- Click Next.
- Specify job parameters.
- For WebSphere Application Server home, specify the location of the product installation on the host.
Specify the app_server_root directory.
For example, suppose the remote host computer has a Windows operating system and a WAS Version 8.0 installation with an app_server_root directory of C:\WAS_v850\IBM\WebSphere\AppServer. Specify the following path:
When the job runs, the product appends \bin to the path specified to run the manageprofiles command on the remote host. If we use double-backslashes (\\) or a forward slash (/) for directory separators, the job fails with an error. For Windows operating systems, use a single backslash (\) as a directory separator.gotcha
- For Response file location, specify the fully qualified path of the response file.
The response file contains instructions for the manageprofiles command of the product installation on the host.
For example, specify the location of the test_response_file.txt response file described in the "Before beginning" section of this topic to create the profile test1 in the installation on the host. In this example, the response file is in the temp directory of the same computer on which the job manager resides:
- Click Next.
- Schedule the job.
- Review the summary, and click Finish to submit the job.
The job manager runs the job. The manageprofiles command on the host changes the profile configuration in the product installation as instructed in the response file.
For the test_response_file.txt example, a profile named test1 is created on the host.
What to do next
On the Job status page, click the ID of the manageprofiles job and view the job 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.
Start and stop the job manager Start and stop the administrative agent Start and stop the deployment manager
Administrative job types New target settings Find targets Find target resources