-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update CrateDB to version 2.3.4 #4101
Conversation
Diff:diff --git a/_bashbrew-list b/_bashbrew-list
index a6381d2..77483dd 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -5,5 +5,5 @@ crate:2.1.10
crate:2.2
crate:2.2.7
crate:2.3
-crate:2.3.3
+crate:2.3.4
crate:latest
diff --git a/crate_latest/Dockerfile b/crate_latest/Dockerfile
index cf0e4a2..6820c1d 100644
--- a/crate_latest/Dockerfile
+++ b/crate_latest/Dockerfile
@@ -27,13 +27,13 @@ RUN set -x \
RUN addgroup crate && adduser -G crate -H crate -D
# install crate
-ENV CRATE_VERSION 2.3.3
+ENV CRATE_VERSION 2.3.4
RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -52,6 +52,12 @@ ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD eval "curl $(hostname):4200"
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
diff --git a/crate_latest/Dockerfile.template b/crate_latest/Dockerfile.template
index 449ba0a..22a9aad 100644
--- a/crate_latest/Dockerfile.template
+++ b/crate_latest/Dockerfile.template
@@ -32,9 +32,8 @@ RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- sigar \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -47,13 +46,18 @@ RUN apk add --no-cache --virtual .crate-rundeps \
&& tar -xf crate-$CRATE_VERSION.tar.gz -C /crate --strip-components=1 \
&& rm crate-$CRATE_VERSION.tar.gz \
&& ln -s /usr/bin/python3 /usr/bin/python \
- && rm /crate/lib/sigar/libsigar-amd64-linux.so \
&& apk del .build-deps
ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD eval "curl $(hostname):4200"
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
diff --git a/crate_latest/Dockerfile_2.3.template b/crate_latest/Dockerfile_3.0.template
similarity index 87%
rename from crate_latest/Dockerfile_2.3.template
rename to crate_latest/Dockerfile_3.0.template
index 4215c11..fafb1c6 100644
--- a/crate_latest/Dockerfile_2.3.template
+++ b/crate_latest/Dockerfile_3.0.template
@@ -32,8 +32,8 @@ RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -52,11 +52,17 @@ ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD eval "curl $(hostname):4200"
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
ADD config/log4j2.properties /crate/config/log4j2.properties
-COPY docker-entrypoint.sh /
+COPY entrypoint_3.0.sh /docker-entrypoint.sh
WORKDIR /data
diff --git a/crate_latest/docker-entrypoint.sh b/crate_latest/docker-entrypoint.sh
index 3654832..9058bc0 100755
--- a/crate_latest/docker-entrypoint.sh
+++ b/crate_latest/docker-entrypoint.sh
@@ -2,6 +2,7 @@
set -ae
+# Special VM options for Java in Docker
CRATE_JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Des.cgroups.hierarchy.override=/ $CRATE_JAVA_OPTS"
if [ "${1:0:1}" = '-' ]; then
diff --git a/crate_latest/docker-entrypoint.sh b/crate_latest/entrypoint_3.0.sh
similarity index 68%
copy from crate_latest/docker-entrypoint.sh
copy to crate_latest/entrypoint_3.0.sh
index 3654832..062dea5 100755
--- a/crate_latest/docker-entrypoint.sh
+++ b/crate_latest/entrypoint_3.0.sh
@@ -2,6 +2,10 @@
set -ae
+# GC logging set to default value of path.logs
+CRATE_GC_LOG_DIR="/data/log"
+CRATE_HEAP_DUMP_PATH="/data/data"
+# Special VM options for Java in Docker
CRATE_JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Des.cgroups.hierarchy.override=/ $CRATE_JAVA_OPTS"
if [ "${1:0:1}" = '-' ]; then |
Sorry, forgot to post my reply earlier. On On the specific |
@yosifkit yes, the eval should be dropped and we will from the template as well. Regarding the hostname, we are using that as we don't bind to localhost/127.0.0.1 for security reasons. |
@yosifkit Regarding the |
@yosifkit PR updated, |
Diff:diff --git a/_bashbrew-list b/_bashbrew-list
index a6381d2..77483dd 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -5,5 +5,5 @@ crate:2.1.10
crate:2.2
crate:2.2.7
crate:2.3
-crate:2.3.3
+crate:2.3.4
crate:latest
diff --git a/crate_latest/Dockerfile b/crate_latest/Dockerfile
index cf0e4a2..ca1d55d 100644
--- a/crate_latest/Dockerfile
+++ b/crate_latest/Dockerfile
@@ -27,13 +27,13 @@ RUN set -x \
RUN addgroup crate && adduser -G crate -H crate -D
# install crate
-ENV CRATE_VERSION 2.3.3
+ENV CRATE_VERSION 2.3.4
RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -52,6 +52,12 @@ ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD curl $(hostname):4200
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
diff --git a/crate_latest/Dockerfile.template b/crate_latest/Dockerfile.template
index 449ba0a..4fa2b03 100644
--- a/crate_latest/Dockerfile.template
+++ b/crate_latest/Dockerfile.template
@@ -32,9 +32,8 @@ RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- sigar \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -47,13 +46,18 @@ RUN apk add --no-cache --virtual .crate-rundeps \
&& tar -xf crate-$CRATE_VERSION.tar.gz -C /crate --strip-components=1 \
&& rm crate-$CRATE_VERSION.tar.gz \
&& ln -s /usr/bin/python3 /usr/bin/python \
- && rm /crate/lib/sigar/libsigar-amd64-linux.so \
&& apk del .build-deps
ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD curl $(hostname):4200
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
diff --git a/crate_latest/Dockerfile_2.3.template b/crate_latest/Dockerfile_3.0.template
similarity index 87%
rename from crate_latest/Dockerfile_2.3.template
rename to crate_latest/Dockerfile_3.0.template
index 4215c11..1c5da00 100644
--- a/crate_latest/Dockerfile_2.3.template
+++ b/crate_latest/Dockerfile_3.0.template
@@ -32,8 +32,8 @@ RUN apk add --no-cache --virtual .crate-rundeps \
openjdk8-jre-base \
python3 \
openssl \
- && apk add --no-cache --virtual .build-deps \
curl \
+ && apk add --no-cache --virtual .build-deps \
gnupg \
tar \
&& curl -fSL -O https://cdn.crate.io/downloads/releases/crate-$CRATE_VERSION.tar.gz \
@@ -52,11 +52,17 @@ ENV PATH /crate/bin:$PATH
# Default heap size for Docker, can be overwritten by args
ENV CRATE_HEAP_SIZE 512M
+# This healthcheck indicates if a CrateDB node is up and running. It will fail
+# if we cannot get any response from the CrateDB (connection refused, timeout
+# etc). If any response is received (regardless of http status code) we
+# consider the node as running.
+HEALTHCHECK CMD curl $(hostname):4200
+
VOLUME ["/data"]
ADD config/crate.yml /crate/config/crate.yml
ADD config/log4j2.properties /crate/config/log4j2.properties
-COPY docker-entrypoint.sh /
+COPY entrypoint_3.0.sh /docker-entrypoint.sh
WORKDIR /data
diff --git a/crate_latest/docker-entrypoint.sh b/crate_latest/docker-entrypoint.sh
index 3654832..9058bc0 100755
--- a/crate_latest/docker-entrypoint.sh
+++ b/crate_latest/docker-entrypoint.sh
@@ -2,6 +2,7 @@
set -ae
+# Special VM options for Java in Docker
CRATE_JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Des.cgroups.hierarchy.override=/ $CRATE_JAVA_OPTS"
if [ "${1:0:1}" = '-' ]; then
diff --git a/crate_latest/docker-entrypoint.sh b/crate_latest/entrypoint_3.0.sh
similarity index 68%
copy from crate_latest/docker-entrypoint.sh
copy to crate_latest/entrypoint_3.0.sh
index 3654832..062dea5 100755
--- a/crate_latest/docker-entrypoint.sh
+++ b/crate_latest/entrypoint_3.0.sh
@@ -2,6 +2,10 @@
set -ae
+# GC logging set to default value of path.logs
+CRATE_GC_LOG_DIR="/data/log"
+CRATE_HEAP_DUMP_PATH="/data/data"
+# Special VM options for Java in Docker
CRATE_JAVA_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Des.cgroups.hierarchy.override=/ $CRATE_JAVA_OPTS"
if [ "${1:0:1}" = '-' ]; then |
Build test of #4101; c6b3147; $ bashbrew build crate:2.3.4
Building bashbrew/cache:695abd6d958d2d13e8f182acd7a0b7b2fd2acb17c0fa5cb56adf6635d4d27223 (crate:2.3.4)
Tagging crate:2.3.4
Tagging crate:2.3
Tagging crate:latest
$ test/run.sh crate:2.3.4
testing crate:2.3.4
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build crate:2.2.7
Using bashbrew/cache:d795065dc20025ed22bbd5208aaaf89ee338db2181cde78d293ed895a6c35460 (crate:2.2.7)
Tagging crate:2.2.7
Tagging crate:2.2
$ test/run.sh crate:2.2.7
testing crate:2.2.7
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build crate:2.1.10
Using bashbrew/cache:33e3ad1f0539760b647d7d37ff8710cbc993b4ef0485ea8be49d6488c6b74e41 (crate:2.1.10)
Tagging crate:2.1.10
Tagging crate:2.1
$ test/run.sh crate:2.1.10
testing crate:2.1.10
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build crate:2.0.7
Using bashbrew/cache:29ee824479fdba930053f59fc94cf94b9e94f1149a8947970706ef06bf9f9302 (crate:2.0.7)
Tagging crate:2.0.7
Tagging crate:2.0
$ test/run.sh crate:2.0.7
testing crate:2.0.7
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
|
@yosifkit thank you! |
No description provided.