| 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 && \ | 
|  | 15 | rm -rf /opt/fio && \ | 
| Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 16 | export TZ="America/Chicago" && \ | 
|  | 17 | ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ | 
| Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 18 | apt-get install -y python3-pip python3-venv vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl && \ | 
|  | 19 | pip3 install --no-cache-dir python-openstackclient python-neutronclient python-heatclient pyghmi python-octaviaclient && \ | 
| Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 20 | git clone https://gerrit.mcp.mirantis.com/mcp/cvp-configuration /opt/res-files && \ | 
| Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 21 | git clone http://gerrit.mcp.mirantis.com/mcp/cfg-checker /opt/cfg-checker && \ | 
|  | 22 | cd /opt/cfg-checker && \ | 
|  | 23 | python3 -m venv .checkervenv && \ | 
|  | 24 | . .checkervenv/bin/activate && \ | 
|  | 25 | pip3 install --no-cache-dir -r requirements.txt && \ | 
|  | 26 | python3 setup.py develop && \ | 
|  | 27 | deactivate && \ | 
| Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 28 | mkdir /opt/cmp-check && cd /opt/cmp-check && \ | 
|  | 29 | cp /opt/res-files/scripts/prepare.sh ./ && \ | 
|  | 30 | cp /opt/res-files/scripts/cmp_check.sh ./ && \ | 
| Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 31 | cp /opt/res-files/cleanup.sh ./ && \ | 
| Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 32 | cd /opt/si-tests/ && \ | 
|  | 33 | python3 -m venv .venv && \ | 
|  | 34 | . .venv/bin/activate && \ | 
| Alex | 73b792d | 2021-06-11 17:46:14 -0500 | [diff] [blame] | 35 | pip3 install --no-cache-dir -r si_tests/requirements.txt && \ | 
|  | 36 | apt -y remove git make g++ gcc && \ | 
|  | 37 | apt -y autoremove --purge && \ | 
|  | 38 | rm -rf /var/lib/apt/lists/* && \ | 
|  | 39 | rm -rf /opt/res-files/.git && \ | 
|  | 40 | rm -rf /opt/cfg-checker/.git | 
| Alex | a5e3346 | 2021-06-10 19:01:07 -0500 | [diff] [blame] | 41 |  | 
|  | 42 | ENTRYPOINT ["sleep infinite"] | 
|  | 43 |  |