Merge "[elasticsearch] Update config for 6.x"

This commit is contained in:
Zuul 2020-04-14 11:43:39 +00:00 committed by Gerrit Code Review
commit 3f6314215c
3 changed files with 8 additions and 6 deletions
ansible/roles/elasticsearch

@ -1,6 +1,10 @@
--- ---
- name: Set fact for Elasticsearch URL
set_fact:
elasticsearch_url: "{{ internal_protocol }}://{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ elasticsearch_port }}"
# The official procedure for upgrade elasticsearch: # The official procedure for upgrade elasticsearch:
# https://www.elastic.co/guide/en/elasticsearch/reference/5.6/restart-upgrade.html # https://www.elastic.co/guide/en/elasticsearch/reference/6.x/restart-upgrade.html
- name: Disable shard allocation - name: Disable shard allocation
become: true become: true
vars: vars:
@ -8,7 +12,7 @@
kolla_toolbox: kolla_toolbox:
module_name: uri module_name: uri
module_args: module_args:
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/_cluster/settings" url: "{{ elasticsearch_url }}/_cluster/settings"
method: PUT method: PUT
status_code: 200 status_code: 200
return_content: yes return_content: yes
@ -22,7 +26,7 @@
kolla_toolbox: kolla_toolbox:
module_name: uri module_name: uri
module_args: module_args:
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/_flush/synced" url: "{{ elasticsearch_url }}/_flush/synced"
method: POST method: POST
status_code: 200 status_code: 200
return_content: yes return_content: yes

@ -3,7 +3,7 @@
"config_files": [ "config_files": [
{ {
"source": "{{ container_config_directory }}/elasticsearch.yml", "source": "{{ container_config_directory }}/elasticsearch.yml",
"dest": "/usr/share/elasticsearch/config/elasticsearch.yml", "dest": "/etc/elasticsearch/elasticsearch.yml",
"owner": "elasticsearch", "owner": "elasticsearch",
"perm": "0600" "perm": "0600"
} }

@ -14,9 +14,7 @@ http.port: {{ elasticsearch_port }}
gateway.expected_nodes: {{ num_nodes }} gateway.expected_nodes: {{ num_nodes }}
gateway.recover_after_time: "5m" gateway.recover_after_time: "5m"
gateway.recover_after_nodes: {{ recover_after_nodes }} gateway.recover_after_nodes: {{ recover_after_nodes }}
path.conf: "/etc/elasticsearch"
path.data: "/var/lib/elasticsearch/data" path.data: "/var/lib/elasticsearch/data"
path.logs: "/var/log/kolla/elasticsearch" path.logs: "/var/log/kolla/elasticsearch"
path.scripts: "/etc/elasticsearch/scripts"
indices.fielddata.cache.size: 40% indices.fielddata.cache.size: 40%
action.auto_create_index: "true" action.auto_create_index: "true"