Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 1 | FROM ubuntu:20.04 |
| 2 | |
| 3 | MAINTAINER Alex Savatieiev (a.savex@gmail.com) |
| 4 | |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 5 | ADD ./si-tests.tgz /opt/si-tests/ |
| 6 | WORKDIR /opt |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 7 | RUN apt-get update && \ |
| 8 | apt-get install -y make gcc g++ git libaio-dev libaio1 zlib1g-dev && \ |
| 9 | git clone --depth 1 --branch fio-3.26 https://github.com/axboe/fio.git && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 10 | cd /opt/fio && \ |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 11 | ./configure && \ |
| 12 | make && \ |
| 13 | make install && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 14 | cd /opt && \ |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 15 | rm -rf /opt/fio |
| 16 | |
| 17 | RUN export TZ="America/Chicago" && \ |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 18 | ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ |
Alex | f59c739 | 2022-04-18 19:10:14 -0500 | [diff] [blame] | 19 | apt-get install -y python3-pip python3-venv vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl screen qemu-utils |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 20 | |
Alex | c7f187c | 2022-04-28 10:02:27 -0500 | [diff] [blame] | 21 | RUN curl https://baltocdn.com/helm/signing.asc | apt-key add - && \ |
| 22 | apt-get install apt-transport-https --yes && \ |
| 23 | echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \ |
| 24 | apt-get update && \ |
| 25 | apt-get install -y helm |
| 26 | |
Alex | 83075ac | 2022-02-16 13:39:50 -0600 | [diff] [blame] | 27 | RUN pip3 install --no-cache-dir python-openstackclient python-neutronclient python-heatclient pyghmi python-octaviaclient tempestparser python-ironicclient aodhclient gnocchiclient python-barbicanclient python-glanceclient |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 28 | |
| 29 | RUN git clone https://gerrit.mcp.mirantis.com/mcp/cvp-configuration /opt/res-files && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 30 | git clone http://gerrit.mcp.mirantis.com/mcp/cfg-checker /opt/cfg-checker && \ |
| 31 | cd /opt/cfg-checker && \ |
| 32 | python3 -m venv .checkervenv && \ |
| 33 | . .checkervenv/bin/activate && \ |
| 34 | pip3 install --no-cache-dir -r requirements.txt && \ |
| 35 | python3 setup.py develop && \ |
| 36 | deactivate && \ |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 37 | mkdir /opt/cmp-check && cd /opt/cmp-check && \ |
| 38 | cp /opt/res-files/scripts/prepare.sh ./ && \ |
| 39 | cp /opt/res-files/scripts/cmp_check.sh ./ && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 40 | cp /opt/res-files/cleanup.sh ./ && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 41 | rm -rf /opt/res-files/.git && \ |
| 42 | rm -rf /opt/cfg-checker/.git |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 43 | |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 44 | RUN cd /opt/si-tests/ && \ |
| 45 | python3 -m venv .sivenv && \ |
| 46 | . .sivenv/bin/activate && \ |
| 47 | pip3 install --no-cache-dir -r si_tests/requirements.txt && \ |
| 48 | deactivate && \ |
| 49 | cd /opt |
| 50 | |
| 51 | RUN mkdir /opt/packages/ && \ |
| 52 | cd /opt/packages && \ |
Alex | c7f187c | 2022-04-28 10:02:27 -0500 | [diff] [blame] | 53 | apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 fio | grep "^\w" | sort -u) || true |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 54 | |
Alex | f2f657e | 2021-06-14 19:44:05 -0500 | [diff] [blame] | 55 | RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ |
| 56 | install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ |
| 57 | rm kubectl |
| 58 | |
Ievgeniia Zadorozhna | 6c41649 | 2022-06-16 16:29:40 +0300 | [diff] [blame^] | 59 | RUN git clone "https://gerrit.mcp.mirantis.com/mcp/mos-spt" /opt/mos-spt && \ |
| 60 | cd /opt/mos-spt && \ |
| 61 | python3 -m venv .venv && \ |
| 62 | . .venv/bin/activate && \ |
| 63 | pip3 install --no-cache-dir -r requirements.txt && \ |
| 64 | deactivate && \ |
| 65 | cd /opt |
| 66 | |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 67 | ENTRYPOINT ["sleep infinite"] |
| 68 | |