From a882d9373127a2f749dd205ba51b93d5efb61727 Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Wed, 1 Feb 2017 03:06:48 -0600 Subject: modfied to to increase the scope of vip to all api network. Change-Id: I7a5fc38b7381cf9badb48c4e1a86cb0dbf7d128b Signed-off-by: Narinder Gupta --- ci/config_tpl/juju2/deployconfig.yaml | 30 +++++++++++++++++++++++++++++- ci/genDeploymentConfig.py | 10 +++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/config_tpl/juju2/deployconfig.yaml b/ci/config_tpl/juju2/deployconfig.yaml index ead9ca15..a0e52623 100644 --- a/ci/config_tpl/juju2/deployconfig.yaml +++ b/ci/config_tpl/juju2/deployconfig.yaml @@ -7,6 +7,7 @@ opnfv: ceph-disk: {{ opnfv.storage_dict.ceph.disk }} {% endif %} {% if opnfv.spaces_dict.data is defined %} +{% set netdata_prefix = opnfv.spaces_dict.data.cidr[:-4] %} dataNetwork: {{ opnfv.spaces_dict.data.cidr }} {% endif %} domain: {{ lab.racks[0].osdomainname }} @@ -16,7 +17,8 @@ opnfv: interface-enable: {{ lab.racks[0].ifnamelist }} os-domain-name: {{ lab.racks[0].osdomainname }} {% if opnfv.spaces_dict.public is defined %} - publicNetwork: {{ opnfv.spaces_dict.public.cidr }} +{% set netpublic_prefix = opnfv.spaces_dict.mgmt.cidr[:-4] %} + publicNetwork: {{ opnfv.spaces_dict.mgmt.cidr }} {% endif %} spaces: {% for net in opnfv.spaces %} @@ -36,6 +38,31 @@ opnfv: {% endif %} units: {{ lab.racks[0].nodes|count }} vip: +{% if opnfv.spaces_dict.mgmt is defined %} +{% if opnfv.spaces_dict.data is defined %} + ceilometer: {{ net_prefix }}24 {{ netpublic_prefix }}24 {{ netdata_prefix }}24 + cinder: {{ net_prefix }}29 {{ netpublic_prefix }}29 {{ netdata_prefix }}29 + dashboard: {{ net_prefix }}21 {{ netpublic_prefix }}21 {{ netdata_prefix }}21 + glance: {{ net_prefix }}22 {{ netpublic_prefix }}22 {{ netdata_prefix }}22 + heat: {{ net_prefix }}28 {{ netpublic_prefix }}28 {{ netdata_prefix }}28 + keystone: {{ net_prefix }}23 {{ netpublic_prefix }}23 {{ netdata_prefix }}23 + mysql: {{ net_prefix }}25 {{ netpublic_prefix }}25 {{ netdata_prefix }}25 + neutron: {{ net_prefix }}27 {{ netpublic_prefix }}27 {{ netdata_prefix }}27 + nova: {{ net_prefix }}26 {{ netpublic_prefix }}26 {{ netdata_prefix }}26 + rabbitmq: {{ net_prefix }}20 {{ netpublic_prefix }}20 {{ netdata_prefix }}20 +{% else %} + ceilometer: {{ net_prefix }}24 {{ netpublic_prefix }}24 + cinder: {{ net_prefix }}29 {{ netpublic_prefix }}29 + dashboard: {{ net_prefix }}21 {{ netpublic_prefix }}21 + glance: {{ net_prefix }}22 {{ netpublic_prefix }}22 + heat: {{ net_prefix }}28 {{ netpublic_prefix }}28 + keystone: {{ net_prefix }}23 {{ netpublic_prefix }}23 + mysql: {{ net_prefix }}25 {{ netpublic_prefix }}25 + neutron: {{ net_prefix }}27 {{ netpublic_prefix }}27 + nova: {{ net_prefix }}26 {{ netpublic_prefix }}26 + rabbitmq: {{ net_prefix }}20 {{ netpublic_prefix }}20 +{% endif %} +{% else %} ceilometer: {{ net_prefix }}24 cinder: {{ net_prefix }}29 dashboard: {{ net_prefix }}21 @@ -46,3 +73,4 @@ opnfv: neutron: {{ net_prefix }}27 nova: {{ net_prefix }}26 rabbitmq: {{ net_prefix }}20 +{% endif %} diff --git a/ci/genDeploymentConfig.py b/ci/genDeploymentConfig.py index 05aeb1f1..eecdd2f2 100644 --- a/ci/genDeploymentConfig.py +++ b/ci/genDeploymentConfig.py @@ -10,8 +10,10 @@ Parameters: from optparse import OptionParser from jinja2 import Environment, FileSystemLoader +from distutils.version import LooseVersion, StrictVersion import os import yaml +import subprocess # # Parse parameters @@ -27,7 +29,13 @@ labconfig_file = options.lab # # Capture our current directory -TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl' +jujuver = subprocess.check_output(["juju", "--version"]) + +if LooseVersion(jujuver) >= LooseVersion('2'): + TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2' +else: + TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl' + HOME = os.environ['HOME'] USER = os.environ['USER'] -- cgit 1.2.3-korg