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 | 83075ac | 2022-02-16 13:39:50 -0600 | [diff] [blame] | 21 | 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] | 22 | |
| 23 | 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] | 24 | git clone http://gerrit.mcp.mirantis.com/mcp/cfg-checker /opt/cfg-checker && \ |
| 25 | cd /opt/cfg-checker && \ |
| 26 | python3 -m venv .checkervenv && \ |
| 27 | . .checkervenv/bin/activate && \ |
| 28 | pip3 install --no-cache-dir -r requirements.txt && \ |
| 29 | python3 setup.py develop && \ |
| 30 | deactivate && \ |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 31 | mkdir /opt/cmp-check && cd /opt/cmp-check && \ |
| 32 | cp /opt/res-files/scripts/prepare.sh ./ && \ |
| 33 | cp /opt/res-files/scripts/cmp_check.sh ./ && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 34 | cp /opt/res-files/cleanup.sh ./ && \ |
Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 35 | rm -rf /opt/res-files/.git && \ |
| 36 | rm -rf /opt/cfg-checker/.git |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 37 | |
Alex | 17e4a59 | 2021-07-13 15:59:33 -0500 | [diff] [blame] | 38 | RUN cd /opt/si-tests/ && \ |
| 39 | python3 -m venv .sivenv && \ |
| 40 | . .sivenv/bin/activate && \ |
| 41 | pip3 install --no-cache-dir -r si_tests/requirements.txt && \ |
| 42 | deactivate && \ |
| 43 | cd /opt |
| 44 | |
| 45 | RUN mkdir /opt/packages/ && \ |
| 46 | cd /opt/packages && \ |
| 47 | apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 | grep "^\w" | sort -u) || true |
| 48 | |
Alex | f2f657e | 2021-06-14 19:44:05 -0500 | [diff] [blame] | 49 | RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ |
| 50 | install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ |
| 51 | rm kubectl |
| 52 | |
Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 53 | ENTRYPOINT ["sleep infinite"] |
| 54 | |