MNAIO ELK Updates

* We don't need to create the containers as they are created during the 
initial run.

* Remove quoting in favor of {% raw %} blocks

Change-Id: Ied696ad0882169d523a60a900788e7c2ba1d3fa3
This commit is contained in:
Dave Wilde 2018-09-17 13:10:13 -05:00
parent 94d8f09b74
commit e4bd1fdaed
4 changed files with 25 additions and 12 deletions

View File

@ -130,6 +130,7 @@
[[ ! -d "/var/lib/{{ service_name }}" ]] && mkdir -p "/var/lib/{{ service_name }}"
container_config:
- "lxc.mount.entry=/openstack/{{ inventory_hostname }}/{{ service_name }} var/lib/{{ service_name }} none bind 0 0"
- "lxc.aa_profile=unconfined"
delegate_to: "{{ physical_host }}"
when:
- container_tech | default('lxc') == 'lxc'

View File

@ -69,9 +69,17 @@
changed_when: false
register: _logstash_block_device
- name: Set device fact
set_fact:
_logstash_device: "{{ _logstash_block_device.stdout.split('/')[-1] | regex_replace('[0-9]$','') }}"
- name: Set device info fact
set_fact:
_logstash_device_info: "{{ ansible_devices[_logstash_device] }}"
- name: Set persisted queue fact
set_fact:
logstash_queue_type: "{{ ((ansible_devices[_logstash_block_device.stdout.split('/')[-1] | regex_replace('[0-9]$','')]['rotational'] | int) != 1) | ternary('persisted', 'memory') }}"
logstash_queue_type: "{{ ((_logstash_device_info['rotational'] | int) != 1) | ternary('persisted', 'memory') }}"
rescue:
- name: Set persisted queue fact (fallback)
set_fact:

View File

@ -48,7 +48,6 @@
with_items:
- tmux attach -t build-osa
- tmux select-pane -t 0
- tmux send-keys "openstack-ansible playbooks/lxc-containers-create --limit elk_all" C-m
- tmux send-keys "cd /opt/openstack-ansible-ops/elk_metrics_6x" C-m
- tmux send-keys "openstack-ansible site.yml" C-m
when:

View File

@ -46,36 +46,40 @@ galera_innodb_buffer_pool_size: 1024M
galera_gcache_size: 128M
{% if osa_enable_elk_metrics | bool %}
{% raw %}
haproxy_extra_services:
- service:
haproxy_service_name: elastic-logstash
haproxy_ssl: False
haproxy_backend_nodes: "{{ '{{' }} groups['Kibana'] | default([]) {{ '}}' }}" # Kibana nodes are also Elasticsearch coordination nodes
haproxy_ssl: True
haproxy_backend_nodes: "{{ groups['Kibana'] | default([]) }}" # Kibana nodes are also Elasticsearch coordination nodes
haproxy_port: 9201 # This is set using the "elastic_hap_port" variable
haproxy_check_port: 9200 # This is set using the "elastic_port" variable
haproxy_backend_port: 9200 # This is set using the "elastic_port" variable
haproxy_balance_type: tcp
- service:
haproxy_service_name: Kibana
haproxy_ssl: False
haproxy_backend_nodes: "{{ '{{' }} groups['Kibana'] | default([]) {{ '}}' }}"
haproxy_port: 81 # This is set using the "Kibana_nginx_port" variable
haproxy_ssl: True
haproxy_backend_nodes: "{{ groups['Kibana'] | default([]) }}"
haproxy_port: 8443
haproxy_backend_port: 81
haproxy_balance_type: tcp
- service:
haproxy_service_name: apm-server
haproxy_ssl: False
haproxy_backend_nodes: "{{ '{{' }} groups['apm-server'] | default([]) {{ '}}' }}"
haproxy_port: 8200 # this is set using the "apm_port" variable
haproxy_ssl: True
haproxy_backend_nodes: "{{ groups['apm-server'] | default([]) }}"
haproxy_port: 8200
haproxy_balance_type: tcp
{% endraw %}
{% endif %}
{% if osa_enable_os_profiler | bool %}
{% raw %}
profiler_overrides: &os_profiler
profiler:
enabled: true
trace_sqlalchemy: true
hmac_keys: '{{ '{{' }} os_profiler_hmac_token {{ '}}' }}'
connection_string: "Elasticsearch://'{{ '{{' }} internal_lb_vip_address {{ '}}' }}':9201"
hmac_keys: '{{ os_profiler_hmac_token }}'
connection_string: "Elasticsearch://'{{ internal_lb_vip_address }}':9201"
es_doc_type: "notification"
es_scroll_time: "2m"
es_scroll_size: "10000"
@ -101,6 +105,7 @@ sahara_conf_overrides: *os_profiler
swift_swift_conf_overrides: *os_profiler
tacker_tacker_conf_overrides: *os_profiler
trove_config_overrides: *os_profiler
{% endraw %}
{% endif %}
{% if osa_enable_uwsgi_stats | bool %}