Automatic Deployment and setting Index settings


I am trying to understand the relationship between elasticsearch.yml and static settings.

See, I build my clusters with Ansible but have noticed that I am not quite sure how to deal with static settings like shard allocations.

I know:

  • the elasticsearch.yml can set the default shard allocations
  • Static and dynamic settings can be set though a post
  • Index mappings can also set the index settings

I am just trying to figure out the best way to manage this. ( I think I prefer elasticsearch.yml or CUL)

I would prefer settings the indexes shards per node in the elasticsearch.yml as this will be easiest for me to deploy. I thought there was something like .....index-name.shard....=10 but can't find that page anymore (maybe it is gone)

I could do it in the mappings of the index but since people will be developing this outside of the ansible deploy, every time the provide me a new update I would have to edit the file to add the variables and make it in to an ansible template file

Finally I guess I could just issue the CURL requests to make the settings, but not sure if I can send this request to the master, data node or it really doesn't matter as long as it is in the cluster. (oh and host is the static settings stored, I presume they are not updating the elasticseach.yml) but want to make sure.

Some guidance on this subject would be great. Keep in mind, I have to be able to automate the install of new clusters. So the most manageable would be preferred.



You can only set high level defaults in the config file, not per index ones.

Sending requests to the APIs will work irrespective of the node type, think of them as cluster level calls.

I sort of figured the issuing the CURL would be a cluster setting , and i guess the settings are stored in the data directory.

hmm it sounds like managing all the settings by curl is the answer for me, :slight_smile: now to just figure out where in the process of deployment I want to have that done.

As ways thanks Mark!