-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from magento-commerce/MCLOUD-8574
MCLOUD-8574: Release Cloud Tools
- Loading branch information
Showing
5 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.10.2 | ||
|
||
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \ | ||
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://mirror.rackspace.com\/centos-vault|g' /etc/yum.repos.d/CentOS-Linux-* && \ | ||
yum -y install zip && \ | ||
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ | ||
yum remove -y zip && \ | ||
yum -y clean all && \ | ||
rm -rf /var/cache | ||
|
||
RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml | ||
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml | ||
RUN bin/elasticsearch-plugin install -b analysis-icu && \ | ||
bin/elasticsearch-plugin install -b analysis-phonetic | ||
|
||
ADD docker-healthcheck.sh /docker-healthcheck.sh | ||
ADD docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 9200 9300 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
if [[ -n "$ES_PLUGINS" ]]; then | ||
echo "Installing plugins: $ES_PLUGNS" | ||
for PLUGIN in $ES_PLUGINS | ||
do | ||
./bin/elasticsearch-plugin install -b "$PLUGIN" | ||
done | ||
fi | ||
|
||
/bin/bash /usr/local/bin/docker-entrypoint.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then | ||
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") | ||
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then | ||
exit 0 | ||
fi | ||
echo >&2 "Unexpected health status: $health" | ||
fi | ||
|
||
exit 1 |
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