[17.0.0.3 and later]

Deploying Liberty applications into IBM Cloud Private with a Liberty Helm chart

You can deploy Liberty applications into IBM® Cloud Private using a Helm chart. You can package a Liberty server configuration along with the applications that it runs, for distribution to colleagues, or installation on other systems.

Before you begin

To run Liberty applications in IBM Cloud Private, you must Install IBM Cloud Private.

About this task

You can deploy applications into IBM Cloud Private through the Catalog user interface or by using the Helm command-line interface.

Procedure

Complete this task to browse the IBM Cloud Private catalog and select the appropriate Helm chart, which you use to deploy applications.

  1. Create the Docker container for your applications. The Docker container is the key input into the Helm chart. Complete this step, if you do not have an existing Docker hub image for your application.
  2. From the IBM Cloud Private dashboard, click Menu > Catalog.
  3. Navigate through the list of Helm charts to find the Liberty Helm chart.
  4. Accept the license for Liberty, which is the Liberty Helm chart that is installed.
  5. Enter the Helm chart values that allow you to customize the Liberty applications that you are deploying. See the Liberty Helm chart configuration parameters to help you complete the values. A warning might be displayed that certain values are missing. However, if you are not using tranlog.persistence parameters, then ignore that warning message.
    Note: When you complete the values, if you select Ingress enabled check box, then you request Ingress. However, that request secures the browser to the proxy only. If you want to secure the backend, then see Deploying Liberty with Ingress by using SSL in IBM Cloud Private.
    The Kubernetes pod is created, the image that was packaged and stored in the registry is downloaded in the Docker container that is built from that image. After the Docker container is pushed to a Kubernetes pod, you can connect the browser to the address in the workload management console, where you can see your application run.

What to do next

See Administering Liberty manually for configuration options for deploying the Liberty server, including Administering the transaction service on Liberty for availability.

Deploying Liberty applications into IBM Cloud Private with a Liberty Helm chart through the CLI

Before you begin

You must install and configure the kubectl client as well as the Helm client, on the machine where you want to deploy your applications. See the IBM Cloud Private documentation for more information about installing the kubectl client. After you install the client, you must configure the Helm client by adding a repository; for example:
helm repo add ibm-charts https://raw.githubusercontent.com/IBM/charts/master/repo/stable/

Procedure

Complete this task to deploy applications through the command line.

  1. Create the Docker image of the Liberty application, and push it to a repository. You must create the docker container, and push it to a registry, where it is referenced by IBM Cloud Private.
  2. Run the --set option command with the helm install command to override values from the Liberty Helm chart. See the Liberty Helm chart configuration values that you can override.
    Values can be overridden one of two ways. Either use the --set flag on the helm install command, or specify the values to override in a YAML file. The image.repository value is mostly overridden to specify the repository and Docker image. You can override other values as well. See the following example of using the --set option:
    helm install ibm-charts/ibm-websphere-liberty --name my-liberty-app --set image.repository=myrepo/myapp --set ingress.enabled=true --set ingress.path="/myapp"
    Use the following example to override the same values using a YAML file, called the overridesLiberty.yaml in this example:
    helm install ibm-charts/ibm-websphere-liberty --name my-liberty-app -f overridesLiberty.yaml
    The overridesLiberty.yaml file contains the following stanza of code:
    image:
      repository: "myrepo/myapp"
    ingress:
      enabled: true
      path: "/myapp"

Icon that indicates the type of topic Task topic

File name: twlp_icp_helm_way.html