From f1b79129f12e7f9b4759e50ec644d840f0d1c24c Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 18 Dec 2019 11:57:02 +0100 Subject: [PATCH 1/8] add proxy options to ES_JAVA_OPTS when defined with es_proxy_host --- tasks/elasticsearch-plugins.yml | 1 - templates/elasticsearch.j2 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/elasticsearch-plugins.yml b/tasks/elasticsearch-plugins.yml index e953ae0..7e1829a 100644 --- a/tasks/elasticsearch-plugins.yml +++ b/tasks/elasticsearch-plugins.yml @@ -75,7 +75,6 @@ CONF_DIR: "{{ es_conf_dir }}" ES_PATH_CONF: "{{ es_conf_dir }}" ES_INCLUDE: "{{ default_file }}" - ES_JAVA_OPTS: "{% if item.proxy_host is defined and item.proxy_host != '' and item.proxy_port is defined and item.proxy_port != ''%} -Dhttp.proxyHost={{ item.proxy_host }} -Dhttp.proxyPort={{ item.proxy_port }} -Dhttps.proxyHost={{ item.proxy_host }} -Dhttps.proxyPort={{ item.proxy_port }} {% elif es_proxy_host is defined and es_proxy_host != '' %} -Dhttp.proxyHost={{ es_proxy_host }} -Dhttp.proxyPort={{ es_proxy_port }} -Dhttps.proxyHost={{ es_proxy_host }} -Dhttps.proxyPort={{ es_proxy_port }} {% endif %}" until: plugin_installed.rc == 0 retries: 5 delay: 5 diff --git a/templates/elasticsearch.j2 b/templates/elasticsearch.j2 index 84c4d75..2fc67ff 100644 --- a/templates/elasticsearch.j2 +++ b/templates/elasticsearch.j2 @@ -15,7 +15,7 @@ ES_PATH_CONF={{ es_conf_dir }} PID_DIR={{ es_pid_dir }} # Additional Java OPTS -ES_JAVA_OPTS= +ES_JAVA_OPTS="{% if es_proxy_host is defined and es_proxy_host != '' %}-Dhttp.proxyHost={{ es_proxy_host }} -Dhttp.proxyPort={{ es_proxy_port }} -Dhttps.proxyHost={{ es_proxy_host }} -Dhttps.proxyPort={{ es_proxy_port }}{% endif %}" # Configure restart on package upgrade (true, every other setting will lead to not restarting) #RESTART_ON_UPGRADE=true From 1b53b10454ab85a3a8a91d3da544854effa30d55 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Thu, 19 Dec 2019 12:38:50 +0100 Subject: [PATCH 2/8] remove instructions to install plugins using a specific proxy --- README.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/README.md b/README.md index 88c663b..dae3061 100644 --- a/README.md +++ b/README.md @@ -212,8 +212,6 @@ A more complex example: es_api_port: 9201 es_plugins: - plugin: ingest-attachment - proxy_host: proxy.example.com - proxy_port: 8080 ``` #### Important Note @@ -470,17 +468,6 @@ To define proxy globally, set the following variables: * ```es_proxy_host``` - global proxy host * ```es_proxy_port``` - global proxy port -To define proxy only for a particular plugin during its installation: - -```yaml - es_plugins: - - plugin: ingest-attachment - proxy_host: proxy.example.com - proxy_port: 8080 -``` - -> For plugins installation, proxy_host and proxy_port are used first if they are defined and fallback to the global proxy settings if not. The same values are currently used for both the http and https proxy settings. - ## Notes * The role assumes the user/group exists on the server. The elasticsearch packages create the default elasticsearch user. If this needs to be changed, ensure the user exists. From 4cfd486527ce8aaff3ed319f0f82c14afd380973 Mon Sep 17 00:00:00 2001 From: Jakob Reiter Date: Fri, 10 Jan 2020 10:59:50 +0100 Subject: [PATCH 3/8] switched relative URLs to absolute URLs to fix broken links in Ansible Galaxy. Fixes #656 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dae3061..d8e483c 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ The latest Elasticsearch versions of 7.x & 6.x are actively tested. ### Notice about multi-instance support -* If you use only one instance but want to upgrade from an older ansible-elasticsearch version, follow [upgrade procedure](./docs/multi-instance.md#upgrade-procedure) -* 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 use only one instance but want to upgrade from an older ansible-elasticsearch version, follow [upgrade procedure](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/multi-instance.md#upgrade-procedure) +* 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](https://github.com/elastic/ansible-elasticsearch/blob/master/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). ### Removing the MAX_THREAD settings @@ -75,8 +75,8 @@ The simplest configuration therefore consists of: The above installs Elasticsearch 7.5.1 in a single node 'node1' on the hosts 'localhost'. **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. -While we are testing this role only with one 7.x and one 6.x version (respectively [7.5.1](defaults/main.yml#L2) and [6.8.6](.kitchen.yml#L22) at the time of writing), this role should work with others version also in most cases. +Elasticsearch default version is described in [`es_version`](https://github.com/elastic/ansible-elasticsearch/blob/master/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.5.1](https://github.com/elastic/ansible-elasticsearch/blob/master/defaults/main.yml#L2) and [6.8.6](https://github.com/elastic/ansible-elasticsearch/blob/master/.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. @@ -393,7 +393,7 @@ These can either be set to a user declared in the file based realm, with admin p #### X-Pack Security SSL/TLS -* To configure your cluster with SSL/TLS for HTTP and/or transport communications follow the [SSL/TLS setup procedure](./docs/ssl-tls-setup.md) +* To configure your cluster with SSL/TLS for HTTP and/or transport communications follow the [SSL/TLS setup procedure](https://github.com/elastic/ansible-elasticsearch/blob/master/docs/ssl-tls-setup.md) ### Additional Configuration @@ -459,7 +459,7 @@ Both ```es_user_id``` and ```es_group_id``` must be set for the user and group i * ```es_restart_on_change``` - defaults to true. If false, changes will not result in Elasticsearch being restarted. * ```es_plugins_reinstall``` - defaults to false. If true, all currently installed plugins will be removed from a node. Listed plugins will then be re-installed. -This role ships with sample templates located in the [test/integration/files/templates-7.x](test/integration/files/templates-7.x) directory. `es_templates_fileglob` variable is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path. +This role ships with sample templates located in the [test/integration/files/templates-7.x](https://github.com/elastic/ansible-elasticsearch/tree/master/test/integration/files/templates-7.x) directory. `es_templates_fileglob` variable is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path. ### Proxy From 42e79ea58380a5ed4accaa2d84a9968c39447be5 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Mon, 20 Jan 2020 07:41:16 +0100 Subject: [PATCH 4/8] [ci] bump ruby to 2.5.7 --- .ci/jobs/elastic+ansible-elasticsearch+master.yml | 2 +- .ci/jobs/elastic+ansible-elasticsearch+pull-request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/jobs/elastic+ansible-elasticsearch+master.yml b/.ci/jobs/elastic+ansible-elasticsearch+master.yml index 658b352..6fc50a1 100644 --- a/.ci/jobs/elastic+ansible-elasticsearch+master.yml +++ b/.ci/jobs/elastic+ansible-elasticsearch+master.yml @@ -10,7 +10,7 @@ #!/usr/local/bin/runbld set -euo pipefail - export RBENV_VERSION='2.3.0' + export RBENV_VERSION='2.5.7' export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" rbenv local $RBENV_VERSION diff --git a/.ci/jobs/elastic+ansible-elasticsearch+pull-request.yml b/.ci/jobs/elastic+ansible-elasticsearch+pull-request.yml index 0cb82a6..166c43a 100644 --- a/.ci/jobs/elastic+ansible-elasticsearch+pull-request.yml +++ b/.ci/jobs/elastic+ansible-elasticsearch+pull-request.yml @@ -23,7 +23,7 @@ #!/usr/local/bin/runbld set -euo pipefail - export RBENV_VERSION='2.3.0' + export RBENV_VERSION='2.5.7' export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" rbenv local $RBENV_VERSION From 908d93db914ae88b5d7b32b09262cbd797d5a242 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Jan 2020 15:58:25 +0100 Subject: [PATCH 5/8] fixup! [ci] bump ruby to 2.5.7 --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index 276cbf9..35d16fb 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.0 +2.5.7 From c529d0bf9bfd882e4408a0089d37b837e89c81ca Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Jan 2020 15:59:33 +0100 Subject: [PATCH 6/8] [7.5.2] bump elasticsearch version --- README.md | 14 +++++++------- defaults/main.yml | 2 +- helpers/bumper.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d8e483c..188163d 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@ The latest Elasticsearch versions of 7.x & 6.x are actively tested. ### Removing the MAX_THREAD settings -Ansible-elasticsearch 7.5.1 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). +Ansible-elasticsearch 7.5.2 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.1 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: +Ansible-elasticsearch 7.5.2 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`: @@ -55,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. ```sh -ansible-galaxy install elastic.elasticsearch,7.5.1 +ansible-galaxy install elastic.elasticsearch,7.5.2 ``` Then create your playbook yaml adding the role elasticsearch. @@ -69,14 +69,14 @@ The simplest configuration therefore consists of: roles: - role: elastic.elasticsearch vars: - es_version: 7.5.1 + es_version: 7.5.2 ``` -The above installs Elasticsearch 7.5.1 in a single node 'node1' on the hosts 'localhost'. +The above installs Elasticsearch 7.5.2 in a single node 'node1' on the hosts 'localhost'. **Note**: Elasticsearch default version is described in [`es_version`](https://github.com/elastic/ansible-elasticsearch/blob/master/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.5.1](https://github.com/elastic/ansible-elasticsearch/blob/master/defaults/main.yml#L2) and [6.8.6](https://github.com/elastic/ansible-elasticsearch/blob/master/.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.2](https://github.com/elastic/ansible-elasticsearch/blob/master/defaults/main.yml#L2) and [6.8.6](https://github.com/elastic/ansible-elasticsearch/blob/master/.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. @@ -402,7 +402,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_xpack_trial` Default `false`. Setting this to `true` will start the 30-day trail once the cluster starts. -* ```es_version``` (e.g. "7.5.1"). +* ```es_version``` (e.g. "7.5.2"). * ```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_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin. diff --git a/defaults/main.yml b/defaults/main.yml index dd6601e..72dee2f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -es_version: "7.5.1" +es_version: "7.5.2" es_use_snapshot_release: false es_enable_xpack: true es_package_name: "elasticsearch" diff --git a/helpers/bumper.py b/helpers/bumper.py index 0e9397d..d95c4f7 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -15,12 +15,12 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..')) old_versions = { 6: '6.8.5', - 7: '7.5.0', + 7: '7.5.1', } new_versions = { 6: '6.8.6', - 7: '7.5.1', + 7: '7.5.2', } files = [ From 1dd2407f8196848ee93d84c18bc761d4ac1e5390 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Jan 2020 16:09:48 +0100 Subject: [PATCH 7/8] [7.5.2] update changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da91df8..ceab087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 7.5.2 - 2020/01/21 + +* 7.5.2 as default version + +| PR | Author | Title | +| ---------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------- | +|[#648](https://github.com/elastic/ansible-elasticsearch/pull/648) | [@jmlrt](https://github.com/jmlrt) | add proxy options to ES_JAVA_OPTS when defined with es_proxy_host| +|[#657](https://github.com/elastic/ansible-elasticsearch/pull/657) | [@jakommo](https://github.com/jakommo) | switched relative URLs to absolute URLs | +|[#664](https://github.com/elastic/ansible-elasticsearch/pull/664) | [@jmlrt](https://github.com/jmlrt) | bump ruby to 2.5.7 | + + ## 7.5.1 - 2019/12/18 * 7.5.1 as default version From e299582160ba625af4d8010b9878c9e8037b9d94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2020 19:45:21 +0000 Subject: [PATCH 8/8] Bump rubyzip from 1.2.2 to 2.0.0 Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.2 to 2.0.0. - [Release notes](https://github.com/rubyzip/rubyzip/releases) - [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md) - [Commits](https://github.com/rubyzip/rubyzip/compare/v1.2.2...v2.0.0) Signed-off-by: dependabot[bot] --- Gemfile.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b7d8dcc..0796e48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,11 +2,11 @@ GEM remote: https://rubygems.org/ specs: bcrypt_pbkdf (1.0.1) - builder (3.2.3) + builder (3.2.4) ed25519 (1.2.4) equatable (0.5.0) - erubis (2.7.0) - ffi (1.10.0) + erubi (1.9.0) + ffi (1.12.1) gssapi (1.3.0) ffi (>= 1.0.1) gyoku (1.3.1) @@ -32,7 +32,7 @@ GEM thor mixlib-shellout (2.4.4) mixlib-versioning (1.2.7) - multi_json (1.13.1) + multi_json (1.14.1) necromancer (0.4.0) net-scp (2.0.0) net-ssh (>= 2.6.5, < 6.0.0) @@ -44,7 +44,7 @@ GEM equatable (~> 0.5.0) tty-color (~> 0.4.0) rubyntlm (0.6.2) - rubyzip (1.2.2) + rubyzip (2.0.0) strings (0.1.5) strings-ansi (~> 0.1) unicode-display_width (~> 1.5) @@ -85,9 +85,9 @@ GEM tty-screen (0.6.5) unicode-display_width (1.6.0) unicode_utils (1.4.0) - winrm (2.3.2) + winrm (2.3.4) builder (>= 2.1.2) - erubis (~> 2.7) + erubi (~> 1.8) gssapi (~> 1.2) gyoku (~> 1.0) httpclient (~> 2.2, >= 2.2.0.2) @@ -97,10 +97,10 @@ GEM winrm-elevated (1.1.1) winrm (~> 2.0) winrm-fs (~> 1.0) - winrm-fs (1.3.2) - erubis (~> 2.7) + winrm-fs (1.3.4) + erubi (~> 1.8) logging (>= 1.6.1, < 3.0) - rubyzip (~> 1.1) + rubyzip (~> 2.0) winrm (~> 2.0) wisper (2.0.0)