How to set master node

As far as I know, there are a few different master nodes:

  1. Hadoop master node.
  2. Elastic search master node.

Currently we can use the following syntax in ansible/config/hosts to set hadoop master:

[hadoop_master]
hostname

How do we make a node elastic search master node?

During one of long import jobs on master node, the import failed after some time. This seems to be related to master node change during importing (not sure why this has happened).

I have a couple of questions regarding elastic search master node:

  1. Does index import has to be through master node?
  2. Is it recommended to set elastic search master node? How do we make a node as master node in ansible playbook?

On my cluster, I made the following change manually.

  1. On first node, change /etc/elasticsearch/elasticsearch.yml
    node:
    master: true
    data: false
  2. On other nodes, change /etc/elasticsearch/elasticsearch.yml
    node:
    master: false
    data: true

Thanks,

Brady

Hi Brady,

Were you able to set a master node for your elasticsearch cluster by modifying the elasticsearch.yml file on each of the hosts?

Hi Dusan,

I am able to set first node as master node, and the rest as data nodes. It would be great if this can be supported in Ansible playbook so I don’t have to make this change manually.

Thanks,