ES and Kibana config modification for Kube
This PS modifies Elasticsearch and Kibana configuration templates so genconfig can genarate Kubernetes compatible config for these services. TrivialFix Change-Id: I6886307a163a9ca27a29e6dbdac4f9080948e4b5
This commit is contained in:
parent
76df447012
commit
911dfe4ef7
@ -1,12 +1,13 @@
|
||||
{% set num_nodes = groups['elasticsearch'] | length %}
|
||||
{% set minimum_master_nodes = (num_nodes / 2 + 1) | round(0, 'floor') | int if num_nodes > 2 else 1 %}
|
||||
{% set recover_after_nodes = (num_nodes * 2 / 3) | round(0, 'floor') | int if num_nodes > 1 else 1 %}
|
||||
node.name: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
network.host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
cluster.name: "{{ elasticsearch_cluster_name }}"
|
||||
node.name: "{% if orchestration_engine == 'KUBERNETES' %}0.0.0.0{% else %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}{% endif %}"
|
||||
network.host: {% if orchestration_engine == 'KUBERNETES' %}_eth0:ipv4_{% else %}"{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"{% endif %}
|
||||
|
||||
cluster.name: "{% if orchestration_engine == 'KUBERNETES' %}0.0.0.0{% else %}{{ elasticsearch_cluster_name }}{% endif %}"
|
||||
node.master: true
|
||||
node.data: true
|
||||
discovery.zen.ping.unicast.hosts: [{% for host in groups['elasticsearch'] %}"{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}"{% if not loop.last %},{% endif %}{% endfor %}]
|
||||
discovery.zen.ping.unicast.hosts: [{% if orchestration_engine == 'KUBERNETES' %}"0.0.0.0"{% else %}{% for host in groups['elasticsearch'] %}"{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}"{% if not loop.last %},{% endif %}{% endfor %}{% endif %}]
|
||||
|
||||
discovery.zen.minimum_master_nodes: {{ minimum_master_nodes }}
|
||||
gateway.expected_nodes: {{ num_nodes }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
kibana.defaultAppId: "{{ kibana_default_app_id }}"
|
||||
server.port: {{ kibana_server_port }}
|
||||
server.host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
||||
elasticsearch.url: "{{ internal_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ elasticsearch_port }}"
|
||||
server.host: "{% if orchestration_engine == 'KUBERNETES' %}0.0.0.0{% else %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}{% endif %}"
|
||||
elasticsearch.url: "{{ internal_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}elasticsearch{% else %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}{% endif %}:{{ elasticsearch_port }}"
|
||||
elasticsearch.requestTimeout: {{ kibana_elasticsearch_request_timeout }}
|
||||
elasticsearch.shardTimeout: {{ kibana_elasticsearch_shard_timeout }}
|
||||
elasticsearch.ssl.verify: {{ kibana_elasticsearch_ssl_verify }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user