diff options
| author | Christian Berendt <berendt@betacloud-solutions.de> | 2016-05-23 17:45:52 +0200 |
|---|---|---|
| committer | Christian Berendt <berendt@betacloud-solutions.de> | 2016-08-03 21:59:51 +0200 |
| commit | 4cd95dbcc509ccec5a8b83294a251623c2895d9f (patch) | |
| tree | 939fbe02e4fcfad4422706c7099324748829e7c1 | |
| parent | 63d448fe2e110d1ef908645cedbb2431f5ffe216 (diff) | |
| download | kolla-4cd95dbcc509ccec5a8b83294a251623c2895d9f.tar.gz kolla-4cd95dbcc509ccec5a8b83294a251623c2895d9f.zip | |
Enable central logging without deploying elasticsearch/kibana
This changed introduces 4 new parameters to be able to use an existing
elasticsearch service for central logging.
* elasticsearch_address - address of elasticsearch server
* elasticsearch_protocol - protocol (HTTP/HTTPS) used by elasticsearch server
* enable_elasticsearch - deploy elasticsearch container
* enable_kibana - deploy kibana container
Closes-bug: #1584861
Change-Id: Ia1ff9ae8b6d9929c3826da02693d1e2fc9ea2522
| -rw-r--r-- | ansible/group_vars/all.yml | 10 | ||||
| -rw-r--r-- | ansible/roles/common/templates/heka-elasticsearch.toml.j2 | 2 | ||||
| -rw-r--r-- | ansible/roles/haproxy/templates/haproxy.cfg.j2 | 4 | ||||
| -rw-r--r-- | ansible/site.yml | 4 | ||||
| -rw-r--r-- | doc/advanced-configuration.rst | 13 |
5 files changed, 29 insertions, 4 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 3b5a1ae3c..abc07680b 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -244,6 +244,16 @@ num_nova_fake_per_node: 5 #################### +# Logging options +#################### + +elasticsearch_address: "{{ kolla_internal_vip_address }}" +elasticsearch_protocol: "{{ internal_protocol }}" + +enable_elasticsearch: "{{ 'yes' if enable_central_logging | bool }}" +enable_kibana: "{{ 'yes' if enable_central_logging | bool }}" + +#################### # RabbitMQ options #################### rabbitmq_user: "openstack" diff --git a/ansible/roles/common/templates/heka-elasticsearch.toml.j2 b/ansible/roles/common/templates/heka-elasticsearch.toml.j2 index 7b9a351cb..f3d4b1346 100644 --- a/ansible/roles/common/templates/heka-elasticsearch.toml.j2 +++ b/ansible/roles/common/templates/heka-elasticsearch.toml.j2 @@ -6,7 +6,7 @@ fields = ["Timestamp", "Type", "Logger", "Severity", "Payload", "Pid", "Hostname [elasticsearch_output] type = "ElasticSearchOutput" -server = "{{ internal_protocol }}://{{ kolla_internal_vip_address }}:{{ elasticsearch_port }}" +server = "{{ elasticsearch_protocol }}://{{ elasticsearch_address }}:{{ elasticsearch_port }}" message_matcher = "Type == 'log'" encoder = "elasticsearch_json_encoder" use_buffering = true diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index c808a3da8..d0949ed98 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -364,7 +364,7 @@ listen radosgw_external {% endif %} {% endif %} -{% if enable_central_logging | bool %} +{% if enable_kibana | bool %} userlist kibanauser user {{ kibana_user }} insecure-password {{ kibana_password }} @@ -388,7 +388,9 @@ listen kibana_external server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ kibana_server_port }} check inter 2000 rise 2 fall 5 {% endfor %} {% endif %} +{% endif %} +{% if enable_elasticsearch | bool %} listen elasticsearch option dontlog-normal bind {{ kolla_internal_vip_address }}:{{ elasticsearch_port }} diff --git a/ansible/site.yml b/ansible/site.yml index e923d4d39..44c163ae6 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -12,7 +12,7 @@ roles: - { role: elasticsearch, tags: elasticsearch, - when: enable_central_logging | bool } + when: enable_elasticsearch | bool } - hosts: - cinder-api @@ -39,7 +39,7 @@ roles: - { role: kibana, tags: kibana, - when: enable_central_logging | bool } + when: enable_kibana | bool } - hosts: memcached roles: diff --git a/doc/advanced-configuration.rst b/doc/advanced-configuration.rst index 9ba0f0d31..789b883dd 100644 --- a/doc/advanced-configuration.rst +++ b/doc/advanced-configuration.rst @@ -194,3 +194,16 @@ adding: Note this method is not recommended and generally not tested by the Kolla community, but included since sometimes a free IP is not available in a testing environment. + +External Elasticsearch/Kibana environment +========================================= + +It is possible to use an external Elasticsearch/Kibana environment. To do this +first disable the deployment of the central logging. + +:: + + enable_central_logging: "no" + +Now you can use the parameter ``elasticsearch_address`` to configure the address +of the external Elasticsearch environment. |
