X-pack with ansible role license failing


(Cchaffee) #1

Hello, currently trying to run the ansible playbooks from this repo:

Running the xpack-centos-7 test suite but when it gets to the license part it fails because it doesn't have a license for the security features. I am doing inspec building with elastic and need to get the x-pack playbook working so I can run the verifier. This is the playbook that runs: (https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml).

I've read that a trial license should generate upon installation of elastic, but that doesn't appear to be the case here. Anyone have some guidance on running config management code with X-pack? Running into a bit of a wall.

Edit: here's the part in the documentation saying the license should generate during x-pack plugin install

https://www.elastic.co/guide/en/x-pack/current/license-management.html


(Michael Russell) #2

Hi @cchaffee!

The role expects the local path to the xpack license to be specified in the environment variable ES_XPACK_LICENSE_FILE. You can generate a suitable license at https://register.elastic.co/ to run the integration tests.

export ES_XPACK_LICENSE_FILE="$(pwd)/license.json" 
kitchen converge

More information about running the role with xpack can be found in the roles readme (installing xpack features).

At the top of my todo list is to add better automation and documentation about running the local development environment so thanks for this feedback since it is really useful! Please do let me know if you run into more problems getting the dev environment working so I can make sure it is properly documented and as easy as possible to get running.

Edit: here's the part in the documentation saying the license should generate during x-pack plugin install

This is true and it makes a lot of sense for testing out the xpack features. However it is expected that most people who are installing an xpack enabled cluster with this role are setting it up for production use and would want to do so with a proper xpack license.

I would be open to the idea of having a variable (that isn't the default) which would let the role use xpack with the autogenerated license to make local development just a little bit easier. Please open a new feature request if you like the idea too!

P.S. Sorry for the late reply I just got back from holidays. In the future I would recommend creating an issue directly in https://github.com/elastic/ansible-elasticsearch since I will get notified immediately and other users of the role might be able to help out too!

Cheers,

Michael


(system) #3

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