Updating Elastic X-Pack licenses
Starting with IBM Cloud Private logging 3.2.1, there are three options available to configure X-Pack licenses for the Elastic stack. These options are available for logging instances in managed or standard mode.
- Self-generated trail license: Configure each logging instance to use a 30-day trial Elastic X-Pack license. This trial license allows access to all features. When the trial expires, all X-Pack features that require a license are disabled.
- Self-generated basic license: Provide a free lasting license for the X-Pack features that are included in the basic tier. For more information, see Elastic Subscriptions
. This option is the default.
- Bring your own license: The logging service can be configured to use customized licenses obtained by the customer.
Checking current licenses
- Log in to the Kibana console and click Dev tools.
-
From the navigation window, prepare the request to retrieve and review your license.
GET /_xpack/license -
To make the API call, click the button adjacent to your request payload. The following example resembles your current license.
{ "license": { "status": "active", "uid": "46e1db38-a100-44bc-9a3a-69542a1aaf7e", "type": "trial", "issue_date": "2019-01-03T20:16:07.591Z", "issue_date_in_millis": 1546546567591, "expiry_date": "2019-02-02T20:16:07.591Z", "expiry_date_in_millis": 1549138567591, "max_nodes": 1000, "issued_to": "elasticsearch", "issuer": "elasticsearch", "start_date_in_millis": -1 } }
Using trial licenses
Complete the following steps to update your license.
-
Create a
xpack.yamlfile that refers to the Secret and enables the wanted services.xpack: license: # accepted values: secret, selfGenerated # what it does: determines which xpack license will be used source: selfGenerated selfGenerated: # accepted values: trial, basic # what it does: # see https://www.elastic.co/guide/en/elasticsearch/reference/6.8/license-settings.html type: trial -
Extract the existing logging chart parameters.
-
Extract Helm parameters by running the following command.
helm get values logging --tls > values-old.yaml -
Optionally, apply prior adjustments. All Kubernetes resource manifest adjustments that are made by using the
kubectlcommand are overridden with values that are defined in chart parameters. Replica count, JVM heap size, or container memory limits are a few examples. If prior Kubernetes resource manifests were adjusted, make sure that you apply the same adjustments tovalues-old.yaml.
-
-
Download the chart.
- Identify the chart version. Logging chart versions vary based on the installed IBM Cloud Private version. You can use the IBM Cloud Private management console to find chart versions in the service catalog. The logging chart is identified by
the name
ibm-icploggingunder themgmt-reporepository. You can also select SOURCE & TAR FILES from the IBM Cloud Private management console to find a local link to a chart. - Download the chart
.tarfile. Run the following command by using the local link found in Step 3.curl -k https://<master ip>:8443/mgmt-repo/requiredAssets/ibm-icplogging-x.y.z.tgz > ibm-icplogging-x.y.z.tgz
- Identify the chart version. Logging chart versions vary based on the installed IBM Cloud Private version. You can use the IBM Cloud Private management console to find chart versions in the service catalog. The logging chart is identified by
the name
-
Upgrade Helm chart. Run the following command. Replace
x.y.zwith the version that you found in Step 3.helm upgrade logging ibm-icplogging-x.y.z.tgz -f values-old.yaml -f xpack.yaml --recreate-pods --force --timeout 600 --tls -
The logging service becomes available in approximately 5 - 10 minutes. You can also check Helm upgrade status by using the following command.
helm history --tls logging -
Validate your license update. Wait for 10 more minutes, then follow steps in Checking current licenses to verify that Elasticsearch returns the expected license.
Using free basic licenses
A self-generated free basic license is used by default. If you need to change license settings back to using a basic license, follow the instructions in Using trial licenses except in Step 1, set xpack.license.selfGenerated.type to basic.
Bring your own license
Complete the following steps to update your license.
- Acquire the Elastic license based on the feature set that you want. Elastic license comes in JSON format.
- In the namespace of the logging deployment, create a Kubernetes Secret that contains the license.
kubectl create secret generic es-license --from-file=./license.json --namespace=<logging namespace>
For the system logging deployment, <logging namespace> is kube-system. For all other logging releases, it is the namespace that hosts the logging deployment.
- Create a
xpack.yamlfile that refers to the Secret and enables the services that you want.xpack: license: # accepted values: secret, selfGenerated # what it does: determines which xpack license will be used source: secret secret: # the secret needs to be in the same namespace as the chart release secretName: es-license # the Kubenetes field name (key) within the specified secret # that stores license json file fieldName: license.json -
Extract the existing logging chart parameters.
-
Extract Helm parameters by running the following command.
helm get values logging --tls > values-old.yaml -
Optionally, apply prior adjustments. All Kubernetes resource manifest adjustments that are made by using the
kubectlcommand are overridden with values that are defined in chart parameters. Replica count, JVM heap size, or container memory limits are a few examples. If prior Kubernetes resource manifests were adjusted, make sure that you apply the same adjustments tovalues-old.yaml.
-
-
Download the chart.
- Identify the chart version. Logging chart versions vary based on the installed IBM Cloud Private version. You can use IBM Cloud Private management console to find chart versions in the service catalog. The logging chart can be identified by
the name
ibm-icploggingunder themgmt-reporepository. You can also select SOURCE & TAR FILES from the IBM Cloud Private management console to find a local link to a chart. - Download the chart
.tarfile. Run the following command by using the local link found in Step 5:curl -k https://<master ip>:8443/mgmt-repo/requiredAssets/ibm-icplogging-x.y.z.tgz > ibm-icplogging-x.y.z.tgz
- Identify the chart version. Logging chart versions vary based on the installed IBM Cloud Private version. You can use IBM Cloud Private management console to find chart versions in the service catalog. The logging chart can be identified by
the name
-
Upgrade Helm chart. Run the following command. Replace
x.y.zwith the version that you found in Step 5:helm upgrade logging ibm-icplogging-x.y.z.tgz -f values-old.yaml -f xpack.yaml --recreate-pods --force --timeout 600 --tls -
The logging service becomes available in approximately 5 - 10 minutes. You can also check Helm upgrade status by using the following command.
helm history --tls logging -
Validate your license update. Wait for 10 more minutes, then follow steps in Checking current licenses to verify that Elasticsearch returns the expected license.