Create Infinispan clusters with a Helm chart that lets you specify values for build and deployment configuration.

1. Installing the Infinispan Helm chart

Install the Helm chart to build and deploy Infinispan clusters.

1.1. Installing the Helm chart through the OpenShift console

Use the OpenShift Web Console to install the Infinispan chart from the Red Hat developer catalog.

Prerequisites
  • Have access to an OpenShift cluster.

Procedure
  1. Log in to the OpenShift Web Console.

  2. Select the Developer perspective.

  3. Open the Add view and then select Helm Chart to browse the Red Hat developer catalog.

  4. Locate and select the Infinispan chart.

  5. Specify a name for the chart and select a version.

  6. Define values in the following sections of the Infinispan chart:

    • Images configures the container images to use when creating pods for your Infinispan cluster.

    • Deploy configures your Infinispan cluster.

      To find descriptions for each value, select the YAML view option and access the schema.

  7. Select Install.

Verification
  1. Select the Helm view in the Developer perspective.

  2. Select the Infinispan cluster you created to view details, resources, and other information.

1.2. Installing the Helm chart on the command line

Use the helm and oc clients to create scripts that deploy Infinispan clusters on OpenShift or a Kubernetes cluster.

Prerequisites
Procedure
  1. Create a values file for your Infinispan cluster that you can pass to the Helm chart.

    For example, the following values file creates a cluster with two nodes:

    $ cat > infinispan-values.yaml<<EOF
    #Build configuration
    images:
      server: quay.io/infinispan/server:12.1
      initContainer: registry.access.redhat.com/ubi8-micro
    #Deployment configuration
    deploy:
      replicas: 2
    EOF

    To find descriptions for each of the Infinispan values, refer to the Infinispan chart README.

  2. Install the Infinispan chart and specify the values file for your cluster.

    $ helm install -n <namespace> infinispan redhat-charts/infinispan -f infinispan-values.yaml
Verification
  1. Watch your build to ensure it completes successfully.

    $ oc get build -w
  2. Watch the pods to ensure all nodes in the Infinispan cluster are created successfully.

    $ oc get pods -w