Add changes to the sysconfig defaults file

These changes mirror systemd tunables for elasticsearch and are needed
to ensure any OS without systemd (like Ubuntu 14.04) has the same
capabilities and OS's with systemd. This also adds a specific sysctl
file to use when making sysctl changes. This will ensure we're not
subjecting our deployment to other changes from other sources, like an
OSA playbook run.

Change-Id: Ic0e0bc0f93a12298c1e2f634cf5a1b4c6be2995e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-09-27 00:13:27 -05:00
parent 9237bc3abe
commit 4c86cb9be2
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
10 changed files with 38 additions and 0 deletions

View File

@ -60,6 +60,7 @@
value: "524288"
state: "present"
reload: "yes"
sysctl_file: /etc/sysctl.d/99-elasticsearch.conf
delegate_to: "{{ physical_host }}"
tags:
- sysctl
@ -70,6 +71,7 @@
value: "1048576"
state: "present"
reload: "yes"
sysctl_file: /etc/sysctl.d/99-elasticsearch.conf
delegate_to: "{{ physical_host }}"
tags:
- sysctl

View File

@ -62,6 +62,15 @@
notify:
- Enable and restart logstash
- name: Set sysconfig service defaults
lineinfile:
path: "{{ logstash_sysconfig_path }}"
regexp: '^{{ item.key }}='
line: '{{ item.key }}={{ item.value }}'
with_items:
- key: LS_OPEN_FILES
value: 32768
- name: Drop jvm conf file(s)
template:
src: "{{ item.src }}"

View File

@ -16,3 +16,5 @@
logstash_distro_packages:
- logrotate
- logstash
logstash_sysconfig_path: /etc/default/logstash

View File

@ -16,3 +16,5 @@
logstash_distro_packages:
- logrotate
- logstash
logstash_sysconfig_path: /etc/default/logstash

View File

@ -16,3 +16,5 @@
logstash_distro_packages:
- logrotate
- logstash
logstash_sysconfig_path: /etc/default/logstash

View File

@ -68,6 +68,19 @@
tags:
- config
- name: Set sysconfig service defaults
lineinfile:
path: "{{ elasticsearch_sysconfig_path }}"
regexp: '^{{ item.key }}='
line: '{{ item.key }}={{ item.value }}'
with_items:
- key: MAX_OPEN_FILES
value: 65536
- key: MAX_LOCKED_MEMORY
value: unlimited
- key: MAX_MAP_COUNT
value: 524288
- name: Drop jvm conf file(s)
template:
src: "{{ item.src }}"

View File

@ -16,3 +16,5 @@
elasticsearch_distro_packages:
- logrotate
- elasticsearch
elasticsearch_sysconfig_path: /etc/sysconfig/elasticsearch

View File

@ -16,3 +16,5 @@
elasticsearch_distro_packages:
- logrotate
- elasticsearch
elasticsearch_sysconfig_path: /etc/sysconfig/elasticsearch

View File

@ -16,3 +16,5 @@
elasticsearch_distro_packages:
- logrotate
- elasticsearch
elasticsearch_sysconfig_path: /etc/default/elasticsearch

View File

@ -57,6 +57,8 @@
name: vm.swappiness
value: 10
state: present
reload: "yes"
sysctl_file: /etc/sysctl.d/99-elasticsearch.conf
- name: Flush iptables rules
command: "{{ item }}"