Switch to OSS images and delete XPACK

This commit is contained in:
Manuel Gutierrez
2020-01-22 17:13:50 +01:00
parent 61a1385462
commit 0bee9836d4
10 changed files with 10 additions and 113 deletions
-21
View File
@@ -20,27 +20,6 @@ run_as_other_user_if_needed() {
}
#Disabling xpack features
elasticsearch_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
if grep -Fq "#xpack features" "$elasticsearch_config_file";
then
declare -A CONFIG_MAP=(
[xpack.ml.enabled]=$XPACK_ML
)
for i in "${!CONFIG_MAP[@]}"
do
if [ "${CONFIG_MAP[$i]}" != "" ]; then
sed -i 's/.'"$i"'.*/'"$i"': '"${CONFIG_MAP[$i]}"'/' $elasticsearch_config_file
fi
done
else
echo "
#xpack features
xpack.ml.enabled: $XPACK_ML
" >> $elasticsearch_config_file
fi
# Run load settings script.
./config_cluster.sh
+1 -16
View File
@@ -6,13 +6,7 @@ set -e
el_url=${ELASTICSEARCH_URL}
if [[ ${ENABLED_XPACK} != "true" || "x${ELASTICSEARCH_USERNAME}" = "x" || "x${ELASTICSEARCH_PASSWORD}" = "x" ]]; then
auth=""
else
auth="--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"
fi
until curl ${auth} -XGET $el_url; do
until curl -XGET $el_url; do
>&2 echo "Elastic is unavailable - sleeping"
sleep 5
done
@@ -39,14 +33,6 @@ if [ $ENABLE_CONFIGURE_S3 ]; then
fi
curl -XPUT "$el_url/_cluster/settings" ${auth} -H 'Content-Type: application/json' -d'
{
"persistent": {
"xpack.monitoring.collection.enabled": true
}
}
'
# Set cluster delayed timeout when node falls
curl -X PUT "$el_url/_all/_settings" -H 'Content-Type: application/json' -d'
{
@@ -56,5 +42,4 @@ curl -X PUT "$el_url/_all/_settings" -H 'Content-Type: application/json' -d'
}
'
echo "Elasticsearch is ready."