Skip to content

Instantly share code, notes, and snippets.

@iamhowardtheduck
Created July 25, 2020 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamhowardtheduck/682a2ca95b272282425f88739a918f53 to your computer and use it in GitHub Desktop.
Save iamhowardtheduck/682a2ca95b272282425f88739a918f53 to your computer and use it in GitHub Desktop.
tarClusterBuild.sh
sudo yum install -y perl-Digest-SHA wget unzip
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-darwin-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-darwin-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.8.0-darwin-x86_64.tar.gz.sha512
tar -xzf elasticsearch-7.8.0-darwin-x86_64.tar.gz
mv elasticsearch-7.8.0/config/elasticsearch.yml elasticsearch-7.8.0/config/elasticsearch.yml.backup
touch elasticsearch-7.8.0/config/elasticsearch.yml
echo "Please input the IP address found below:"
echo ""
ip a
echo ""
read IPaddress
echo ""
echo ""
echo "Pleae input the hostname found below:"
echo ""
hostname -f
echo ""
read hostnameF
echo ""
echo ""
echo "What would you like to call you Cluster?"
echo ""
read clusterName
echo ""
echo ""
echo "What would you like to call this specific node?"
echo ""
read nodeName
echo ""
echo ""
echo "What directory would you like to store index shard data in?"
echo ""
read pathData
echo ""
echo ""
echo "What directory would you like to store logs in?"
echo ""
read pathLog
echo ""
echo ""
echo "What directory would you like to store snapshots in? If adding a node, this folder must be shareable and remote mountable"
echo ""
read pathSnapshots
echo ""
echo ..."
# X-Pack Settings
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.key: /etc/elasticsearch/Elastic-01.key
xpack.security.transport.ssl.certificate: /etc/elasticsearch/Elastic-01.crt
xpack.security.transport.ssl.certificate_authorities: [ "/etc/elasticsearch/ca.crt" ]
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: /etc/elasticsearch/Elastic-01.key
xpack.security.http.ssl.certificate: /etc/elasticsearch/Elastic-01.crt
xpack.security.http.ssl.certificate_authorities: [ "/etc/elasticsearch/ca.crt" ]
xpack.monitoring.collection.enabled: true
# Node Settings
node.master: true
node.data: true
node.ingest: true
node.ml: true
node.name: Elastic-01
node.attr.data: Hot
# Cluster Settings
cluster.name: 5-Eyes
cluster.routing.allocation.awareness.attributes: data # This will move your indices from hot to warm etc... when configured.
# Path Settings
path.data: /var/lib/elasticsearch # Index data will be stored here
path.logs: /var/log/elasticsearch # Log will be written here
path.repo: ["/mnt/ELASTIC-SNAPSHOTS/"] # Snapshots will be stored here
# Memory Settings:
bootstrap.memory_lock: true
# Network Settings:
network.host: 0.0.0.0
http.port: 9200
# Discovery Settings:
discovery.seed_hosts: ["10.0.100.1", "10.0.100.2", "10.0.100.3"] # Master nodes will go here
cluster.initial_master_nodes: ["10.0.100.1"] # Only needed during initial install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment