diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-08-05 03:23:43 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-08-05 03:23:43 +0000 |
| commit | 05f381df6a0587b9a9f9bef399924cdebc7b64c9 (patch) | |
| tree | 88c0478fd1c16c5d95092e7b346a9afce87d0271 | |
| parent | 88289563b5bcf4ce80a10901e4d5f501c54e1595 (diff) | |
| parent | 4cd95dbcc509ccec5a8b83294a251623c2895d9f (diff) | |
| download | kolla-05f381df6a0587b9a9f9bef399924cdebc7b64c9.tar.gz kolla-05f381df6a0587b9a9f9bef399924cdebc7b64c9.zip | |
Merge "Enable central logging without deploying elasticsearch/kibana"
| -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. |
