[elasticsearch] Update config for 6.x

This updates the elasticsearch configuration file (and loading
mechanism) for ELK 6.x.

The default location for the configuration for all package
distributions is /etc/elasticsearch[1], so now that is where we
overwrite the elasticsearch.yml.

The path.conf and path.scripts paths are no longer supported and will
raise exceptions if utilized in 6.x.

[1]:
https://www.elastic.co/guide/en/elasticsearch/reference/6.x/settings.html#config-files-location

Implements: blueprint elasticsearch-kibana-version-upgrade
Depends-On: https://review.opendev.org/#/c/647748/
Change-Id: I4f74bfe07d4b7ca18953b11e767cf0bb94dfd67e
This commit is contained in:
Jason Anderson 2020-02-24 14:51:14 -06:00
parent fa49143f10
commit 4d46c428d0
No known key found for this signature in database
GPG Key ID: 9207452BF63947DD
3 changed files with 8 additions and 6 deletions

View File

@ -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:
# 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
become: true
vars:
@ -8,7 +12,7 @@
kolla_toolbox:
module_name: uri
module_args:
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/_cluster/settings"
url: "{{ elasticsearch_url }}/_cluster/settings"
method: PUT
status_code: 200
return_content: yes
@ -22,7 +26,7 @@
kolla_toolbox:
module_name: uri
module_args:
url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/_flush/synced"
url: "{{ elasticsearch_url }}/_flush/synced"
method: POST
status_code: 200
return_content: yes

View File

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

View File

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