Skip to content

Instantly share code, notes, and snippets.

@Callonski
Created July 19, 2020 08:08
Show Gist options
  • Save Callonski/59412bc793f85d0716e83428abb9df91 to your computer and use it in GitHub Desktop.
Save Callonski/59412bc793f85d0716e83428abb9df91 to your computer and use it in GitHub Desktop.
####### APPEND TO ELASTICSEARCH CONFIGURATION FILE ########
echo "node.name: ${node_name}" >> /etc/elasticsearch/elasticsearch.yml
echo "network.host : 0.0.0.0" >> /etc/elasticsearch/elasticsearch.yml
echo "discovery.seed_hosts:" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_1}" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_2}" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${elastic_host_3}" >> /etc/elasticsearch/elasticsearch.yml
echo "cluster.name: elasticsearch" >> /etc/elasticsearch/elasticsearch.yml
echo "cluster.initial_master_nodes:" >> /etc/elasticsearch/elasticsearch.yml
echo " - ${master_node}" >> /etc/elasticsearch/elasticsearch.yml
@ajaysamant
Copy link

This file creation is triggered by terraform script? Not sure how and who initiates this file creation.

@CalleEngene
Copy link

elasticsearch.yml is created when installing Elasticsearch. These lines are setting the configuration that we need for elasticsearch.
Once we have set all configurations we restart elastic so the config are loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment