+

Search Tips   |   Advanced Search

Overriding Liberty server host information

The collectiveMember-1.0 feature enables a server to be managed by the collective controller. Most server host information can be automatically detected. In certain scenarios, however, we provide additional host information.

To enable the host information override, add the following element to server.xml:

...where...


Examples

Scenario 1: Server is on Windows operating system, no SSH is installed

Scenario 2: Server has SSH installed, SSH is running on port 2222

Scenario 3: Need to run commands as another user

Scenario 4: Server is on a Windows operating system and ssh (e.g. Cygwin) is installed. With the following server configuration, the controller connects the member server with ssh. In this case, the requirement to disable Windows User Account Control (UAC) does not apply. The parameter <user's home directory> is the user default home directory, for example: C:\cygwin\home\bob

Scenario 5: The collective controller and member are on separate hosts, and not on the same host.

To specify that the member inherit RPC credentials from the host, set useHostCredentials to true in server.xml of the member...

  1. Create, configure, and start a collective controller named myController as shown in step 1 of Configure a Liberty collective.

  2. Register the host for the member with the collective. The member and the collective controller are on different hosts.

    In this scenario, the registerHost command uses the collective controller host hostA.ibm.com with port number 9443, user admin, and password adminpwd. The command registers the member host hostB.ibm.com with the collective, and sets rpcUser to an operating system login user ID for the member host osUser1, and rpcUserPassword to the operating system login password for the user ID for the member host osUser1Pwd.

    Run the registerHost command on the collective controller host.

      wlp/bin/collective registerHost hostB.ibm.com 
          --host=hostA.ibm.com 
          --port=9443 
          --user=admin 
          --password=adminpwd 
          --rpcUser=osUser1 
          --rpcUserPassword=osUser1Pwd

    Enter y (yes) when prompted to accept the certificate chain. After registration, the Host hostB.ibm.com successfully registered. message displays. The collective controller host now has the operating system user ID and password of the member host.

  3. On the member host, create a server named myMember to use as a collective member.

      wlp/bin/server create myMember

  4. Add the myMember server to the collective controller, specifying to use host credentials. In the join command, which is run on the member host, specify --useHostCredentials so the member inherits RPC credentials from the host registration.

      wlp/bin/collective join myMember 
          --host=hostA.ibm.com 
          --port=9443 
          --user=admin 
          --password=adminpwd 
          --keystorePassword=memberKSPassword 
          --useHostCredentials
      

  5. Update the member server.xml file as shown in step 2 of Configure a Liberty collective.

    Because you specified --useHostCredentials in the join command, the configuration generated for the member server.xml file sets useHostCredentials to true:

    <!-- Remote host authentication configuration -->
    <hostAuthInfo useHostCredentials="true" />

With the --useHostCredentials option, we do not need to specify the operating system user ID and password in the member server.xml file because the member inherits credentials from the host. Later, if the operating system user ID or password of the member server changes, run the updateHost command to change the user ID or password.

Concepts:

Tasks:

Reference: