Skip to content

Commit

Permalink
Bake in yq dependency in Kraken container images (#450)
Browse files Browse the repository at this point in the history
This commit also updates ppc64le image to have the latest bits.
  • Loading branch information
chaitanyaenr authored Jul 20, 2023
1 parent e4e4620 commit b4d235d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
5 changes: 2 additions & 3 deletions containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Dockerfile for kraken

FROM quay.io/openshift/origin-tests:latest as origintests

FROM mcr.microsoft.com/azure-cli:latest as azure-cli

FROM registry.access.redhat.com/ubi8/ubi:latest
Expand All @@ -18,7 +16,8 @@ RUN yum install -y git python39 python3-pip jq gettext wget && \
python3.9 -m pip install -U pip && \
git clone https://github.com/redhat-chaos/krkn.git --branch v1.3.4 /root/kraken && \
mkdir -p /root/.kube && cd /root/kraken && \
pip3.9 install -r requirements.txt
pip3.9 install -r requirements.txt && \
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq

# Get Kubernetes and OpenShift clients from stable releases
WORKDIR /tmp
Expand Down
29 changes: 16 additions & 13 deletions containers/Dockerfile-ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@

FROM ppc64le/centos:8

MAINTAINER Red Hat OpenShift Performance and Scale
FROM mcr.microsoft.com/azure-cli:latest as azure-cli

ENV KUBECONFIG /root/.kube/config
LABEL org.opencontainers.image.authors="Red Hat OpenShift Chaos Engineering"

RUN curl -L -o kubernetes-client-linux-ppc64le.tar.gz https://dl.k8s.io/v1.19.0/kubernetes-client-linux-ppc64le.tar.gz \
&& tar xf kubernetes-client-linux-ppc64le.tar.gz && mv kubernetes/client/bin/kubectl /usr/bin/ && rm -rf kubernetes-client-linux-ppc64le.tar.gz
ENV KUBECONFIG /root/.kube/config

RUN curl -L -o openshift-client-linux.tar.gz https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/stable/openshift-client-linux.tar.gz \
&& tar xf openshift-client-linux.tar.gz -C /usr/bin && rm -rf openshift-client-linux.tar.gz
# Copy azure client binary from azure-cli image
COPY --from=azure-cli /usr/local/bin/az /usr/bin/az

# Install dependencies
RUN yum install epel-release -y && \
yum install -y git python36 python3-pip gcc libffi-devel python36-devel openssl-devel gcc-c++ make jq gettext && \
git clone https://github.com/redhat-chaos/krkn.git --branch main /root/kraken && \
mkdir -p /root/.kube && cd /root/kraken && \
pip3 install cryptography==3.3.2 && \
pip3 install -r requirements.txt setuptools==40.3.0 urllib3==1.25.4
RUN yum install -y git python39 python3-pip jq gettext wget && \
python3.9 -m pip install -U pip && \
git clone https://github.com/redhat-chaos/krkn.git --branch v1.3.4 /root/kraken && \
mkdir -p /root/.kube && cd /root/kraken && \
pip3.9 install -r requirements.txt && \
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq

# Get Kubernetes and OpenShift clients from stable releases
WORKDIR /tmp
RUN wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz && tar -xvf openshift-client-linux.tar.gz && cp oc /usr/local/bin/oc && cp kubectl /usr/local/bin/kubectl

WORKDIR /root/kraken

ENTRYPOINT python3 run_kraken.py --config=config/config.yaml
ENTRYPOINT python3.9 run_kraken.py --config=config/config.yaml

0 comments on commit b4d235d

Please sign in to comment.