From 605d76560bffc87ea0eb10105fb935feaa9d355b Mon Sep 17 00:00:00 2001 From: mbeierl Date: Thu, 31 Aug 2017 13:01:17 -0400 Subject: Adding Graphite to Compose Fixes the oversight of the new graphite container in the docker-compose scripts Change-Id: I57bd01357a8155be6e1c5a6bd04712bcc5f38fd9 Signed-off-by: mbeierl --- docker-compose/create-compose.py | 33 ++++++++++++++++++++++++--------- docker-compose/docker-compose.yaml | 18 ++++++++++-------- docker/local-docker-compose.yaml | 5 ++--- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/docker-compose/create-compose.py b/docker-compose/create-compose.py index da71f69..2f3be4f 100644 --- a/docker-compose/create-compose.py +++ b/docker-compose/create-compose.py @@ -1,8 +1,18 @@ +############################################################################## +# 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 +############################################################################## + from builtins import input import readline readline.parse_and_bind("tab: complete") -content = '''# Copyright (c) 2017 Dell EMC and others. +content = '''############################################################################## +# 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 @@ -15,22 +25,23 @@ services: storperf-master: container_name: "storperf-master" image: "opnfv/storperf-master:{storperf_tag}" - ports: - - "8000:8000" - env_file: {ENV_FILE} - volumes: - - {CARBON_DIR}:/opt/graphite/storage/whisper + links: + - storperf-graphite storperf-reporting: container_name: "storperf-reporting" image: "opnfv/storperf-reporting:{reporting_tag}" - ports: - - "5080:5000" storperf-swaggerui: container_name: "storperf-swaggerui" image: "opnfv/storperf-swaggerui:{swaggerui_tag}" + storperf-graphite: + container_name: "storperf-graphite" + image: "opnfv/storperf-graphite:{graphite_tag}" + volumes: + - {CARBON_DIR}:/opt/graphite/storage/whisper + storperf-httpfrontend: container_name: "storperf-httpfrontend" image: "opnfv/storperf-httpfrontend:{frontend_tag}" @@ -40,7 +51,7 @@ services: - storperf-master - storperf-reporting - storperf-swaggerui - + - storperf-graphite ''' storeperf_tag = input("Enter image TAG for storperf-master: ") or 'latest' assert isinstance(storeperf_tag, str) @@ -51,6 +62,9 @@ assert isinstance(reporting_tag, str) frontend_tag = input("Enter image TAG for frontend: ") or 'latest' assert isinstance(frontend_tag, str) +graphite_tag = input("Enter image TAG for graphite: ") or 'latest' +assert isinstance(graphite_tag, str) + swaggerui_tag = input("Enter image TAG for swaggerui: ") or 'latest' assert isinstance(swaggerui_tag, str) @@ -69,6 +83,7 @@ if carbon_dir == '': f = open('docker-compose.yaml', 'w') f.write(content.format(storperf_tag=storeperf_tag, reporting_tag=reporting_tag, frontend_tag=frontend_tag, swaggerui_tag=swaggerui_tag, + graphite_tag=graphite_tag, CARBON_DIR=carbon_dir, ENV_FILE=env_file)) f.close() diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index e9459c4..49ab9e2 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -12,22 +12,23 @@ services: storperf-master: container_name: "storperf-master" image: "opnfv/storperf-master:${TAG}" - ports: - - "8000:8000" - env_file: ${ENV_FILE} - volumes: - - ${CARBON_DIR}:/opt/graphite/storage/whisper + links: + - storperf-graphite storperf-reporting: container_name: "storperf-reporting" image: "opnfv/storperf-reporting:${TAG}" - ports: - - "5080:5000" storperf-swaggerui: container_name: "storperf-swaggerui" image: "opnfv/storperf-swaggerui:${TAG}" + storperf-graphite: + container_name: "storperf-graphite" + image: "opnfv/storperf-graphite:${TAG}" + volumes: + - ${CARBON_DIR}:/opt/graphite/storage/whisper + storperf-httpfrontend: container_name: "storperf-httpfrontend" image: "opnfv/storperf-httpfrontend:${TAG}" @@ -36,4 +37,5 @@ services: links: - storperf-master - storperf-reporting - - storperf-swaggerui \ No newline at end of file + - storperf-swaggerui + - storperf-graphite diff --git a/docker/local-docker-compose.yaml b/docker/local-docker-compose.yaml index 13382d6..96afc1e 100644 --- a/docker/local-docker-compose.yaml +++ b/docker/local-docker-compose.yaml @@ -18,7 +18,6 @@ services: ARCH: ${ARCH} env_file: ${ENV_FILE} volumes: - - ${CARBON_DIR}:/opt/graphite/storage/whisper - ./storperf-master/:/storperf links: - storperf-graphite @@ -42,8 +41,8 @@ services: storperf-graphite: container_name: "storperf-graphite" build: storperf-graphite - ports: - - "8000:8080" + volumes: + - ${CARBON_DIR}:/opt/graphite/storage/whisper storperf-httpfrontend: container_name: "storperf-httpfrontend" -- cgit 1.2.3-korg