Created
April 8, 2013 12:13
-
-
Save spinscale/5336359 to your computer and use it in GitHub Desktop.
Create an elasticsearch specific versioned instance quickly
This file contains hidden or 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 | |
set -e | |
if [ "x$1" == "x-h" ] ; then | |
echo "Usage: $0 version destdir plugins" | |
exit | |
fi | |
CURRENT="0.90.0.RC1" | |
VERSION=${1:-$CURRENT} | |
DEFAULT_DESTDIR=~/devel/elasticsearch-installations | |
DESTDIR=${2:-$DEFAULT_DESTDIR} | |
DEFAULT_PLUGINS="lukas-vlcek/bigdesk karmi/elasticsearch-paramedic mobz/elasticsearch-head polyfractal/elasticsearch-inquisitor polyfractal/elasticsearch-segmentspy" | |
PLUGINS=${3:-$DEFAULT_PLUGINS} | |
echo "Installing elasticsearch $VERSION into $DESTDIR with plugins $PLUGINS" | |
cd $DESTDIR | |
FILE="elasticsearch-$VERSION.zip" | |
DIR="elasticsearch-$VERSION" | |
if [ -e $DIR ] ; then | |
echo "You have already installed elasticsearch $VERSION in $DESTDIR - exiting" | |
exit | |
fi | |
if [ ! -e $FILE ] ; then | |
wget --no-check-certificate https://download.elasticsearch.org/elasticsearch/elasticsearch/$FILE | |
fi | |
unzip $FILE | |
cd $DIR | |
for plugin in $PLUGINS ; do | |
bin/plugin -install $plugin | |
done | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment