Created
June 29, 2015 14:06
-
-
Save strukturedkaos/4bb854e000f2e42727da to your computer and use it in GitHub Desktop.
Elasticsearch Codeship
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
# Sets up elasticsearch in Codeship build | |
set -e | |
CACHED_DOWNLOAD="${HOME}/cache/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz" | |
mkdir -p "${ELASTICSEARCH_DIR}" | |
wget --continue --output-document "${CACHED_DOWNLOAD}" "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz" | |
tar -xaf "${CACHED_DOWNLOAD}" --strip-components=1 --directory "${ELASTICSEARCH_DIR}" | |
echo "http.port: ${ELASTICSEARCH_PORT}" >> ${ELASTICSEARCH_DIR}/config/elasticsearch.yml | |
# Copy elasticsearch scripts to elasticsearch config | |
mkdir ${ELASTICSEARCH_DIR}/config/kevy | |
cp elasticsearch-scripts/*.groovy ${ELASTICSEARCH_DIR}/config/kevy/ | |
# Make sure to use the exact parameters you want for ElasticSearch and give it enough sleep time to properly start up | |
nohup bash -c "${ELASTICSEARCH_DIR}/bin/elasticsearch 2>&1" & | |
sleep "${ELASTICSEARCH_WAIT_TIME}" | |
echo elasticsearch -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment