forked from ViaQ/docker-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·30 lines (26 loc) · 997 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -ex
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
case ${ES_VER:-1.5.2} in
1.*) DISABLEREPO="--disablerepo elasticsearch-2.x" ;;
esac
yum install -y --setopt=tsflags=nodocs $DISABLEREPO \
java-1.8.0-openjdk-headless \
elasticsearch
yum clean all
# need these so elasticsearch doesn't reject its config while installing plugins
export SERVICE_DNS=placeholder
export CLUSTER_NAME=placeholder
mkdir -p ${HOME}
ln -s /usr/share/elasticsearch /usr/share/java/elasticsearch
if [ -n "$USE_SEARCHGUARD" ] ; then
/usr/share/elasticsearch/bin/plugin -i com.floragunn/search-guard/0.5
fi
if [ -n "$USE_OPENSHIFT_PLUGIN" ] ; then
/usr/share/elasticsearch/bin/plugin -i io.fabric8.elasticsearch/openshift-elasticsearch-plugin/0.6
fi
if [ -n "$USE_KUBERNETES_PLUGIN" ] ; then
/usr/share/elasticsearch/bin/plugin -i io.fabric8/elasticsearch-cloud-kubernetes/1.3.0
fi
mkdir /elasticsearch
chmod -R og+w /usr/share/java/elasticsearch ${HOME} /elasticsearch