You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ij...@apache.org on 2017/11/21 14:41:07 UTC
kafka git commit: KAFKA-6247;
Install Kibosh on Vagrant and fix release downloads in Docker
Repository: kafka
Updated Branches:
refs/heads/trunk f0276f5ca -> a133e69b4
KAFKA-6247; Install Kibosh on Vagrant and fix release downloads in Docker
Fix an omission where Kibosh was not getting installed on Vagrant
instances running in AWS.
Fix an issue where the Dockerfile was unable to download old Apache
Kafka releases. See the discussion on KAFKA-6233.
Author: Colin P. Mccabe <cm...@confluent.io>
Reviewers: Ismael Juma <is...@juma.me.uk>
Closes #4240 from cmccabe/KAFKA-6247
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/a133e69b
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/a133e69b
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/a133e69b
Branch: refs/heads/trunk
Commit: a133e69b458cae25f997680e577a930c06961ecb
Parents: f0276f5
Author: Colin P. Mccabe <cm...@confluent.io>
Authored: Tue Nov 21 14:39:11 2017 +0000
Committer: Ismael Juma <is...@juma.me.uk>
Committed: Tue Nov 21 14:39:14 2017 +0000
----------------------------------------------------------------------
tests/docker/Dockerfile | 21 ++++++++++++---------
tests/kafkatest/services/trogdor/kibosh.py | 1 +
vagrant/base.sh | 17 +++++++++++++++++
3 files changed, 30 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/a133e69b/tests/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile
index d855fe4..149e391 100644
--- a/tests/docker/Dockerfile
+++ b/tests/docker/Dockerfile
@@ -17,7 +17,6 @@ FROM openjdk:8
MAINTAINER Apache Kafka dev@kafka.apache.org
VOLUME ["/opt/kafka-dev"]
-ENV MIRROR="http://mirror.olnevhost.net/pub/apache/"
# Set the timezone.
ENV TZ="/usr/share/zoneinfo/America/Los_Angeles"
@@ -40,17 +39,21 @@ COPY ./ssh-config /root/.ssh/config
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && cp -f /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
# Install binary test dependencies.
-ENV MIRROR="http://mirrors.ocf.berkeley.edu/apache/"
-RUN mkdir -p "/opt/kafka-0.8.2.2" && curl -s "${MIRROR}kafka/0.8.2.2/kafka_2.10-0.8.2.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.8.2.2"
-RUN mkdir -p "/opt/kafka-0.9.0.1" && curl -s "${MIRROR}kafka/0.9.0.1/kafka_2.11-0.9.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.9.0.1"
-RUN mkdir -p "/opt/kafka-0.10.0.1" && curl -s "${MIRROR}kafka/0.10.0.1/kafka_2.11-0.10.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.0.1"
-RUN mkdir -p "/opt/kafka-0.10.1.1" && curl -s "${MIRROR}kafka/0.10.1.1/kafka_2.11-0.10.1.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.1.1"
-RUN mkdir -p "/opt/kafka-0.10.2.1" && curl -s "${MIRROR}kafka/0.10.2.1/kafka_2.11-0.10.2.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.2.1"
-RUN mkdir -p "/opt/kafka-0.11.0.0" && curl -s "${MIRROR}kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.11.0.0"
+ARG KAFKA_MIRROR="https://s3-us-west-2.amazonaws.com/kafka-packages"
+RUN mkdir -p "/opt/kafka-0.8.2.2" && curl -s "$KAFKA_MIRROR/kafka_2.10-0.8.2.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.8.2.2"
+RUN mkdir -p "/opt/kafka-0.9.0.1" && curl -s "$KAFKA_MIRROR/kafka_2.11-0.9.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.9.0.1"
+RUN mkdir -p "/opt/kafka-0.10.0.1" && curl -s "$KAFKA_MIRROR/kafka_2.11-0.10.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.0.1"
+RUN mkdir -p "/opt/kafka-0.10.1.1" && curl -s "$KAFKA_MIRROR/kafka_2.11-0.10.1.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.1.1"
+RUN mkdir -p "/opt/kafka-0.10.2.1" && curl -s "$KAFKA_MIRROR/kafka_2.11-0.10.2.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.10.2.1"
+RUN mkdir -p "/opt/kafka-0.11.0.0" && curl -s "$KAFKA_MIRROR/kafka_2.11-0.11.0.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-0.11.0.0"
+
+# The version of Kibosh to use for testing.
+# If you update this, also update vagrant/base.sy
+ARG KIBOSH_VERSION="d85ac3ec44be0700efe605c16289fd901cfdaa13"
# Install Kibosh
RUN apt-get install fuse
-RUN cd /opt && git clone -q https://github.com/confluentinc/kibosh.git && cd "/opt/kibosh" && git reset --hard 399de967c5520e8fe6e32d4e5c1c55d71cd7f46c && mkdir "/opt/kibosh/build" && cd "/opt/kibosh/build" && ../configure && make -j 2
+RUN cd /opt && git clone -q https://github.com/confluentinc/kibosh.git && cd "/opt/kibosh" && git reset --hard $KIBOSH_VERSION && mkdir "/opt/kibosh/build" && cd "/opt/kibosh/build" && ../configure && make -j 2
# Set up the ducker user.
RUN useradd -ms /bin/bash ducker && mkdir -p /home/ducker/ && rsync -aiq /root/.ssh/ /home/ducker/.ssh && chown -R ducker /home/ducker/ /mnt/ && echo 'ducker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
http://git-wip-us.apache.org/repos/asf/kafka/blob/a133e69b/tests/kafkatest/services/trogdor/kibosh.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/trogdor/kibosh.py b/tests/kafkatest/services/trogdor/kibosh.py
index 1bd4224..de4e5e6 100644
--- a/tests/kafkatest/services/trogdor/kibosh.py
+++ b/tests/kafkatest/services/trogdor/kibosh.py
@@ -84,6 +84,7 @@ class KiboshService(Service):
cmd += " --target %s" % self.target
cmd += " --pidfile %s" % self.pidfile_path
cmd += " --log %s" % self.log_path
+ cmd += " --control-mode 666"
cmd += " --verbose"
cmd += " %s" % self.mirror
cmd += " &> %s" % self.stdout_stderr_path
http://git-wip-us.apache.org/repos/asf/kafka/blob/a133e69b/vagrant/base.sh
----------------------------------------------------------------------
diff --git a/vagrant/base.sh b/vagrant/base.sh
index 2ebebf9..4b55406 100755
--- a/vagrant/base.sh
+++ b/vagrant/base.sh
@@ -16,6 +16,10 @@
set -ex
+# The version of Kibosh to use for testing.
+# If you update this, also update tests/docker/Dockerfile
+export KIBOSH_VERSION=d85ac3ec44be0700efe605c16289fd901cfdaa13
+
if [ -z `which javac` ]; then
apt-get -y update
apt-get install -y software-properties-common python-software-properties
@@ -82,6 +86,19 @@ get_kafka() {
fi
}
+# Install Kibosh
+apt-get update -y && apt-get install -y git cmake pkg-config libfuse-dev
+pushd /opt
+git clone -q https://github.com/confluentinc/kibosh.git
+pushd "/opt/kibosh"
+git reset --hard $KIBOSH_VERSION
+mkdir "/opt/kibosh/build"
+pushd "/opt/kibosh/build"
+../configure && make -j 2
+popd
+popd
+popd
+
# Test multiple Scala versions
get_kafka 0.8.2.2 2.10
chmod a+rw /opt/kafka-0.8.2.2