Skip to content
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

Examples: fixed cassandra mirror detection that assumes an FTP site will always be presented #45965

Merged
merged 1 commit into from
May 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 15 additions & 14 deletions examples/storage/cassandra/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/google_containers/ubuntu-slim:0.6
FROM gcr.io/google_containers/ubuntu-slim:0.9

ARG BUILD_DATE
ARG VCS_REF
Expand Down Expand Up @@ -42,12 +42,12 @@ ADD files /

RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get update && apt-get -qq -y --force-yes install --no-install-recommends \
openjdk-8-jre-headless \
libjemalloc1 \
localepurge \
wget && \
openjdk-8-jre-headless \
libjemalloc1 \
localepurge \
wget && \
mirror_url=$( wget -q -O - http://www.apache.org/dyn/closer.cgi/cassandra/ \
| sed -n 's#.*href="\(http://ftp.[^"]*\)".*#\1#p' \
| sed -n 's#.*href="\(http://.*/cassandra\/[^"]*\)".*#\1#p' \
| head -n 1 \
) \
&& wget -q -O - ${mirror_url}/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz \
Expand All @@ -64,7 +64,7 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
&& chown cassandra: /ready-probe.sh \
&& if [ -n "$DEV_CONTAINER" ]; then apt-get -y --no-install-recommends install python; else rm -rf $CASSANDRA_HOME/pylib; fi \
&& apt-get -y purge wget localepurge \
&& apt-get autoremove \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf \
$CASSANDRA_HOME/*.txt \
Expand All @@ -73,12 +73,12 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
$CASSANDRA_HOME/tools/*.yaml \
$CASSANDRA_HOME/tools/bin/*.bat \
$CASSANDRA_HOME/bin/*.bat \
doc \
man \
info \
locale \
common-licenses \
~/.bashrc \
doc \
man \
info \
locale \
common-licenses \
~/.bashrc \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
Expand Down Expand Up @@ -116,7 +116,8 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar \
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/oblique-fonts \
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/plugin.jar \
/usr/lib/jvm/java-8-openjdk-amd64/man
/usr/lib/jvm/java-8-openjdk-amd64/man


VOLUME ["/$CASSANDRA_DATA"]

Expand Down
3 changes: 2 additions & 1 deletion examples/storage/cassandra/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
VERSION=v12
PROJECT_ID?=google_samples
PROJECT=gcr.io/${PROJECT_ID}
CASSANDRA_VERSION=3.9
CASSANDRA_VERSION=3.10

all: kubernetes-cassandra.jar build

Expand All @@ -26,6 +26,7 @@ kubernetes-cassandra.jar: ../java/* ../java/src/main/java/io/k8s/cassandra/*.jav
cd ../java && mvn clean

container:
@echo "Building ${PROJECT}/cassandra:${VERSION}"
docker build --pull --build-arg "CASSANDRA_VERSION=${CASSANDRA_VERSION}" -t ${PROJECT}/cassandra:${VERSION} .

container-dev:
Expand Down
Binary file modified examples/storage/cassandra/image/files/kubernetes-cassandra.jar
Binary file not shown.