summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile-master
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-07-11 15:12:35 -0400
committermbeierl <mark.beierl@dell.com>2017-07-11 15:47:46 -0400
commit7602a54309adbe5c5346ee6befecc2e596976504 (patch)
tree60f15026780db30b0b8842ba1a1e2cc021e22625 /docker/Dockerfile-master
parentfc09b37e95c19f820ec60db19d98c0dc3d670829 (diff)
Change all paths
Changes the paths of all source code so that it exists under the dockerfile location for each container. This way we can use COPY instead of git clone, as well as use the existing JJB. Change-Id: I883b2957d89659c164fff0a1ebc4d677c534796d JIRA: STORPERF-188 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker/Dockerfile-master')
-rw-r--r--docker/Dockerfile-master99
1 files changed, 99 insertions, 0 deletions
diff --git a/docker/Dockerfile-master b/docker/Dockerfile-master
new file mode 100644
index 0000000..38e8265
--- /dev/null
+++ b/docker/Dockerfile-master
@@ -0,0 +1,99 @@
+##############################################################################
+# Copyright (c) 2015 EMC 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
+##############################################################################
+# Docker container for STORPERF
+#
+# Purpose: docker image for Storperf project
+#
+# Maintained by Jose Lausuch, Mark Beierl
+# Build:
+# $ docker build -t opnfv/storperf-master:tag .
+#
+
+FROM ubuntu:14.04
+MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
+LABEL version="5.0" description="OPNFV Storperf Docker container"
+
+ARG BRANCH=master
+
+ENV repos_dir /home/opnfv/repos
+ENV DEBIAN_FRONTEND noninteractive
+
+WORKDIR /home/opnfv
+
+# Needed for Graphite installation
+RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ trusty universe' >> /etc/apt/sources.list
+
+# Packaged dependencies
+RUN apt-get update && apt-get install -y \
+libaio1 \
+libaio-dev \
+zlib1g-dev \
+supervisor \
+libssl-dev \
+libffi-dev \
+git \
+build-essential \
+python-dev \
+python-pip \
+--no-install-recommends
+
+RUN mkdir -p /root/.ssh
+RUN chmod 700 /root/.ssh
+
+# Install required packages
+
+RUN apt-get -y install python-ldap python-cairo python-django python-twisted python-django-tagging python-simplejson python-memcache python-pysqlite2 python-support python-tz python-pip gunicorn supervisor nginx-light
+RUN pip install whisper==0.9.15
+RUN pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" carbon==0.9.15
+RUN pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/webapp" graphite-web==0.9.15
+
+# Add graphite config
+
+ADD graphite/nginx.conf /etc/nginx/nginx.conf
+ADD graphite/initial_data.json /var/lib/graphite/webapp/graphite/initial_data.json
+ADD graphite/local_settings.py /var/lib/graphite/webapp/graphite/local_settings.py
+ADD graphite/carbon.conf /var/lib/graphite/conf/carbon.conf
+ADD graphite/storage-schemas.conf /var/lib/graphite/conf/storage-schemas.conf
+RUN mkdir -p /opt/graphite/storage
+RUN ln -s /var/lib/graphite/storage/whisper /opt/graphite/storage/whisper
+RUN touch /var/lib/graphite/storage/graphite.db /var/lib/graphite/storage/index
+RUN chown -R www-data /var/lib/graphite/storage
+RUN chmod 0775 /var/lib/graphite/storage /var/lib/graphite/storage/whisper
+RUN chmod 0664 /var/lib/graphite/storage/graphite.db
+RUN cd /var/lib/graphite/webapp/graphite && python manage.py syncdb --noinput
+
+
+# Git configuration
+
+RUN git config --global http.sslVerify false
+RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
+
+
+# Third party git fetches
+
+RUN git clone http://git.kernel.dk/fio.git ${repos_dir}/fio
+RUN cd ${repos_dir}/fio && git checkout tags/fio-2.2.10
+#RUN cd ${repos_dir}/fio && make install
+
+
+# Install StorPerf
+
+COPY storperf-master ${repos_dir}/storperf
+RUN chmod 600 ${repos_dir}/storperf/storperf/resources/ssh/storperf_rsa
+RUN pip install --upgrade setuptools==33.1.1
+RUN pip install -r ${repos_dir}/storperf/requirements.pip
+COPY storperf-master/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
+
+# Graphite
+EXPOSE 8000
+
+# ReST API
+EXPOSE 5000
+
+CMD ["/usr/bin/supervisord"]