From 86fe128b5f134e32e3a110d81452a71cef944139 Mon Sep 17 00:00:00 2001 From: Stanislav Vodetskyi <49661990+stan-confluent@users.noreply.github.com> Date: Fri, 11 Mar 2022 04:17:00 -0800 Subject: [PATCH 1/2] MINOR: unpin ducktape dependency to always use the newest version (#11883) Ensures we always have the latest published ducktape version (compatible with python 2). This way whenever we release a new one, we won't have to cherry pick a bunch of commits across a bunch of branches. --- tests/docker/Dockerfile | 2 +- tests/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 66d1c3876c322..6191d9e7f846c 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -34,7 +34,7 @@ LABEL ducker.creator=$ducker_creator # Update Linux and install necessary utilities. RUN apt update && apt install -y sudo netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python-pip python-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute && apt-get -y clean RUN python -m pip install -U pip==9.0.3; -RUN pip install --upgrade cffi virtualenv pyasn1 boto3 pycrypto pywinrm ipaddress enum34 && pip install --upgrade ducktape==0.7.17 +RUN pip install --upgrade cffi virtualenv pyasn1 boto3 pycrypto pywinrm ipaddress enum34 && pip install --upgrade "ducktape>0.7,<0.8" # Set up ssh COPY ./ssh-config /root/.ssh/config diff --git a/tests/setup.py b/tests/setup.py index 6927710ecc6ad..3d9c82a9c31d6 100644 --- a/tests/setup.py +++ b/tests/setup.py @@ -51,7 +51,7 @@ def run_tests(self): license="apache2.0", packages=find_packages(), include_package_data=True, - install_requires=["ducktape==0.7.17", "requests==2.22.0"], + install_requires=["ducktape>0.7,<0.8", "requests==2.22.0"], tests_require=["pytest", "mock"], cmdclass={'test': PyTest}, ) From e47f9c1342bbc0f63ad980e27c8b978675fcc923 Mon Sep 17 00:00:00 2001 From: Stanislav Vodetskyi Date: Tue, 3 May 2022 19:08:53 -0700 Subject: [PATCH 2/2] fix ducker-ak --- tests/docker/Dockerfile | 11 +++++++++-- tests/docker/ducker-ak | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 6191d9e7f846c..35f10932a3b6d 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG jdk_version=openjdk:8 +ARG jdk_version=openjdk:8-buster FROM $jdk_version MAINTAINER Apache Kafka dev@kafka.apache.org @@ -32,7 +32,11 @@ ARG ducker_creator=default LABEL ducker.creator=$ducker_creator # Update Linux and install necessary utilities. -RUN apt update && apt install -y sudo netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python-pip python-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute && apt-get -y clean +RUN apt update +RUN apt install -y sudo netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute + +# Install python 2 and pip +RUN apt install -y python2.7-dev python-pip RUN python -m pip install -U pip==9.0.3; RUN pip install --upgrade cffi virtualenv pyasn1 boto3 pycrypto pywinrm ipaddress enum34 && pip install --upgrade "ducktape>0.7,<0.8" @@ -84,6 +88,9 @@ ARG KIBOSH_VERSION="8841dd392e6fbf02986e2fb1f1ebf04df344b65a" RUN apt-get install fuse 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 +# clean apt cache +RUN apt-get -y clean + # 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/ /var/log/ && echo "PATH=$(runuser -l ducker -c 'echo $PATH'):$JAVA_HOME/bin" >> /home/ducker/.ssh/environment && echo 'PATH=$PATH:'"$JAVA_HOME/bin" >> /home/ducker/.profile && echo 'ducker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers USER ducker diff --git a/tests/docker/ducker-ak b/tests/docker/ducker-ak index f923de2bbe703..26893eb4457d5 100755 --- a/tests/docker/ducker-ak +++ b/tests/docker/ducker-ak @@ -42,7 +42,8 @@ docker_run_memory_limit="2000m" default_num_nodes=14 # The default OpenJDK base image. -default_jdk="openjdk:8" +# set to debian buster as it's the last one to support python 2 (sigh) +default_jdk="openjdk:8-buster" # The default ducker-ak image name. default_image_name="ducker-ak"