Updating Elastic X-Pack licenses
A 30-day trial Elastic X-Pack license is included during the IBM Cloud Private logging service installation. This trial license allows access to all features. It is generated by the logging instance itself and is referred to as a self-generated trial license. The logging service can be updated with customized licenses obtained by the customer.
Before you begin, consider the following tips:
- X-Pack licenses come in different levels. For more information, see Subscriptions
.
- When your free trial license expires, and you do not update logging service with the user-provided licenses, only
Open Sourcefeatures remain operational. For more information, see Open Source subscription.
- You can acquire a free
Basiclicense through Annual registration. Request a license for Elastic Version 5.x. For more information, see Basic subscriptions
.
- You can set chart parameter,
xpack.license.sourceto specify one of the following licenses:- For a self-generated trial license, set the parameter value to
selfGenerated. - For an external license file, set the parameter value to
secret.
- For a self-generated trial license, set the parameter value to
Complete the following steps to update your license.
-
Acquire Elastic license. Based on the wanted feature set, acquire a license in JSON format. For more information, see Basic subscriptions
.
-
Check your existing license.
- Log in to Kibana console and click Dev Tools.
-
From the left navigation window, prepare the request to retrieve and review your license:
GET /_xpack/license -
Click the green triangle to make the API call. 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 } }
-
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>iskube-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 wanted services.xpack: monitoring: true 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.jsonIf
xpack.license.sourceis set toselfGenerated, a new 30-day license is requested from Elasticsearch every time the Elasticsearch master pod is restarted. -
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 .tar file.
Run the following command by using the local link found in Step 6:
curl -k https://<master ip>:8443/mgmt-repo/requiredAssets/ibm-icplogging-x.y.z.tgz > ibm-icplogging-x.y.z.tgz
-
-
Upgrade Helm chart
Run the following command. Replace
x.y.zwith the version that you found in Step 6: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 Step 2 to verify that Elasticsearch returns the expected license.