blob: 0ce01e3a3ad05b8cbd543c2ff3d3f65b23241da3 [file] [log] [blame]
Alexa5e33462021-06-10 19:01:07 -05001FROM ubuntu:20.04
2
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +03003LABEL maintainer="qa-ps@mirantis.com"
Alexa5e33462021-06-10 19:01:07 -05004
Alex42355a92023-02-02 18:13:30 -06005ADD ./src/si-tests.tgz /opt/si-tests/
6ADD ./src/mos-checker.tgz /opt/cfg-checker/
Alex73b792d2021-06-11 17:46:14 -05007WORKDIR /opt
Alexa5e33462021-06-10 19:01:07 -05008RUN apt-get update && \
9 apt-get install -y make gcc g++ git libaio-dev libaio1 zlib1g-dev && \
10 git clone --depth 1 --branch fio-3.26 https://github.com/axboe/fio.git && \
Alex73b792d2021-06-11 17:46:14 -050011 cd /opt/fio && \
Alexa5e33462021-06-10 19:01:07 -050012 ./configure && \
13 make && \
14 make install && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030015 rm -rf /opt/fio && \
16 mkdir /opt/density && \
17 rm -rf /var/lib/apt/lists/*
Alex17e4a592021-07-13 15:59:33 -050018
19RUN export TZ="America/Chicago" && \
Alexa5e33462021-06-10 19:01:07 -050020 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030021 apt-get update && \
22 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 && \
23 rm -rf /var/lib/apt/lists/*
Alex17e4a592021-07-13 15:59:33 -050024
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030025RUN apt-get update && \
26 curl https://baltocdn.com/helm/signing.asc | apt-key add - && \
Alexc7f187c2022-04-28 10:02:27 -050027 apt-get install apt-transport-https --yes && \
28 echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
29 apt-get update && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030030 apt-get install -y helm && \
31 rm -rf /var/lib/apt/lists/*
Alexc7f187c2022-04-28 10:02:27 -050032
Alex83075ac2022-02-16 13:39:50 -060033RUN pip3 install --no-cache-dir python-openstackclient python-neutronclient python-heatclient pyghmi python-octaviaclient tempestparser python-ironicclient aodhclient gnocchiclient python-barbicanclient python-glanceclient
Alex17e4a592021-07-13 15:59:33 -050034
35RUN git clone https://gerrit.mcp.mirantis.com/mcp/cvp-configuration /opt/res-files && \
Alex73b792d2021-06-11 17:46:14 -050036 cd /opt/cfg-checker && \
37 python3 -m venv .checkervenv && \
38 . .checkervenv/bin/activate && \
39 pip3 install --no-cache-dir -r requirements.txt && \
40 python3 setup.py develop && \
41 deactivate && \
Alexa5e33462021-06-10 19:01:07 -050042 mkdir /opt/cmp-check && cd /opt/cmp-check && \
43 cp /opt/res-files/scripts/prepare.sh ./ && \
44 cp /opt/res-files/scripts/cmp_check.sh ./ && \
Alex73b792d2021-06-11 17:46:14 -050045 cp /opt/res-files/cleanup.sh ./ && \
Alex73b792d2021-06-11 17:46:14 -050046 rm -rf /opt/res-files/.git && \
47 rm -rf /opt/cfg-checker/.git
Alexa5e33462021-06-10 19:01:07 -050048
Alex17e4a592021-07-13 15:59:33 -050049RUN cd /opt/si-tests/ && \
50 python3 -m venv .sivenv && \
51 . .sivenv/bin/activate && \
52 pip3 install --no-cache-dir -r si_tests/requirements.txt && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030053 deactivate
Alex17e4a592021-07-13 15:59:33 -050054
55RUN mkdir /opt/packages/ && \
56 cd /opt/packages && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030057 apt-get update && \
58 apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio | grep "^\w" | sort -u) || true && \
59 rm -rf /var/lib/apt/lists/*
Alex17e4a592021-07-13 15:59:33 -050060
Alexf2f657e2021-06-14 19:44:05 -050061RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
62 install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
63 rm kubectl
64
Ievgeniia Zadorozhna6c416492022-06-16 16:29:40 +030065RUN git clone "https://gerrit.mcp.mirantis.com/mcp/mos-spt" /opt/mos-spt && \
66 cd /opt/mos-spt && \
67 python3 -m venv .venv && \
68 . .venv/bin/activate && \
69 pip3 install --no-cache-dir -r requirements.txt && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030070 deactivate
71
72ADD ./src/openstack-refapp.tgz /opt/density/openstack-refapp/
73
74RUN cd /opt/density/openstack-refapp/ && \
75 python3 -m venv .refapp-venv && \
76 . .refapp-venv/bin/activate && \
77 pip3 install --no-cache-dir -r requirements.txt && \
Ievgeniia Zadorozhna6c416492022-06-16 16:29:40 +030078 deactivate && \
Ievgeniia Zadorozhna3a6f9e22023-05-12 18:31:28 +030079 cp /opt/res-files/scripts/prepare-refapp.sh /opt/density/openstack-refapp/ && \
80 cp /opt/res-files/scripts/run-refapp-density.sh /opt/density/openstack-refapp/
Ievgeniia Zadorozhna6c416492022-06-16 16:29:40 +030081
Alexa5e33462021-06-10 19:01:07 -050082ENTRYPOINT ["sleep infinite"]
83