diff options
-rwxr-xr-x | ci/launch_docker_container.sh | 13 | ||||
-rwxr-xr-x | ci/remove_docker_container.sh | 6 | ||||
-rw-r--r-- | docker-compose/docker-compose.yaml | 9 | ||||
-rw-r--r-- | docker/graphite/local_settings.py | 42 | ||||
-rw-r--r-- | docker/local-docker-compose.yaml | 43 | ||||
-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.py | 1 | ||||
-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 |
13 files changed, 68 insertions, 74 deletions
diff --git a/ci/launch_docker_container.sh b/ci/launch_docker_container.sh index 4f4e38b..b2cf1c4 100755 --- a/ci/launch_docker_container.sh +++ b/ci/launch_docker_container.sh @@ -11,9 +11,8 @@ cd `dirname $0` ci=`pwd` -cd ${ci}/../docker-compose +cd ${ci}/../docker -export TAG=${DOCKER_TAG:-latest} export ENV_FILE=${ci}/job/admin.rc export CARBON_DIR=${ci}/job/carbon/ @@ -23,15 +22,11 @@ then sudo chown 33:33 ${ci}/job/carbon fi -docker-compose pull -docker-compose up -d +docker-compose -f local-docker-compose.yaml up -d echo "Waiting for StorPerf to become active" -curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > test.html 2>&1 -while [ `grep 'agent_count' test.html | wc -l` == "0" ] + +while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ] do sleep 1 - curl -X GET 'http://127.0.0.1:5000/api/v1.0/configurations' > test.html 2>&1 done - -rm -f test.html diff --git a/ci/remove_docker_container.sh b/ci/remove_docker_container.sh index f424110..1764034 100755 --- a/ci/remove_docker_container.sh +++ b/ci/remove_docker_container.sh @@ -11,15 +11,15 @@ cd `dirname $0` ci=`pwd` -cd ${ci}/../docker-compose +cd ${ci}/../docker export TAG=${DOCKER_TAG:-latest} export ENV_FILE=${ci}/job/admin.rc export CARBON_DIR=${ci}/job/carbon/ -docker-compose down +docker-compose -f local-docker-compose.yaml down -for container_name in storperf swagger-ui http-front-end +for container_name in storperf storperf-master storperf-swaggerui storperf-httpfrontend storperf-reporting do container=`docker ps -a -q -f name=$container_name` if [ ! -z $container ] diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index 7747506..bb09eef 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -1,3 +1,12 @@ +############################################################################## +# 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: 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 |