Este conteúdo não está disponível no idioma selecionado.
Chapter 1. Deploying Data Grid clusters as Helm chart releases
Build, configure, and deploy Data Grid clusters with Helm. Data Grid provides a Helm chart that packages resources for running Data Grid clusters on OpenShift.
Install the Data Grid chart to create a Helm release, which instantiates a Data Grid cluster in your OpenShift project.
1.1. Installing the Data Grid chart through the OpenShift console Copiar o linkLink copiado para a área de transferência!
Use the OpenShift Web Console to install the Data Grid chart from the Red Hat developer catalog. Installing the chart creates a Helm release that deploys a Data Grid cluster.
Prerequisites
- Have access to OpenShift.
Procedure
- Log in to the OpenShift Web Console.
- Select the Developer perspective.
- Open the Add view and then select Helm Chart to browse the Red Hat developer catalog.
- Locate and select the Data Grid chart.
- Specify a name for the chart and select a version.
Define values in the following sections of the Data Grid chart:
- Images configures the container images to use when creating pods for your Data Grid cluster.
Deploy configures your Data Grid cluster.
TipTo find descriptions for each value, select the YAML view option and access the schema. Edit the yaml configuration to customize your Data Grid chart.
- Select Install.
Verification
- Select the Helm view in the Developer perspective.
- Select the Helm release you created to view details, resources, and other information.
1.2. Installing the Data Grid chart on the command line Copiar o linkLink copiado para a área de transferência!
Use the command line to install the Data Grid chart on OpenShift and instantiate a Data Grid cluster. Installing the chart creates a Helm release that deploys a Data Grid cluster.
Prerequisites
-
Install the
helmclient. - Add the OpenShift Helm Charts repository.
- Have access to an OpenShift cluster.
-
Have an
occlient.
Procedure
Create a values file that configures your Data Grid cluster.
For example, the following values file creates a cluster with two nodes:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the Data Grid chart and specify your values file.
helm install infinispan openshift-helm-charts/redhat-data-grid --values infinispan-values.yaml
$ helm install infinispan openshift-helm-charts/redhat-data-grid --values infinispan-values.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Use the --set flag to override configuration values for the deployment. For example, to create a cluster with three nodes:
--set deploy.replicas=3
--set deploy.replicas=3
Verification
Watch the pods to ensure all nodes in the Data Grid cluster are created successfully.
oc get pods -w
$ oc get pods -w
1.3. Upgrading Data Grid Helm releases Copiar o linkLink copiado para a área de transferência!
Modify your Data Grid cluster configuration at runtime by upgrading Helm releases.
Prerequisites
- Deploy the Data Grid chart.
-
Have a
helmclient. -
Have an
occlient.
Procedure
- Modify the values file for your Data Grid deployment as appropriate.
Use the
helmclient to apply your changes, for example:helm upgrade infinispan openshift-helm-charts/redhat-data-grid --values infinispan-values.yaml
$ helm upgrade infinispan openshift-helm-charts/redhat-data-grid --values infinispan-values.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Watch the pods rebuild to ensure all changes are applied to your Data Grid cluster successfully.
oc get pods -w
$ oc get pods -w
1.4. Uninstalling Data Grid Helm releases Copiar o linkLink copiado para a área de transferência!
Uninstall a release of the Data Grid chart to remove pods and other deployment artifacts.
This procedure shows you how to uninstall a Data Grid deployment on the command line but you can use the OpenShift Web Console instead. Refer to the OpenShift documentation for specific instructions.
Prerequisites
- Deploy the Data Grid chart.
-
Have a
helmclient. -
Have an
occlient.
Procedure
List the installed Data Grid Helm releases.
helm list
$ helm listCopy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
helmclient to uninstall a release and remove the Data Grid cluster:helm uninstall <helm_release_name>
$ helm uninstall <helm_release_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the
occlient to remove the generated secret.oc delete secret <helm_release_name>-generated-secret
$ oc delete secret <helm_release_name>-generated-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.5. Deployment configuration values Copiar o linkLink copiado para a área de transferência!
Deployment configuration values let you customize Data Grid clusters.
You can also find field and value descriptions in the Data Grid chart README.
| Field | Description | Default value |
|---|---|---|
|
| Specifies the internal Kubernetes cluster domain. |
|
|
| Specifies the number of nodes in your Data Grid cluster, with a pod created for each node. |
|
|
| Passes JVM options to Data Grid Server. | No default value. |
|
| Libraries to be downloaded before server startup. Specify multiple, space-separated artifacts represented as URLs or as Maven coordinates. Archive artifacts in .tar, .tar.gz or .zip formats will be extracted. | No default value. |
|
| Defines whether storage is ephemeral or permanent. |
The default value is |
|
| Defines how much storage is allocated to each Data Grid pod. | 1Gi |
|
|
Specifies the name of a |
No default value. By default, the persistent volume claim uses the storage class that has the |
|
| Defines the CPU limit, in CPU units, for each Data Grid pod. | 500m |
|
| Defines the maximum amount of memory, in bytes, for each Data Grid pod. | 512Mi |
|
| Specifies the maximum CPU requests, in CPU units, for each Data Grid pod. | 500m |
|
| Specifies the maximum memory requests, in bytes, for each Data Grid pod. | 512Mi |
|
| Specifies the name of a secret that creates credentials and configures security authorization. |
No default value. If you create a custom security secret then |
|
| Provides a batch file for the Data Grid command line interface (CLI) to create credentials and configure security authorization at startup. | No default value. |
|
| Specifies the service that exposes Hot Rod and REST endpoints on the network and provides access to your Data Grid cluster, including the Data Grid Console. |
|
|
| Specifies a network port for node port services within the default range of 30000 to 32767. | 0 If you do not specify a port, the platform selects an available one. |
|
| Optionally specifies the hostname where the Route is exposed. | No default value. |
|
| Adds annotations to the service that exposes Data Grid on the network. | No default value. |
|
| Configures Data Grid cluster log categories and levels. | No default value. |
|
| Adds labels to each Data Grid pod that you create. | No default value. |
|
| Adds labels to each service that you create. | No default value. |
|
| Adds labels to all Data Grid resources including pods and services. | No default value. |
|
|
Allows write access to the |
|
|
| Configures the securityContext used by the StatefulSet pods. |
|
|
|
Enable or disable monitoring using |
|
|
| Specifies a name for all Data Grid cluster resources. | Helm Chart release name. |
|
| Defines the nodeAffinity policy used by the cluster’s StatefulSet |
|
|
| Defines the podAffinity policy used by the cluster’s StatefulSet |
|
|
| Defines the podAntiAffinity policy used by the cluster’s StatefulSet |
|
|
| Data Grid Server configuration. | Data Grid provides default server configuration. For more information about configuring server instances, see Data Grid Server configuration values. |