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:
parent
9237bc3abe
commit
4c86cb9be2
@ -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
|
||||
|
@ -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 }}"
|
||||
|
@ -16,3 +16,5 @@
|
||||
logstash_distro_packages:
|
||||
- logrotate
|
||||
- logstash
|
||||
|
||||
logstash_sysconfig_path: /etc/default/logstash
|
||||
|
@ -16,3 +16,5 @@
|
||||
logstash_distro_packages:
|
||||
- logrotate
|
||||
- logstash
|
||||
|
||||
logstash_sysconfig_path: /etc/default/logstash
|
||||
|
@ -16,3 +16,5 @@
|
||||
logstash_distro_packages:
|
||||
- logrotate
|
||||
- logstash
|
||||
|
||||
logstash_sysconfig_path: /etc/default/logstash
|
||||
|
@ -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 }}"
|
||||
|
@ -16,3 +16,5 @@
|
||||
elasticsearch_distro_packages:
|
||||
- logrotate
|
||||
- elasticsearch
|
||||
|
||||
elasticsearch_sysconfig_path: /etc/sysconfig/elasticsearch
|
||||
|
@ -16,3 +16,5 @@
|
||||
elasticsearch_distro_packages:
|
||||
- logrotate
|
||||
- elasticsearch
|
||||
|
||||
elasticsearch_sysconfig_path: /etc/sysconfig/elasticsearch
|
||||
|
@ -16,3 +16,5 @@
|
||||
elasticsearch_distro_packages:
|
||||
- logrotate
|
||||
- elasticsearch
|
||||
|
||||
elasticsearch_sysconfig_path: /etc/default/elasticsearch
|
||||
|
@ -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 }}"
|
||||
|
Loading…
Reference in New Issue
Block a user