blob: 998ae15421f7b28ce08d9870575e05f6c449c147 [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 && \
Alexf2f657e2021-06-14 19:44:05 -050018 apt-get install -y python3-pip python3-venv vim git iperf3 mtr htop iputils-ping traceroute tcpdump wget iproute2 curl screen && \
19 pip3 install --no-cache-dir python-openstackclient python-neutronclient python-heatclient pyghmi python-octaviaclient tempestparser && \
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 && \
Alexf2f657e2021-06-14 19:44:05 -050036 deactivate && \
37 cd /opt && \
Alex73b792d2021-06-11 17:46:14 -050038 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
Alexf2f657e2021-06-14 19:44:05 -050042RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
43 install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
44 rm kubectl
45
Alexa5e33462021-06-10 19:01:07 -050046ENTRYPOINT ["sleep infinite"]
47