blob: d52b4c2fe1b6a76ee48a13ec3a9c1571156222e7 [file] [log] [blame]
Michal Jagiello8b8a4cf2022-12-22 08:45:18 +00001FROM ubuntu:20.04
mrichomme83a352f2020-04-06 18:04:22 +02002
DR695Hccff30b2017-02-17 18:44:24 -05003## Be careful of Windows newlines
Brian Freemanf6032df2019-02-18 09:59:12 -05004MAINTAINER "ONAP"
Brian Freemanf6032df2019-02-18 09:59:12 -05005LABEL name="Docker image for the ONAP Robot Testing Framework"
DR695Hc0cf6a42019-07-26 16:42:36 -04006LABEL usage="docker run -e ROBOT_TEST=<testname> -ti onapete"
Puzikov Dmitry38bcba62019-02-15 16:58:35 +01007ENV BUILDTIME=true
Jerry Flood633a15d2017-06-02 16:46:11 -04008
mrichomme83a352f2020-04-06 18:04:22 +02009ARG TESTSUITE_TAG=master
mrichomme83a352f2020-04-06 18:04:22 +020010ARG PYTHON_UTILS_TAG=master
11ARG DEMO_TAG=master
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020012ARG KUBERNETES_VERSION="v1.19.11"
13ARG HELM_VERSION="v3.3.4"
mrichomme83a352f2020-04-06 18:04:22 +020014
15ARG TESTSUITE_REPO=git.onap.org/testsuite
mrichomme83a352f2020-04-06 18:04:22 +020016ARG PYTHON_UTILS_REPO=git.onap.org/testsuite/python-testing-utils.git
17ARG DEMO_REPO=git.onap.org/demo
Michal Jagiello8b8a4cf2022-12-22 08:45:18 +000018ARG DEBIAN_FRONTEND=noninteractive
mrichomme83a352f2020-04-06 18:04:22 +020019
20COPY requirements.txt requirements.txt
21
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020022# Install kubectl
23# Note: Latest version may be found on:
24# https://aur.archlinux.org/packages/kubectl-bin/
25ADD https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020026ADD https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 get_helm.sh
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020027
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010028# Install Python, Pip, Robot framework, chromium, lighttpd web server
29RUN apt-get update \
30 && apt-get install \
31 --no-install-recommends \
32 --assume-yes \
33 chromium-browser \
34 chromium-chromedriver \
35 dnsutils \
36 git \
37 gcc \
38 libffi-dev \
39 libssl-dev \
40 lighttpd \
41 make \
42 net-tools \
stark, stevenea4af0c2019-08-28 16:11:53 -070043 netbase \
mrichomme83a352f2020-04-06 18:04:22 +020044 unzip zip \
45 x11-utils x11-xserver-utils \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010046 xvfb \
Brian Freeman01d503a2019-04-10 14:51:59 -050047 xxd \
mrichomme83a352f2020-04-06 18:04:22 +020048 wget vim \
Michal Jagiello8b8a4cf2022-12-22 08:45:18 +000049 python3.8 python3.8-dev python3-pip && \
Andreas Geissler8ada98c2023-02-03 13:28:42 +010050 ln -s /usr/bin/python3 /usr/bin/python && \
mrichomme83a352f2020-04-06 18:04:22 +020051 mkdir -p /var/opt/ONAP && \
Michal Jagiello8b8a4cf2022-12-22 08:45:18 +000052 pip3 install --no-cache-dir -r requirements.txt && \
53 pip3 install --no-cache-dir \
mrichomme83a352f2020-04-06 18:04:22 +020054 git+https://$PYTHON_UTILS_REPO@$PYTHON_UTILS_TAG#egg=robotframework-onap\&subdirectory=robotframework-onap && \
55 git clone --depth 1 https://$TESTSUITE_REPO -b $TESTSUITE_TAG /var/opt/ONAP && \
Krzysztof Kuzmicki590d66f2020-10-07 09:23:18 +020056 git clone --depth 1 https://$DEMO_REPO -b $DEMO_TAG /var/opt/ONAP/demo && \
Krzysztof Kuzmicki5e6967f2021-10-01 12:22:06 +020057 chmod +x /usr/local/bin/kubectl && \
58 chmod 700 get_helm.sh && \
Krzysztof Kuzmicki55d91bc2022-03-17 15:00:46 +010059 ./get_helm.sh --version $HELM_VERSION && \
60 mkdir -p /app && \
61 cp /var/opt/ONAP/setup-hvves.sh /app
62
DR695Hccff30b2017-02-17 18:44:24 -050063
Michal Jagiello8b8a4cf2022-12-22 08:45:18 +000064RUN python3.8 -m pip install --no-cache-dir setuptools wheel
65RUN python3.8 -m pip install --no-cache-dir virtualenv
stark, stevenea4af0c2019-08-28 16:11:53 -070066
DR695Hccff30b2017-02-17 18:44:24 -050067# Copy the robot code
mrichomme83a352f2020-04-06 18:04:22 +020068RUN mkdir -p /etc/lighttpd && \
69 rm /etc/lighttpd/lighttpd.conf && \
70 ln -s /var/opt/ONAP/docker/lighttpd.conf /etc/lighttpd/lighttpd.conf && \
71 ln -s /var/opt/ONAP/docker/authorization /etc/lighttpd/authorization && \
72 chmod 777 /var/opt/ONAP/setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010073 && chmod 777 /var/opt/ONAP/runTags.sh \
74 && chmod 777 /var/opt/ONAP/dnstraffic.sh \
75 && chmod 777 /var/opt/ONAP/runSoak.sh \
76 && chmod 777 /var/opt/ONAP/runEteTag.sh \
mrichomme83a352f2020-04-06 18:04:22 +020077 && chmod 600 /var/opt/ONAP/robot/assets/keys/* && \
78 cd /var/opt/ONAP && ./setup.sh \
Puzikov Dmitry38bcba62019-02-15 16:58:35 +010079 && apt-get autoremove --assume-yes \
80 && rm -rf /var/lib/apt/lists/* \
81 && apt-get clean
DR695Hccff30b2017-02-17 18:44:24 -050082CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]