diff --git a/elk_metrics_6x/roles/elastic_dependencies/tasks/main.yml b/elk_metrics_6x/roles/elastic_dependencies/tasks/main.yml index a8bb1e9b..85158bee 100644 --- a/elk_metrics_6x/roles/elastic_dependencies/tasks/main.yml +++ b/elk_metrics_6x/roles/elastic_dependencies/tasks/main.yml @@ -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' diff --git a/elk_metrics_6x/roles/elastic_logstash/tasks/main.yml b/elk_metrics_6x/roles/elastic_logstash/tasks/main.yml index 2a726279..41bf570c 100644 --- a/elk_metrics_6x/roles/elastic_logstash/tasks/main.yml +++ b/elk_metrics_6x/roles/elastic_logstash/tasks/main.yml @@ -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: diff --git a/multi-node-aio/playbooks/deploy-elk.yml b/multi-node-aio/playbooks/deploy-elk.yml index 24a70233..bbae173b 100644 --- a/multi-node-aio/playbooks/deploy-elk.yml +++ b/multi-node-aio/playbooks/deploy-elk.yml @@ -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: diff --git a/multi-node-aio/playbooks/osa/user_mnaio_variables.yml b/multi-node-aio/playbooks/osa/user_mnaio_variables.yml index 44afc2d2..6a8fe03d 100644 --- a/multi-node-aio/playbooks/osa/user_mnaio_variables.yml +++ b/multi-node-aio/playbooks/osa/user_mnaio_variables.yml @@ -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 %}