Automated install for X-Pack License (drop license.json into the container filesystem)?

Hi,

We have a commercial license for X-Pack and are looking to setup our cluster nodes to run in Docker/Kubernetes. We're currently getting tripped up on the license installation phase, as the only documented way to install a license is to issue an HTTP request once the Elasticsearch process is running. Is there a way to provide license.json somewhere in the filesystem of the container so that we can automate the license installation process without hacky sidecar services?

Hi Cedric, unfortunately I don't believe there's currently any way to install a license other than via the API.

Thanks,
CJ

For what it's worth, you're not alone in requesting this kind of capability. Here's a similar request on one of our repos: https://github.com/elastic/puppet-elasticsearch/issues/647#issuecomment-272103209. So the team is aware of the need for something like this. If you'd like, I think it'd be great if you could share your own requirements on that issue.

Thanks,
CJ

Thanks for the heads up. The requirements should be fairly straightforward. We'd like to drop a license.json file directly into the config folder and have the ES node pick that up on startup. It should merge the license into the cluster state if appropriate to do so (similar to how file-based users used to work in shield). You could use the metadata on the license itself to determine if an existing license should be replaced in the cluster (based on trial vs commercial, expiration date, etc).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.