Merge pull request #640 from jmlrt/release750

7.5.0 Release
This commit is contained in:
Julien Mailleret 2019-12-09 15:47:25 +01:00 committed by GitHub
commit d145d188e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 9 deletions

View file

@ -1,5 +1,50 @@
# Changelog # Changelog
## 7.5.0 - 2019/12/09
* 7.5.0 as default version
* 6.8.5 as 6.x tested version
### Breaking changes
#### Removing the MAX_THREAD settings
Ansible-elasticsearch 7.5.0 is removing the option to customize the maximum number of threads the process can start in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637/files#diff-04c6e90faac2675aa89e2176d2eec7d8L408).
We discovered that this option wasn't working anymore since multi-instance support removal in ansible-elasticsearch 7.1.1.
This option will be added back in a following release if it's still relevant regarding latest Elasticsearch evolutions.
#### Changes about configuration files
Ansible-elasticsearch 7.5.0 is updating the configuration files provided by this role in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637) which contained some otions deprecated in 6.x and 7.x:
- `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch`: the new template reflect the configuration file provided by Elasticsearch >= 6.x, the parameter we removed were already not used in 6.x and 7.x
- `/etc/elasticsearch/jvm.options`: the new template reflect the configuration files provided by Elasticsearch >= 6.x
- `/etc/elasticsearch/log4j2.properties`:
- We removed `log4j2.properties.j2` template from this Ansible role as it was a static file not bringing any customization specific to some ansible variable.
- Deployment of this Ansible role on new servers will get the default `log4j2.properties` provided by Elastisearch without any override.
- **WARNING**: For upgrade scenarios where this file was already managed by previous versions of ansible-elasticsearch, this file will become unmanaged and won't be updated by default. If you wish to update it to 7.5 version, you can retrieve it [here](https://github.com/elastic/elasticsearch/blob/7.5/distribution/src/config/log4j2.properties) and use this file with `es_config_log4j2` Ansible variable (see below).
##### How to override configuration files provided by ansible-elasticsearch?
You can now override the configuration files with your own versions by using the following Ansible variables:
- `es_config_default: "elasticsearch.j2"`: replace `elasticsearch.j2` by your own template to use a custom `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch` configuration file
- `es_config_jvm: "jvm.options.j2"`: replace `jvm.options.j2` by your own template to use a custom `/etc/elasticsearch/jvm.options` configuration file
- `es_config_log4j2: ""`: set this variable to the path of your own template to use a custom `/etc/elasticsearch/log4j2.properties` configuration file
### SSL/TLS Support
Ansible-elasticsearch is now supporting SSL/TLS encryption. Please refer to [X-Pack Security SSL/TLS](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/ssl-tls-setup.md) to configure it.
| PR | Author | Title |
| ---------------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------- |
|[#625](https://github.com/elastic/ansible-elasticsearch/pull/625) | [@jmlrt](https://github.com/jmlrt) | Add bumper script |
|[#575](https://github.com/elastic/ansible-elasticsearch/pull/575) | [@flyinggecko](https://github.com/flyinggecko) | Docs: Fix name of elasticsearch ansible role |
|[#629](https://github.com/elastic/ansible-elasticsearch/pull/629) | [@patsevanton](https://github.com/patsevanton) | Add cluster.initial_master_nodes |
|[#620](https://github.com/elastic/ansible-elasticsearch/pull/620) | [@pemontto](https://github.com/pemontto) | Add SSL/TLS support |
|[#630](https://github.com/elastic/ansible-elasticsearch/pull/630) | [@jmlrt](https://github.com/jmlrt) | Indent yaml for config file |
|[#636](https://github.com/elastic/ansible-elasticsearch/pull/636) | [@jmlrt](https://github.com/jmlrt) | Bump elasticsearch to 6.8.5 and 7.4.2 |
|[#637](https://github.com/elastic/ansible-elasticsearch/pull/637) | [@jmlrt](https://github.com/jmlrt) | Use default config files |
## 7.4.1 - 2019/10/23 ## 7.4.1 - 2019/10/23
* 7.4.1 as default version * 7.4.1 as default version

View file

@ -23,6 +23,29 @@ The latest Elasticsearch versions of 7.x & 6.x are actively tested.
* If you install more than one instance of Elasticsearch on the same host (with different ports, directory and config files), **do not update to ansible-elasticsearch >= 7.1.1**, please follow this [workaround](./docs/multi-instance.md#workaround) instead. * If you install more than one instance of Elasticsearch on the same host (with different ports, directory and config files), **do not update to ansible-elasticsearch >= 7.1.1**, please follow this [workaround](./docs/multi-instance.md#workaround) instead.
* For multi-instances use cases, we are now recommending Docker containers using our official images (https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html). * For multi-instances use cases, we are now recommending Docker containers using our official images (https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).
### Removing the MAX_THREAD settings
Ansible-elasticsearch 7.5.0 is removing the option to customize the maximum number of threads the process can start in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637/files#diff-04c6e90faac2675aa89e2176d2eec7d8L408).
We discovered that this option wasn't working anymore since multi-instance support removal in ansible-elasticsearch 7.1.1.
This option will be added back in a following release if it's still relevant regarding latest Elasticsearch evolutions.
### Changes about configuration files
Ansible-elasticsearch 7.5.0 is updating the configuration files provided by this role in [#637](https://github.com/elastic/ansible-elasticsearch/pull/637) which contained some otions deprecated in 6.x and 7.x:
- `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch`: the new template reflect the configuration file provided by Elasticsearch >= 6.x, the parameter we removed were already not used in 6.x and 7.x
- `/etc/elasticsearch/jvm.options`: the new template reflect the configuration files provided by Elasticsearch >= 6.x
- `/etc/elasticsearch/log4j2.properties`:
- We removed `log4j2.properties.j2` template from this Ansible role as it was a static file not bringing any customization specific to some ansible variable.
- Deployment of this Ansible role on new servers will get the default `log4j2.properties` provided by Elastisearch without any override.
- **WARNING**: For upgrade scenarios where this file was already managed by previous versions of ansible-elasticsearch, this file will become unmanaged and won't be updated by default. If you wish to update it to 7.5 version, you can retrieve it [here](https://github.com/elastic/elasticsearch/blob/7.5/distribution/src/config/log4j2.properties) and use this file with `es_config_log4j2` Ansible variable (see below).
#### How to override configuration files provided by ansible-elasticsearch?
You can now override the configuration files with your own versions by using the following Ansible variables:
- `es_config_default: "elasticsearch.j2"`: replace `elasticsearch.j2` by your own template to use a custom `/etc/default/elasticsearch`|`/etc/sysconfig/elasticsearch` configuration file
- `es_config_jvm: "jvm.options.j2"`: replace `jvm.options.j2` by your own template to use a custom `/etc/elasticsearch/jvm.options` configuration file
- `es_config_log4j2: ""`: set this variable to the path of your own template to use a custom `/etc/elasticsearch/log4j2.properties` configuration file
## Dependency ## Dependency
This role uses the json_query filter which [requires jmespath](https://github.com/ansible/ansible/issues/24319) on the local machine. This role uses the json_query filter which [requires jmespath](https://github.com/ansible/ansible/issues/24319) on the local machine.
@ -32,7 +55,7 @@ This role uses the json_query filter which [requires jmespath](https://github.co
Create your Ansible playbook with your own tasks, and include the role elasticsearch. You will have to have this repository accessible within the context of playbook. Create your Ansible playbook with your own tasks, and include the role elasticsearch. You will have to have this repository accessible within the context of playbook.
```sh ```sh
ansible-galaxy install elastic.elasticsearch,7.4.2 ansible-galaxy install elastic.elasticsearch,7.5.0
``` ```
Then create your playbook yaml adding the role elasticsearch. Then create your playbook yaml adding the role elasticsearch.
@ -46,14 +69,14 @@ The simplest configuration therefore consists of:
roles: roles:
- role: elastic.elasticsearch - role: elastic.elasticsearch
vars: vars:
es_version: 7.4.2 es_version: 7.5.0
``` ```
The above installs Elasticsearch 7.4.2 in a single node 'node1' on the hosts 'localhost'. The above installs Elasticsearch 7.5.0 in a single node 'node1' on the hosts 'localhost'.
**Note**: **Note**:
Elasticsearch default version is described in [`es_version`](defaults/main.yml#L2). You can override this variable in your playbook to install another version. Elasticsearch default version is described in [`es_version`](defaults/main.yml#L2). You can override this variable in your playbook to install another version.
While we are testing this role only with one 7.x and one 6.x version (respectively [7.4.2](defaults/main.yml#L2) and [6.8.5](.kitchen.yml#L22) at the time of writing), this role should work with others version also in most cases. While we are testing this role only with one 7.x and one 6.x version (respectively [7.5.0](defaults/main.yml#L2) and [6.8.5](.kitchen.yml#L22) at the time of writing), this role should work with others version also in most cases.
This role also uses [Ansible tags](http://docs.ansible.com/ansible/playbooks_tags.html). Run your playbook with the `--list-tasks` flag for more information. This role also uses [Ansible tags](http://docs.ansible.com/ansible/playbooks_tags.html). Run your playbook with the `--list-tasks` flag for more information.
@ -381,7 +404,7 @@ In addition to es_config, the following parameters allow the customization of th
* ```es_enable_xpack``` Default `true`. Setting this to `false` will install the oss release of elasticsearch * ```es_enable_xpack``` Default `true`. Setting this to `false` will install the oss release of elasticsearch
* `es_xpack_trial` Default `false`. Setting this to `true` will start the 30-day trail once the cluster starts. * `es_xpack_trial` Default `false`. Setting this to `true` will start the 30-day trail once the cluster starts.
* ```es_version``` (e.g. "7.4.2"). * ```es_version``` (e.g. "7.5.0").
* ```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost". * ```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost".
* ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200. **CHANGE IF THE HTTP PORT IS NOT 9200** * ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200. **CHANGE IF THE HTTP PORT IS NOT 9200**
* ```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin. * ```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin.

View file

@ -1,5 +1,5 @@
--- ---
es_version: "7.4.2" es_version: "7.5.0"
es_use_snapshot_release: false es_use_snapshot_release: false
es_enable_xpack: true es_enable_xpack: true
es_package_name: "elasticsearch" es_package_name: "elasticsearch"

View file

@ -15,12 +15,12 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..'))
old_versions = { old_versions = {
6: '6.8.4', 6: '6.8.4',
7: '7.4.1', 7: '7.4.2',
} }
new_versions = { new_versions = {
6: '6.8.5', 6: '6.8.5',
7: '7.4.2', 7: '7.5.0',
} }
files = [ files = [

View file

@ -47,13 +47,14 @@
# 10-:-XX:-UseConcMarkSweepGC # 10-:-XX:-UseConcMarkSweepGC
# 10-:-XX:-UseCMSInitiatingOccupancyOnly # 10-:-XX:-UseCMSInitiatingOccupancyOnly
# 10-:-XX:+UseG1GC # 10-:-XX:+UseG1GC
{% if es_version is version('7.3.0', '<=') %} {% if es_version is version('7.4.0', '<') %}
# 10-:-XX:InitiatingHeapOccupancyPercent=75 # 10-:-XX:InitiatingHeapOccupancyPercent=75
{% else %} {% else %}
# 10-:-XX:G1ReservePercent=25 # 10-:-XX:G1ReservePercent=25
# 10-:-XX:InitiatingHeapOccupancyPercent=30 # 10-:-XX:InitiatingHeapOccupancyPercent=30
{% endif %} {% endif %}
{% if es_version is version('7.5.0', '<') %}
## DNS cache policy ## DNS cache policy
# cache ttl in seconds for positive DNS lookups noting that this overrides the # cache ttl in seconds for positive DNS lookups noting that this overrides the
# JDK security property networkaddress.cache.ttl; set to -1 to cache forever # JDK security property networkaddress.cache.ttl; set to -1 to cache forever
@ -97,6 +98,7 @@
# log4j 2 # log4j 2
-Dlog4j.shutdownHookEnabled=false -Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true -Dlog4j2.disable.jmx=true
{% endif %}
-Djava.io.tmpdir=${ES_TMPDIR} -Djava.io.tmpdir=${ES_TMPDIR}
@ -126,6 +128,7 @@
# JDK 9+ GC logging # JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file={{ es_log_dir }}/gc.log:utctime,pid,tags:filecount=32,filesize=64m 9-:-Xlog:gc*,gc+age=trace,safepoint:file={{ es_log_dir }}/gc.log:utctime,pid,tags:filecount=32,filesize=64m
{% if es_version is version('7.5.0', '<') %}
# due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise # due to internationalization enhancements in JDK 9 Elasticsearch need to set the provider to COMPAT otherwise
# time/date parsing will break in an incompatible way for some date patterns and locals # time/date parsing will break in an incompatible way for some date patterns and locals
9-:-Djava.locale.providers=COMPAT 9-:-Djava.locale.providers=COMPAT
@ -134,6 +137,7 @@
# temporary workaround for C2 bug with JDK 10 on hardware with AVX-512 # temporary workaround for C2 bug with JDK 10 on hardware with AVX-512
10-:-XX:UseAVX=2 10-:-XX:UseAVX=2
{% endif %} {% endif %}
{% endif %}
{% if es_jvm_custom_parameters !='' %} {% if es_jvm_custom_parameters !='' %}
{% for item in es_jvm_custom_parameters %} {% for item in es_jvm_custom_parameters %}