elastic / ansible-elasticsearch

Ansible playbook for Elasticsearch
Other
1.58k stars 854 forks source link

Add Amazon-Linux-v2 support #702

Closed anisf closed 4 years ago

anisf commented 4 years ago

In README.md : "Currently this works on Debian and RedHat based linux systems"

In Elasticsearch documentation : "Prefer the Amazon Linux AMIs"

Amazon-Linux is RedHat based. Starting Amazon-Linux v2, it uses systemd. But use_system_d var is not set to True (tasks/elasticsearch-parameters.yml: 44) when running this role against Amazon-Linux v2 EC2 instance.

Causing systemd memlock configuration to be skipped because use_system_d needs to be True (tasks/elasticsearch-config.yml: 63)

Causing bootstrap checks failed when es_config['bootstrap.memory_lock'] == True

This PR adds Amazon-Linux v2 to the conditions list to set use_system_d to True

elasticmachine commented 4 years ago

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

cla-checker-service[bot] commented 4 years ago

💚 CLA has been signed

anisf commented 4 years ago

❌ Author of the following commits did not sign a Contributor Agreement: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , cba88d0

Please, read and sign the above mentioned agreement if you want to contribute to this project

Contributor Agreement signed !

jmlrt commented 4 years ago

Hi @anisf, thanks for this PR.

I think you created it for the wrong branch. Can you recreate it for master branch? Also, I didn't see any tests, we are using Test Kitchen with Docker to test all supported OS in our CI (example.

Screenshot 2020-06-24 at 19 04 57

This means mostly adding some block code in .kitchen.yml (example). More details here.

It seems that this Docker image could be used: amazonlinux:2. Do you think you could add this tests?

anisf commented 4 years ago

Hi @anisf, thanks for this PR.

I think you created it for the wrong branch. Can you recreate it for master branch? Also, I didn't see any tests, we are using Test Kitchen with Docker to test all supported OS in our CI (example.

Screenshot 2020-06-24 at 19 04 57

This means mostly adding some block code in .kitchen.yml (example). More details here.

It seems that this Docker image could be used: amazonlinux:2. Do you think you could add this tests?

Thanks for you answer, I just recreated it for master branch.

Ok for the tests, I will add them

Thanks