Updated the ksi repo and moved from virtualenv to uv
Related-PROD: K0RQA-55
Change-Id: Ic7b9c967c2f85634433874c70a286b9b1041fc69
diff --git a/k8s/k0rdent-toolset-full b/k8s/docker-k0rdent-toolset-full
similarity index 95%
rename from k8s/k0rdent-toolset-full
rename to k8s/docker-k0rdent-toolset-full
index ba33ed1..ee2bc56 100644
--- a/k8s/k0rdent-toolset-full
+++ b/k8s/docker-k0rdent-toolset-full
@@ -33,8 +33,11 @@
apt-get install -y python3.12 python3.12-venv python3.12-dev && \
wget -qO /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && \
chmod a+x /usr/bin/yq && \
+ curl -LsSf https://astral.sh/uv/install.sh | sh && \
rm -rf /var/lib/apt/lists/*
+ENV PATH="/root/.local/bin/:$PATH"
+
RUN apt-get update && \
apt-get install curl gpg apt-transport-https --yes && \
curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null && \
@@ -61,10 +64,9 @@
RUN cp /opt/res-files/k8s/sanity-checks/test_sanity_checks.py /opt/ksi/ && \
cd /opt/ksi/ && \
- python3.12 -m venv .ksivenv && \
- . .ksivenv/bin/activate && \
- pip3 install --no-cache-dir -r si_tests/requirements.txt && \
- pip3 install --no-cache-dir pytest-subtests pytest-html && \
+ uv sync --frozen --no-dev && \
+ . .venv/bin/activate && \
+ uv add pytest-subtests pytest-html && \
deactivate
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
diff --git a/k8s/docker-mos-toolset-full b/k8s/docker-mos-toolset-full
deleted file mode 100644
index 7f2bd4c..0000000
--- a/k8s/docker-mos-toolset-full
+++ /dev/null
@@ -1,79 +0,0 @@
-FROM ubuntu:18.04 AS download-packages-1804
-RUN mkdir /opt/packages-1804 && cd /opt/packages-1804 && \
- apt-get update && \
- apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio nfs-utils | grep "^\w" | sort -u) || true && \
- rm -rf /var/lib/apt/lists/*
-
-FROM ubuntu:20.04 AS download-packages-2004
-RUN mkdir /opt/packages && cd /opt/packages && \
- apt-get update && \
- apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio nfs-utils | grep "^\w" | sort -u) || true && \
- rm -rf /var/lib/apt/lists/*
-
-FROM ubuntu:22.04
-
-LABEL maintainer="qa-ps@mirantis.com"
-
-ADD k8s/src/ksi.tgz /opt/ksi/
-ADD k8s/src/mos-checker.tgz /opt/cfg-checker/
-WORKDIR /opt
-
-COPY --from=download-packages-2004 /opt/packages /opt/packages
-COPY --from=download-packages-1804 /opt/packages-1804 /opt/packages-1804
-
-RUN apt-get clean && apt-get update && \
- apt-get install -y make gcc g++ git libaio-dev libaio1 zlib1g-dev software-properties-common fio && \
- rm -rf /var/lib/apt/lists/*
-
-RUN export TZ="America/Chicago" && \
- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
- add-apt-repository ppa:rmescandon/yq && \
- apt-get clean && apt-get update && \
- apt-get install -y python3-pip python3-venv vim git iperf3 iperf mtr htop iputils-ping traceroute tcpdump wget iproute2 curl screen qemu-utils jq yq && \
- rm -rf /var/lib/apt/lists/*
-
-RUN apt-get update && \
- apt-get install curl gpg apt-transport-https --yes && \
- curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null && \
- echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
- apt-get update && \
- apt-get install -y helm && \
- rm -rf /var/lib/apt/lists/*
-
-RUN pip3 install --no-cache-dir pyghmi tempestparser
-
-RUN git clone --single-branch https://gerrit.mcp.mirantis.com/mcp/cvp-configuration -b k0rdent /opt/res-files && \
- cd /opt/cfg-checker && \
- python3 -m venv .checkervenv && \
- . .checkervenv/bin/activate && \
- pip3 install --no-cache-dir -r requirements.txt && \
- python3 setup.py develop && \
- deactivate && \
- mkdir /opt/cmp-check && cd /opt/cmp-check && \
- cp /opt/res-files/scripts/prepare.sh ./ && \
- cp /opt/res-files/scripts/cmp_check.sh ./ && \
- cp /opt/res-files/cleanup.sh ./ && \
- rm -rf /opt/res-files/.git && \
- rm -rf /opt/cfg-checker/.git
-
-RUN cd /opt/ksi/ && \
- python3 -m venv .ksivenv && \
- . .ksivenv/bin/activate && \
- pip3 install --no-cache-dir -r si_tests/requirements.txt && \
- deactivate
-
-RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
- install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
- rm kubectl
-
-RUN git clone "https://gerrit.mcp.mirantis.com/mcp/mos-spt" /opt/mos-spt && \
- cd /opt/mos-spt && \
- python3 -m venv .venv && \
- . .venv/bin/activate && \
- pip3 install --no-cache-dir -r requirements.txt && \
- deactivate
-
-RUN printf "LABELS:\n IMAGE_TAG: k0rdent" > /dockerimage_metadata
-
-ENTRYPOINT ["sleep infinite"]
-
diff --git a/k8s/src/ksi.tgz b/k8s/src/ksi.tgz
index 1016f53..7635ead 100644
--- a/k8s/src/ksi.tgz
+++ b/k8s/src/ksi.tgz
Binary files differ
diff --git a/k8s/workspace/run-k0rdent-sanity-for-child.sh b/k8s/workspace/run-k0rdent-sanity-for-child.sh
index 8f51edc..3eb20bb 100644
--- a/k8s/workspace/run-k0rdent-sanity-for-child.sh
+++ b/k8s/workspace/run-k0rdent-sanity-for-child.sh
@@ -7,7 +7,7 @@
cd $MY_PROJFOLDER/tmp
source $MY_PROJFOLDER/env.sh
source $MY_PROJFOLDER/envs/mgmtrc
-source /opt/ksi/.ksivenv/bin/activate
+source /opt/ksi/.venv/bin/activate
if [[ $# -lt 1 ]]; then
diff --git a/k8s/workspace/run-k0rdent-sanity.sh b/k8s/workspace/run-k0rdent-sanity.sh
index 19d814c..f46b1a5 100644
--- a/k8s/workspace/run-k0rdent-sanity.sh
+++ b/k8s/workspace/run-k0rdent-sanity.sh
@@ -7,7 +7,7 @@
cd $MY_PROJFOLDER/tmp
source $MY_PROJFOLDER/env.sh
source $MY_PROJFOLDER/envs/mgmtrc
-source /opt/ksi/.ksivenv/bin/activate
+source /opt/ksi/.venv/bin/activate
fname="$MY_PROJFOLDER/reports/$MY_CLIENTSHORTNAME-k0rdent-sanity-$(get_timestamp).html"