mirror of https://github.com/apache/kafka.git
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 <cmccabe@confluent.io> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes #4240 from cmccabe/KAFKA-6247
This commit is contained in:
parent
f0276f5ca2
commit
a133e69b45
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue