Created
November 1, 2013 07:57
-
-
Save MinCha/7262149 to your computer and use it in GitHub Desktop.
start ElasticSearch multiple instances
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip="`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`" | |
for ((i=0; i<$1; i++)); do | |
hport=$(expr 21000 + $i) | |
tport=$(expr 22000 + $i) | |
name=$ip+$i | |
../bin/elasticsearch -Des.cluster.name=music-es-dev -Des.multicast.enabled=true -Des.http.port=$hport -Des.transport.tcp.port=$tport -Des.index.number_of_shards=10 -Des.index.number_of_replicas=4 -Des.node.name=$name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment