blob: cb5d35af303360247903829f9d4dcf291c5083ee [file] [log] [blame]
Alexa5e33462021-06-10 19:01:07 -05001FROM ubuntu:20.04
2
3MAINTAINER Alex Savatieiev (a.savex@gmail.com)
4
Alex73b792d2021-06-11 17:46:14 -05005ADD ./si-tests.tgz /opt/si-tests/
6WORKDIR /opt
Alexa5e33462021-06-10 19:01:07 -05007RUN 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 && \
Alex73b792d2021-06-11 17:46:14 -050010 cd /opt/fio && \
Alexa5e33462021-06-10 19:01:07 -050011 ./configure && \
12 make && \
13 make install && \
Alex73b792d2021-06-11 17:46:14 -050014 cd /opt && \
15 rm -rf /opt/fio && \
Alexa5e33462021-06-10 19:01:07 -050016 export TZ="America/Chicago" && \
17 ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
Alex73b792d2021-06-11 17:46:14 -050018 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 && \
Alexa5e33462021-06-10 19:01:07 -050020 git clone https://gerrit.mcp.mirantis.com/mcp/cvp-configuration /opt/res-files && \
Alex73b792d2021-06-11 17:46:14 -050021 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 && \
Alexa5e33462021-06-10 19:01:07 -050028 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 ./ && \
Alex73b792d2021-06-11 17:46:14 -050031 cp /opt/res-files/cleanup.sh ./ && \
Alexa5e33462021-06-10 19:01:07 -050032 cd /opt/si-tests/ && \
33 python3 -m venv .venv && \
34 . .venv/bin/activate && \
Alex73b792d2021-06-11 17:46:14 -050035 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
Alexa5e33462021-06-10 19:01:07 -050041
42ENTRYPOINT ["sleep infinite"]
43