summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-07-12 21:41:01 -0400
committermbeierl <mark.beierl@dell.com>2017-07-12 21:50:39 -0400
commit9efa75fa08dad32b95ada37bb8e22371c51626c3 (patch)
treef99a71595108d64aa643f5137c73842a8f362be1 /docker
parent7602a54309adbe5c5346ee6befecc2e596976504 (diff)
Creation of Local Docker for Daily Job
Moves the dockerfiles for the different submodules/containers into their respective directories. Adds a docker compose file that can build the containers from the local filesystem, and mounts the local filesystem as a volume, making it easier for developer testing as local changes are automatically reflected in the final container. Change-Id: I2376034258cab2a3dc3a0d1ac3f01bbf5d1f59e7 JIRA: STORPERF-189 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker')
-rw-r--r--docker/graphite/local_settings.py42
-rw-r--r--docker/local-docker-compose.yaml43
-rw-r--r--docker/storperf-httpfrontend/Dockerfile (renamed from docker/Dockerfile-httpfrontend)6
-rw-r--r--docker/storperf-master/Dockerfile (renamed from docker/Dockerfile-master)13
-rw-r--r--docker/storperf-master/graphite/carbon.conf (renamed from docker/graphite/carbon.conf)0
-rw-r--r--docker/storperf-master/graphite/initial_data.json (renamed from docker/graphite/initial_data.json)0
-rw-r--r--docker/storperf-master/graphite/local_settings.py1
-rw-r--r--docker/storperf-master/graphite/nginx.conf (renamed from docker/graphite/nginx.conf)0
-rw-r--r--docker/storperf-master/graphite/storage-schemas.conf (renamed from docker/graphite/storage-schemas.conf)0
-rw-r--r--docker/storperf-reporting/Dockerfile (renamed from docker/Dockerfile-reporting)9
10 files changed, 52 insertions, 62 deletions
diff --git a/docker/graphite/local_settings.py b/docker/graphite/local_settings.py
deleted file mode 100644
index 177d674..0000000
--- a/docker/graphite/local_settings.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Edit this file to override the default graphite settings, do not edit settings.py
-
-# Turn on debugging and restart apache if you ever see an "Internal Server Error" page
-#DEBUG = True
-
-# Set your local timezone (django will try to figure this out automatically)
-TIME_ZONE = 'UTC'
-
-# Setting MEMCACHE_HOSTS to be empty will turn off use of memcached entirely
-#MEMCACHE_HOSTS = ['127.0.0.1:11211']
-
-# Sometimes you need to do a lot of rendering work but cannot share your storage mount
-#REMOTE_RENDERING = True
-#RENDERING_HOSTS = ['fastserver01','fastserver02']
-#LOG_RENDERING_PERFORMANCE = True
-#LOG_CACHE_PERFORMANCE = True
-
-# If you've got more than one backend server they should all be listed here
-#CLUSTER_SERVERS = []
-
-# Override this if you need to provide documentation specific to your graphite deployment
-#DOCUMENTATION_URL = "http://wiki.mycompany.com/graphite"
-
-# Enable email-related features
-#SMTP_SERVER = "mail.mycompany.com"
-
-# LDAP / ActiveDirectory authentication setup
-#USE_LDAP_AUTH = True
-#LDAP_SERVER = "ldap.mycompany.com"
-#LDAP_PORT = 389
-#LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com"
-#LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com"
-#LDAP_BASE_PASS = "readonly_account_password"
-#LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%s)"
-
-# If sqlite won't cut it, configure your real database here (don't forget to run manage.py syncdb!)
-#DATABASE_ENGINE = 'mysql' # or 'postgres'
-#DATABASE_NAME = 'graphite'
-#DATABASE_USER = 'graphite'
-#DATABASE_PASSWORD = 'graphite-is-awesome'
-#DATABASE_HOST = 'mysql.mycompany.com'
-#DATABASE_PORT = '3306'
diff --git a/docker/local-docker-compose.yaml b/docker/local-docker-compose.yaml
new file mode 100644
index 0000000..75cf429
--- /dev/null
+++ b/docker/local-docker-compose.yaml
@@ -0,0 +1,43 @@
+##############################################################################
+# Copyright (c) 2017 Dell 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
+##############################################################################
+
+version: '2'
+services:
+
+ storperf-master:
+ container_name: "storperf-master"
+ build: storperf-master
+ ports:
+ - "8000:8000"
+ env_file: ${ENV_FILE}
+ volumes:
+ - ${CARBON_DIR}:/opt/graphite/storage/whisper
+ - ./storperf-master/:/home/opnfv/repos/storperf
+
+ storperf-reporting:
+ container_name: "storperf-reporting"
+ build: storperf-reporting
+ ports:
+ - "5080:5000"
+ volumes:
+ - ./storperf-reporting/:/home/opnfv/storperf-reporting
+
+ storperf-swaggerui:
+ container_name: "storperf-swaggerui"
+ image: "schickling/swagger-ui"
+
+ storperf-httpfrontend:
+ container_name: "storperf-httpfrontend"
+ build: storperf-httpfrontend
+ ports:
+ - "5000:5000"
+ links:
+ - storperf-master
+ - storperf-reporting
+ - storperf-swaggerui \ No newline at end of file
diff --git a/docker/Dockerfile-httpfrontend b/docker/storperf-httpfrontend/Dockerfile
index dc97b80..4069d24 100644
--- a/docker/Dockerfile-httpfrontend
+++ b/docker/storperf-httpfrontend/Dockerfile
@@ -17,9 +17,7 @@ FROM nginx:stable-alpine
MAINTAINER Mark Beierl <mark.beierl@dell.com>
LABEL version="3.1" description="OPNFV Storperf HTTP Front End Container"
-ARG BRANCH=master
-
-COPY storperf-httpfrontend/nginx.conf /etc/nginx/nginx.conf
-COPY storperf-httpfrontend/html /etc/nginx/html
+COPY ./nginx.conf /etc/nginx/nginx.conf
+COPY ./html /etc/nginx/html
EXPOSE 5000
diff --git a/docker/Dockerfile-master b/docker/storperf-master/Dockerfile
index 38e8265..aa52fbb 100644
--- a/docker/Dockerfile-master
+++ b/docker/storperf-master/Dockerfile
@@ -19,8 +19,6 @@ 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
@@ -69,14 +67,9 @@ 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 config --global http.sslVerify false
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
@@ -84,11 +77,11 @@ RUN cd ${repos_dir}/fio && git checkout tags/fio-2.2.10
# Install StorPerf
-COPY storperf-master ${repos_dir}/storperf
+COPY . ${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
+COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Graphite
EXPOSE 8000
diff --git a/docker/graphite/carbon.conf b/docker/storperf-master/graphite/carbon.conf
index 13088dd..13088dd 100644
--- a/docker/graphite/carbon.conf
+++ b/docker/storperf-master/graphite/carbon.conf
diff --git a/docker/graphite/initial_data.json b/docker/storperf-master/graphite/initial_data.json
index b3ac9b1..b3ac9b1 100644
--- a/docker/graphite/initial_data.json
+++ b/docker/storperf-master/graphite/initial_data.json
diff --git a/docker/storperf-master/graphite/local_settings.py b/docker/storperf-master/graphite/local_settings.py
new file mode 100644
index 0000000..7cff8f7
--- /dev/null
+++ b/docker/storperf-master/graphite/local_settings.py
@@ -0,0 +1 @@
+TIME_ZONE = 'UTC'
diff --git a/docker/graphite/nginx.conf b/docker/storperf-master/graphite/nginx.conf
index 8a11e94..8a11e94 100644
--- a/docker/graphite/nginx.conf
+++ b/docker/storperf-master/graphite/nginx.conf
diff --git a/docker/graphite/storage-schemas.conf b/docker/storperf-master/graphite/storage-schemas.conf
index 855a9e4..855a9e4 100644
--- a/docker/graphite/storage-schemas.conf
+++ b/docker/storperf-master/graphite/storage-schemas.conf
diff --git a/docker/Dockerfile-reporting b/docker/storperf-reporting/Dockerfile
index ad00019..606bac0 100644
--- a/docker/Dockerfile-reporting
+++ b/docker/storperf-reporting/Dockerfile
@@ -19,15 +19,12 @@ FROM alpine:3.1
MAINTAINER Mark Beierl <mark.beierl@dell.com>
LABEL version="0.1" description="OPNFV Storperf Reporting Container"
-ARG BRANCH=master
-
RUN apk add --update python py-pip
-COPY storperf-reporting /home/opnfv/storperf-reporting
+COPY . /home/opnfv/storperf-reporting
WORKDIR /home/opnfv/storperf-reporting
-
RUN pip install -r /home/opnfv/storperf-reporting/requirements.txt
-ENTRYPOINT ["python"]
-CMD ["/home/opnfv/storperf-reporting/src/app.py"]
+
+CMD ["python", "app.py"]
EXPOSE 5000 \ No newline at end of file