Skip to content

Commit

Permalink
Merge pull request #1886 from amazeeio/1877-add-es-curl-baseimages
Browse files Browse the repository at this point in the history
Moved es-curl to elasticsearch base images
  • Loading branch information
Schnitzel committed May 28, 2020
2 parents c46bf07 + 13625ba commit bedba05
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 15 deletions.
3 changes: 3 additions & 0 deletions images/elasticsearch/Dockerfile6
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ENV ES_JAVA_OPTS="-Xms200m -Xmx200m" \
DISCOVERY_ZEN_MINIMUM_MASTER_NODES=1 \
NODE_MASTER=true

# Copy es-curl wrapper
COPY es-curl /usr/share/elasticsearch/bin/es-curl

VOLUME [ "/usr/share/elasticsearch/data" ]

ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash"]
Expand Down
3 changes: 3 additions & 0 deletions images/elasticsearch/Dockerfile7
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ ENV ES_JAVA_OPTS="-Xms400m -Xmx400m" \
CLUSTER_REMOTE_CONNECT=true \
EXTRA_OPTS=""

# Copy es-curl wrapper
COPY es-curl /usr/share/elasticsearch/bin/es-curl


VOLUME [ "/usr/share/elasticsearch/data" ]

Expand Down
18 changes: 18 additions & 0 deletions images/elasticsearch/es-curl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: es-curl.sh VERB COMMAND"
exit 1
fi

VERB=$1
COMMAND=$2

shift
shift

if [ "$LOGSDB_ADMIN_PASSWORD" ]; then
curl -X $VERB -k -u "admin:$LOGSDB_ADMIN_PASSWORD" "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@"
else
curl -X $VERB -k "http://localhost:9200/$COMMAND" -H 'Content-Type: application/json' "$@"
fi
1 change: 0 additions & 1 deletion services/logs-db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ RUN fix-permissions plugins/opendistro_security/securityconfig
COPY entrypoints/80-keycloak-url.bash /lagoon/entrypoints/

COPY start.sh /start.sh
COPY es-curl /usr/share/elasticsearch/bin/es-curl

CMD ["/start.sh"]
14 changes: 0 additions & 14 deletions services/logs-db/es-curl

This file was deleted.

0 comments on commit bedba05

Please sign in to comment.