diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 31 | ||||
-rw-r--r-- | docker/Dockerfile.aarch64.patch | 50 | ||||
-rw-r--r-- | docker/Dockerfile_ubuntu18 | 62 | ||||
-rw-r--r-- | docker/k8s/Dockerfile | 39 | ||||
-rwxr-xr-x | docker/supervisor.sh | 7 |
5 files changed, 160 insertions, 29 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index b1eb50592..00613a10f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -12,6 +12,7 @@ FROM ubuntu:16.04 LABEL image=opnfv/yardstick ARG BRANCH=master +ARG OPENSTACK_TAG=stable/stein # GIT repo directory ENV REPOS_DIR="/home/opnfv/repos" \ @@ -20,36 +21,46 @@ ENV REPOS_DIR="/home/opnfv/repos" \ # Set work directory # Yardstick repo -ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \ +ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \ RELENG_REPO_DIR="${REPOS_DIR}/releng" \ STORPERF_REPO_DIR="${REPOS_DIR}/storperf" -RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean +RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && apt-get clean RUN easy_install -U setuptools==30.0.0 -RUN pip install appdirs==1.4.0 +RUN pip install \ + -chttps://opendev.org/openstack/requirements/raw/branch/$OPENSTACK_TAG/upper-constraints.txt \ + -chttps://git.opnfv.org/yardstick/plain/upper-constraints.txt?h=$BRANCH \ + appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.11.3 python-heatclient==1.14.0 ansible==2.5.5 RUN mkdir -p ${REPOS_DIR} RUN git config --global http.sslVerify false +#For developers: To test your changes you must comment out the git clone for ${YARDSTICK_REPO_DIR}. +#You must also uncomment the RUN and COPY commands below. +#You must run docker build from your yardstick directory on the host. RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR} +#RUN mkdir ${YARDSTICK_REPO_DIR} +#COPY ./ ${YARDSTICK_REPO_DIR} RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} -RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR} +RUN git clone --depth 1 -b stable/gambia https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR} + +RUN ansible-playbook -i ${YARDSTICK_REPO_DIR}/ansible/install-inventory.ini -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml -WORKDIR ${YARDSTICK_REPO_DIR} -RUN ${YARDSTICK_REPO_DIR}/install.sh RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh RUN echo "daemon off;" >> /etc/nginx/nginx.conf - -EXPOSE 5000 +# nginx=5000, rabbitmq=5672 +EXPOSE 5000 5672 ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR} ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} +# For developers: when `docker build ...` is running from YARDSTICK_REPO_DIR, please change +# path `./exec_tests.sh` -> `./docker/exec_tests.sh``. COPY ./exec_tests.sh /usr/local/bin/ -ENV NSB_DIR="/opt/nsb_bin" \ - PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl" +ENV NSB_DIR="/opt/nsb_bin" +ENV PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl" WORKDIR ${REPOS_DIR} CMD ["/usr/bin/supervisord"] diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch index 33c352a1b..2f510b841 100644 --- a/docker/Dockerfile.aarch64.patch +++ b/docker/Dockerfile.aarch64.patch @@ -1,42 +1,56 @@ -From: Alexandru Nemes <alexandru.nemes@enea.com> -Date: Mon, 19 Jun 2017 14:18:24 +0300 +From: Cristina Pauna <cristina.pauna@enea.com> +Date: Mon, 23 Jul 2018 15:16:59 +0300 Subject: [PATCH] Patch for Yardstick AARCH64 Docker file -Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com> +Signed-off-by: Cristina Pauna <cristina.pauna@enea.com> --- - docker/Dockerfile | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + docker/Dockerfile | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile -index 96a5d77..03307a2 100644 +index 71ce6b58..fce7c116 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile -@@ -1,5 +1,5 @@ - ############################################################################## --# Copyright (c) 2015 Ericsson AB and others. -+# Copyright (c) 2017 Enea AB and others. - # - # All rights reserved. This program and the accompanying materials - # are made available under the terms of the Apache License, Version 2.0 @@ -7,9 +7,9 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## --FROM ubuntu:14.04 -+FROM aarch64/ubuntu:14.04 +-FROM ubuntu:16.04 ++FROM arm64v8/ubuntu:16.04 -LABEL image=opnfv/yardstick +LABEL image=opnfv/yardstick_aarch64 ARG BRANCH=master -@@ -40,8 +40,8 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf +@@ -24,7 +24,8 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \ + RELENG_REPO_DIR="${REPOS_DIR}/releng" \ + STORPERF_REPO_DIR="${REPOS_DIR}/storperf" + +-RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && apt-get clean ++RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && \ ++ apt-get install -y libssl-dev && apt-get -y install libffi-dev && apt-get clean + RUN easy_install -U setuptools==30.0.0 + RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.11.3 python-openstackclient==3.14.2 python-heatclient==1.14.0 ansible==2.5.5 + +@@ -40,7 +41,8 @@ RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${Y + RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} + RUN git clone --depth 1 -b stable/gambia https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR} + +-RUN ansible-playbook -i ${YARDSTICK_REPO_DIR}/ansible/install-inventory.ini -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml ++RUN sed -i -e '/configure_gui/d' ${YARDSTICK_REPO_DIR}/ansible/install.yaml && \ ++ ansible-playbook -i ${YARDSTICK_REPO_DIR}/ansible/install-inventory.ini -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml + + RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh - EXPOSE 5000 +@@ -48,8 +50,8 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf + # nginx=5000, rabbitmq=5672 + EXPOSE 5000 5672 -ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR} -ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} +ADD http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-disk.img ${IMAGE_DIR} +ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-disk1.img ${IMAGE_DIR} - COPY ./exec_tests.sh /usr/local/bin/
\ No newline at end of file + # For developers: when `docker build ...` is running from YARDSTICK_REPO_DIR, please change + # path `./exec_tests.sh` -> `./docker/exec_tests.sh``. diff --git a/docker/Dockerfile_ubuntu18 b/docker/Dockerfile_ubuntu18 new file mode 100644 index 000000000..e9fe42ecb --- /dev/null +++ b/docker/Dockerfile_ubuntu18 @@ -0,0 +1,62 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +FROM ubuntu:18.04 + +LABEL image=opnfv/yardstick-ubuntu-18.04 + +ARG BRANCH=master + +# GIT repo directory +ENV REPOS_DIR="/home/opnfv/repos" \ + IMAGE_DIR="/home/opnfv/images/" + +# Set work directory + +# Yardstick repo +ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \ + RELENG_REPO_DIR="${REPOS_DIR}/releng" \ + STORPERF_REPO_DIR="${REPOS_DIR}/storperf" + +RUN apt-get update && apt-get install -y git python python-setuptools python-pip iputils-ping && apt-get -y autoremove && apt-get clean + +RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 openstacksdk==0.9.17 python-openstackclient==3.12.1 python-heatclient==1.11.1 ansible==2.5.5 + +RUN mkdir -p ${REPOS_DIR} + +RUN git config --global http.sslVerify false +#For developers: To test your changes you must comment out the git clone for ${YARDSTICK_REPO_DIR}. +#You must also uncomment the RUN and COPY commands below. +#You must run docker build from your yardstick directory on the host. +RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR} +#RUN mkdir ${YARDSTICK_REPO_DIR} +#COPY ./ ${YARDSTICK_REPO_DIR} +RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR} +RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR} + +RUN ansible-playbook -i ${YARDSTICK_REPO_DIR}/ansible/install-inventory.ini -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml + +RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh + +RUN echo "daemon off;" >> /etc/nginx/nginx.conf +# nginx=5000, rabbitmq=5672 +EXPOSE 5000 5672 + +ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR} +ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR} + +# For developers: when `docker build ...` is running from YARDSTICK_REPO_DIR, please change +# path `./exec_tests.sh` -> `./docker/exec_tests.sh``. +COPY ./exec_tests.sh /usr/local/bin/ + +ENV NSB_DIR="/opt/nsb_bin" +ENV PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl" + +WORKDIR ${REPOS_DIR} +CMD ["/usr/bin/supervisord"] diff --git a/docker/k8s/Dockerfile b/docker/k8s/Dockerfile new file mode 100644 index 000000000..2f8d9b161 --- /dev/null +++ b/docker/k8s/Dockerfile @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +FROM ubuntu:16.04 + +LABEL image=opnfv/yardstick-image-k8s + +ARG BRANCH=master + +# GIT repo directory +ENV CLONE_DEST="/opt/tempT" + +RUN apt-get update && apt-get install -y \ + git bc bonnie++ fio gcc iperf3 ethtool \ + iproute2 linux-tools-common linux-tools-generic \ + lmbench make netperf patch perl rt-tests stress \ + sysstat iputils-ping openssh-server sudo && \ + apt-get -y autoremove && apt-get clean + +RUN rm -rf -- ${CLONE_DEST} +RUN git clone https://github.com/kdlucas/byte-unixbench.git ${CLONE_DEST} +RUN mkdir -p ${CLONE_DEST}/UnixBench/ + +RUN git clone https://github.com/beefyamoeba5/ramspeed.git ${CLONE_DEST}/RAMspeed +WORKDIR ${CLONE_DEST}/RAMspeed/ramspeed-2.6.0 +RUN mkdir -p ${CLONE_DEST}/RAMspeed/ramspeed-2.6.0/temp +RUN bash build.sh + +RUN git clone https://github.com/beefyamoeba5/cachestat.git ${CLONE_DEST}/Cachestat + +WORKDIR / + +CMD /bin/bash diff --git a/docker/supervisor.sh b/docker/supervisor.sh index b67de2212..a4104c7fb 100755 --- a/docker/supervisor.sh +++ b/docker/supervisor.sh @@ -11,7 +11,8 @@ # nginx service start when boot supervisor_config='/etc/supervisor/conf.d/yardstick.conf' -if [[ ! -e "${supervisor_config}" ]];then +if [[ ! -e "${supervisor_config}" ]]; then + cat << EOF > "${supervisor_config}" [supervisord] nodaemon = true @@ -22,5 +23,9 @@ command = service nginx restart [program:yardstick_uwsgi] directory = /etc/yardstick command = uwsgi -i yardstick.ini + +[program:rabbitmq] +command=/etc/yardstick/rabbitmq.sh EOF + fi |