Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

initial 6.x support #397

Closed
wants to merge 2 commits into from
Closed

initial 6.x support #397

wants to merge 2 commits into from

Conversation

remil1000
Copy link

here's an attempt to implement 6.0.0 support

tested with 5.6.4 for backward compatibility and with 6.0.0

Using following playbook.yml

- hosts: elastic1
  become: true
  roles:
    - role: ansible-elasticsearch
      es_instance_name: "default_node"
      es_data_dirs: "/data/elasticsearch/data"
      es_config:
        cluster.name: "test-cluster"
        discovery.zen.ping.unicast.hosts: "{{ groups[es_masters_group] | map('regex_replace', '$', ':9300') | list }}"
        discovery.zen.minimum_master_nodes: 2
        http.port: 9200
        transport.tcp.port: 9300
        node.data: "{{ es_data_node | bool }}"
        node.master: "{{ es_master_node | bool }}"
        bootstrap.memory_lock: false
        # we need to listen on routable interfaces
        # but no vagrant management interface as it is not routable
        # and listening on local interfaces (loopback) is useful for mon/kibana
        network.host: "{{ ansible_all_ipv4_addresses | difference(['10.0.2.15']) | union(['_local_']) }}"
  vars:
    es_major_version: 6.x
    es_version_lock: false
    es_api_port: 9200
    es_version: 6.0.0

and inventory

[elastic1:children]
elastic1_masters
elastic1_datas

[elastic1:vars]
es_masters_group=elastic1_masters

[elastic1_masters]
master[1:2].vagrant.test es_data_node=no es_master_node=yes

[elastic1_datas]
data[1:2].vagrant.test es_data_node=yes es_master_node=no

hope this will help

@remil1000
Copy link
Author

remil1000 commented Nov 15, 2017

CLA signing is in progress, will come back at you when it's done
update: CLA has been signed

@gbolo
Copy link

gbolo commented Nov 17, 2017

well done

@kakoni kakoni mentioned this pull request Dec 4, 2017
@abraxxa
Copy link

abraxxa commented Dec 6, 2017

Can we please get a time frame when this will be merged? Thanks!

@kakoni
Copy link
Contributor

kakoni commented Dec 22, 2017

  1. templates/elasticsearch.j2 needs some addons, it needs to have
    ES_PATH_CONF={{conf_dir}}

  2. init/redhat/elasticsearch.j2 daemon has -Edefault.path.logs .. opts, need to be removed for 6.x

  * init scripts
  * default / sysconfig default_files
@shribigb
Copy link
Contributor

I am testing your pull request with x-pack enabled. It fails to install x-pack. It requires ES_PATH_CONF to be set in environment.
Additional changes:
tasks/xpack/elasticsearch-xpack-install.yml
Add following for all the tasks where environment is set.
ES_PATH_CONF: "{{ conf_dir }}"

@kjkurtz
Copy link

kjkurtz commented Dec 28, 2017

ES_PATH_CONF also needs to be added to elasticsearch-plugins.yml where environment is used. I'm doing an upgrade from 5.6.x to 6.1.x and when I tell it to reinstall plugins, it fails to run the task 'Remove elasticsearch plugins' without it.

@rahulwa
Copy link

rahulwa commented Jan 2, 2018

As @kjakman mentioned, we need to export ES_PATH_CONF={{ conf_dir }} while installing and removing plugins.

@cyrilleverrier
Copy link
Contributor

Add this patch: remil1000#1

@jmataa
Copy link

jmataa commented Jan 18, 2018

FYI: Additional ES_PATH_CONF updates are here for 6.1.x as stated by kjkurtz:

https://github.com/andyshinn/ansible-elasticsearch/tree/6.x
andyshinn#1

@Crazybus
Copy link
Contributor

Hi @remil1000!

For the last few months this playbook hasn't had an active maintainer. I'm now stepping up to take ownership of this playbook with the immediate goal of getting 6.x support tested and working.

Unfortunately there were already three open pull requests with varying levels of 6.x support. This meant I had the hard job of picking the pull request which appeared to be the most complete and start fixing up the tests to run on 5.x and 6.x. This PR ended up being #408 because it also contained documentation updates. I have just opened PR: #412 where I am fixing up all the tests to make sure they are passing for 5.x and 6.x across all platforms.

I have also added some pull request automated testing to make it easier to contribute in the future.

So thank you so much for your contribution and I hope to see more contributions again from you in the future.

Cheers,

Michael

@Crazybus Crazybus closed this Jan 31, 2018
@abraxxa
Copy link

abraxxa commented Jan 31, 2018

Thanks @Crazybus!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants