For LINUX platforms

Deploying Liberty or Node.js servers in Docker containers with Admin Center

You can use the Deploy tool to install Liberty or Node.js servers in Docker containers as members of a collective.

Before you begin

Stabilized feature: Managing Node.js processes by using Liberty collectives is stabilized. V8 is the final supported Node.js version for Liberty collective members. For on-premises or bring-your-own infrastructure environments, use Docker containers that are hosted and managed by IBM Cloud Pak for Applications. For hosted environments, use Docker containers in IBM Cloud® Kubernetes Service.

About this task

After you define the Liberty collective and create the Docker image in a Docker container, use the Deploy tool to install the image on a Docker host within the collective.

Procedure

  1. Go to the Deploy tool.
    • From the Toolbox, select Deploy Deploy icon.
    • From details on hosts in the Explore tool, select Actions Actions icon > one_or_more_host_names > Deploy Server Package.

    To directly launch the Deploy tool in the future, you can use the URL that is shown in the browser when viewing the Deploy tool.

  2. Select a default server type.
    • For Liberty servers, select Liberty for DEFAULT SERVER TYPES and then, under LIBERTY SERVER, select Package/Rules.
    • For Node.js servers, select Node.js for DEFAULT SERVER TYPES and then, under NODE.JS SERVER, select Package/Rules.
  3. Select to install a Docker container.
    1. For DEFAULT RULES, select the Docker Container default rule.
    2. Under DOCKER CONTAINER, select CONFIRM.
  4. For Deployment Parameters, specify the Docker image to deploy, the container name, and the cluster name.

    The tool displays a list of images in the Docker repository. You can select an image from the list, search for images, or type in the values. If you type in the values for the Docker containers, the values must match the format [a-zA-Z0-9][a-zA-Z0-9_.-]*. The tool also displays a list of existing cluster names. You can select an existing cluster from the list or type in a new cluster name.

    To deploy a Docker image locally available on the Docker host, no additional configuration is required. Type in the Docker image name.

    To deploy a Docker image that is stored in a registry, additional configuration is required for the collective controller to access the registry.
    1. Import the root certificate for the Docker registry to the collective keystore.
      1. Export the GeoTrust Global CA root certificate from https://hub.docker.com.
      2. Stop the controller if it is running.
      3. Import the certificate into the collective keystore by using the keytool command in the following example.
        keytool -import -file cert.docker.com -keystore path_to_controller_collectiveTrust.p12 -storepass controller_keystore_password -alias any_unique_value
        If you are using the JKS keystore through 19.0.0.2, use the .jks file extension.
        keytool -import -file cert.docker.com -keystore path_to_controller_collectiveTrust.jks -storepass controller_keystore_password -alias any_unique_value
      4. Restart the controller.
    2. Add variable statements to the controller server.xml. See Configuring a Docker registry for use by a collective controller.
  5. For Selected Hosts, select the host computers on which to install the image. If you do not see the wanted target host in the list of available hosts, you can search for a host.

    Each target host must be registered with the collective that is managed by Admin Center. See Registering host computers with a Liberty collective.

  6. For Security Details, specify a password to protect newly generated keystore files that contain server authentication credentials.

    The product generates keystore files in the resources directory of each deployed server.

  7. Select Deploy.

Results

The Deploy action runs. The Deploy tool displays messages about deployment status and results.