Initial version of the k0rdent toolset
Main changes:
* fixed init-workspace.sh to be executed on k0rdent
* fixed running of cfg-checker for nets and pings
* removed some openstack-related scripts
* created the Dockerfile docker-container-toolset-full
Related-PROD: K0RQA-15
Change-Id: Ib57a3b2a1d47e3a0f48951eb3def71839322a46d
diff --git a/k8s/docker-container-toolset-full b/k8s/docker-container-toolset-full
new file mode 100644
index 0000000..a41cc3b
--- /dev/null
+++ b/k8s/docker-container-toolset-full
@@ -0,0 +1,81 @@
+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
+
+WORKDIR /artifacts
+
+ENTRYPOINT ["sleep infinite"]
+