You must register a remote host computer with a job manager to enable the job manager to
access applications, command files, and other resources on the host computer.
Before you begin
Create a job manager profile and start the job manager.
About this task
A remote host target is not required to have any WebSphere® Application Server products installed. There are no software
requirements for this host beyond its operating system. To register remote hosts, you can use the
Targets page of an administrative console or the wsadmin
registerHost command.
To register Liberty servers with a job manager, use a procedure for registering a target with a
host. You can set variables for Liberty servers in a registerHost command.
Procedure
-
Use the Targets page of the job manager console or the deployment manager
console to register hosts.
-
Click .
-
On the New target page, specify parameters that identify the remote host
and specify security information.
- Specify the host computer name in one of the following formats:
- Fully qualified domain name system (DNS) server host name string, such as
xmachine.manhattan.ibm.com
- Default short DNS host name string, such as
xmachine
- Numeric IP address, such as
127.1.255.3
The host can be the same computer on which the product is installed or a different
computer.
- Optionally, specify the operating system of the target host.
- For Administrative user with installation authority, specify an
administrative user name for the target host.
- Specify the password or private key file for the administrative user so that the job manager can
access and run jobs on the host. If the host does not require a password, you can specify a null
String value of
""
.
- Specify other parameters as needed.
Best practices: Select
Save security information and you will not need to enter the user name and
password for every job manager action on the host.
- Click OK.
-
Use the wsadmin registerHost command to register hosts. The command is in
the JobManagerNode command group.
-
Open a command window on the bin directory of the job manager
profile.
-
Run the wsadmin command to start the wsadmin tool and, optionally, use the
Jython language.
-
Run the registerHost command to make the host computer a target of the job
manager.
AdminTask.registerHost('[-host host_computer -hostProps [ [osType operating_system]
[username administrative_user][privateKeyFile key_file_path]
[passphrase passphrase][saveSecurity true] ]')
host is the computer name of the host that you want to register with the job
manager. You must specify a host value.
hostProps specifies properties of the host.
Table 1. registerHost -hostProps defined properties . You can specify one or more defined properties for the registerHost
command, or specify undefined properties for the command.
Property name |
Property description |
osType |
The operating system type. Specify osType to enable the command to complete
faster. This optional property determines the means for connecting with the host. Valid values
are:
- aix
- hpux
- os400
- linux
- solaris
- windows
- os390
|
username |
A user with authority to log in to the host. This property is
required. |
password |
The password for the given username. A value for password or privateKeyFile
must be specified. If the host does not require a password, you can specify a null String value of
"" . |
privateKeyFile |
The path to the private keyfile. If you do not specify a value for password,
then you must specify a value for privateKeyFile. |
passphrase |
A passphrase for the privateKeyFile, if needed. |
saveSecurity |
Specifies whether to store security properties (username, password,
privateKeyFile, passphrase) with the host and used as default values for job submissions. If this
property is given a value of true , then the security properties are stored with the
host and used for subsequent job submissions to this host. |
imDataLocations |
The fully qualified path of one or more Installation Manager data locations.
Separate multiple paths by a semicolon. This property is useful if you have non-default Installation
Manager data locations on your targets. If an invalid data location is specified, it will not be
saved. If the specified data location can be detected by the inventory job, it will not be saved.
You can use the find data location job to search for data locations on the system. The find data
location job automatically updates this
property.AdminTask.registerHost('[-host hostname -hostProps [
[imDataLocations datalocation1; datalocation2]
[password ****] [saveSecurity true] [username username] ]]')
This
property is optional.
|
property_name |
A user-defined target property name and value, specified with the
format:[property_name property_value]
You
can specify paths for Liberty variables; for
example: [WLP_WORKING_DIR /working]
[WLP_SHARED_DIR /shared]
[WLP_ADDITIONAL_DIRS /addl]
This
example defines three properties.
This property is optional.
|
Alternatively, you can run the
registerHost command in interactive
mode:
AdminTask.registerHost('-interactive')
Results
After the host is registered with the job manager, the console or wsadmin displays the unique ID
(UUID) of the host.
Example
You can set variables for Liberty in the host properties when registering a host with the
registerHost command. The variables specify the root directories to which to
install Liberty resources and specify search paths for
finding resources.
- Open a command prompt at the bin directory of the job manager profile.
- Start the wsadmin tool and use the Jython scripting
language.
wsadmin -lang jython
- Run an AdminTask registerHost command that specifies the variable name and
value.
For example, set the WLP_WORKING_DIR variable to use the
C:\liberty
directory:
AdminTask.registerHost('-host host_name -hostProps [[username admin][password password]
[saveSecurity true][WLP_WORKING_DIR C:/liberty]]')
What to do next
Verify that the host is registered with the job manager and that the job manager can list the
target resources.