Add bind mount for logstash and ensure java is installed
This change ensures java is installed where logstash is installed and changes the logstash data-directory to a bind mount which will ensure we're not running into space issues inside of our logstash container. Change-Id: I43f7fb4a8641150c05dcde88a94b65e7c7d2f83a Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
e761b80ff4
commit
d3d00a076e
@ -14,6 +14,7 @@
|
||||
delegate_to: "{{ physical_host }}"
|
||||
tags:
|
||||
- sysctl
|
||||
|
||||
- name: elasticsearch datapath bind mount
|
||||
lxc_container:
|
||||
name: "{{ inventory_hostname }}"
|
||||
@ -23,6 +24,9 @@
|
||||
container_config:
|
||||
- "lxc.mount.entry=/openstack/{{ inventory_hostname }} var/lib/elasticsearch none bind 0 0"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when:
|
||||
- physical_host != inventory_hostname
|
||||
- container_tech | default('lxc') == 'lxc'
|
||||
|
||||
- name: Ensure Java is installed
|
||||
apt:
|
||||
|
@ -7,6 +7,35 @@
|
||||
tasks:
|
||||
- include_tasks: common_task_install_elk_repo.yml
|
||||
|
||||
- name: Configure systcl vm.max_map_count=262144 on container hosts
|
||||
sysctl:
|
||||
name: "vm.max_map_count"
|
||||
value: "262144"
|
||||
state: "present"
|
||||
reload: "yes"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
tags:
|
||||
- sysctl
|
||||
|
||||
- name: logstash datapath bind mount
|
||||
lxc_container:
|
||||
name: "{{ inventory_hostname }}"
|
||||
container_command: |
|
||||
[[ ! -d "/var/lib/logstash" ]] && mkdir -p "/var/lib/logstash"
|
||||
container_config:
|
||||
- "lxc.mount.entry=/openstack/{{ inventory_hostname }} var/lib/logstash none bind 0 0"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when:
|
||||
- physical_host != inventory_hostname
|
||||
- container_tech | default('lxc') == 'lxc'
|
||||
|
||||
- name: Ensure Java is installed
|
||||
apt:
|
||||
name: openjdk-8-jre
|
||||
state: present
|
||||
install_recommends: yes
|
||||
update_cache: yes
|
||||
|
||||
- name: Ensure Logstash is installed.
|
||||
apt:
|
||||
name: logstash
|
||||
|
Loading…
Reference in New Issue
Block a user