Accessing a remote Liberty server in a Docker container by using developer tools

You can set up your remote Liberty server in a Docker container so that you can access it by using WebSphere Developer Tools. After you complete this setup, you can use WebSphere Developer Tools to configure and start your remote Liberty server.

Before you begin

  1. Install Cloud Foundry Command Line Interface (CLI) and the Cloud Foundry plug-in for IBM Containers.

    For more information about installation, see IBM Containers plug-in.

  2. Log in to your Bluemix account and choose your organization and space, and then log in to your IBM Containers service.

    For more information about logging into your accounts, see Logging into the CLI.

Procedure

  1. Go to the bin directory of the remote Liberty server.

    By default, the bin directory is in the /opt/ibm/wlp directory.

  2. To access your remote Liberty server in a Docker container, use the following command from the bin directory of the remote Liberty server:
    docker exec -i  ContainerID configUtility install remoteAdministration --vadminUser=Username --vadminPassword=Password --vkeystorePassword=KeystorePassword
    Remember: To find the container ID, use the docker ps command.

    For more information about the configUtility command, see Liberty: configUtility command.

  3. When the script displays the configuration snippet, copy it into the server.xml file.
  4. Specify the <remoteFileAccess> parameter in the server.xml file by replacing its contents with the following text:
    <writeDir>${server.output.dir}</writeDir>
        <writeDir>${wlp.user.dir}</writeDir>
  5. Optional: To secure your remote Liberty server in a Docker container, change the keystore property.
    By default, the keystore property is the following element:
    <!-- TODO: Set the SSL keystore password -->
    <keyStore id="defaultKeyStore" password="Liberty" />
    1. To change the keystore property, enter the following command from the bin directory of the remote Liberty server:
      docker exec -i ContainerID securityUtility createSSLCertificate --server=ServerName --password=keystorePassword 

      If the keystore password was previously set, then delete the LibertyInstallDirectory/usr/servers/ServerName/resources/security/key.jks file and use the securityUtility command again.

    2. When the script displays the security element, copy it to your clipboard.
    3. Replace the keystore element in the server.xml file with the security element that you copied.
  6. Save the server.xml file.

What to do next

You can configure and start a remote Liberty server that is in a Docker container.

For more information about how to configure and start a remote Liberty server, see Creating a remote Liberty server by using developer tools.


Icon that indicates the type of topic Task topic



Timestamp icon Last updated: Monday, 5 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-libcore-mp&topic=t_docker_remote_server
File name: t_docker_remote_server.html