From 5fbb32535bb6456989407a946587b1bcbe94d0ee Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Mon, 9 Jan 2017 06:44:27 -0600 Subject: [PATCH] modified to made an option to support spaces as per JUJU 2.0 Change-Id: Id768aa396924a2f17b4f530749452ee1e41b20b2 Signed-off-by: Narinder Gupta --- ci/config_tpl/juju2/bundle_tpl/aodh.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/ceph.yaml | 14 +++++++++++++- ci/config_tpl/juju2/bundle_tpl/cinder.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/congress.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/glance.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/heat.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/keystone.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/neutron-ovs.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml | 2 ++ ci/config_tpl/juju2/bundle_tpl/rabbitmq.yaml | 4 ++++ ci/default_deployment_config.yaml | 1 + 14 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ci/config_tpl/juju2/bundle_tpl/aodh.yaml b/ci/config_tpl/juju2/bundle_tpl/aodh.yaml index fc5f148f..92617ea1 100644 --- a/ci/config_tpl/juju2/bundle_tpl/aodh.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/aodh.yaml @@ -1,6 +1,7 @@ aodh: charm: "./{{ ubuntu.release }}/aodh" num_units: 1 +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml index 6c3eec4b..554450f6 100644 --- a/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml @@ -6,6 +6,7 @@ ceilometer: charm: "./{{ ubuntu.release }}/ceilometer" num_units: {{ unit_qty() }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -17,6 +18,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml index 63a95d9b..16a3206d 100644 --- a/ci/config_tpl/juju2/bundle_tpl/ceph.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/ceph.yaml @@ -36,7 +36,11 @@ ceph-osd: charm: "./{{ ubuntu.release }}/ceph-osd" {% if os.hyperconverged %} +{% if opnfv.units >= 3 %} + num_units: {{ unit_ceph_qty() }} +{% else %} num_units: {{ opnfv.units }} +{% endif %} {% else %} num_units: 3 {% endif %} @@ -53,9 +57,15 @@ {% endif %} to: {% if os.hyperconverged %} -{% for unit_id in range(0, opnfv.units) %} +{% if opnfv.units >= 3 %} +{% for unit_id in range(0, 3) %} - "nodes/{{ unit_id }}" {% endfor %} +{% else %} + {% for unit_id in range(0, opnfv.units) %} + - "nodes/{{ unit_id }}" + {% endfor %} +{% endif %} {% else %} {% if os.ha.mode == 'ha' %} {% for unit_id in range(0, 3) %} @@ -70,6 +80,7 @@ ceph-radosgw: charm: "./{{ ubuntu.release }}/ceph-radosgw" num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -81,6 +92,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml index 18313cbb..82c15c38 100644 --- a/ci/config_tpl/juju2/bundle_tpl/cinder.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/cinder.yaml @@ -5,6 +5,7 @@ {% else %} num_units: {{ unit_qty() }} {% endif %} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -16,6 +17,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/congress.yaml b/ci/config_tpl/juju2/bundle_tpl/congress.yaml index 8e75826a..b57bf328 100644 --- a/ci/config_tpl/juju2/bundle_tpl/congress.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/congress.yaml @@ -1,6 +1,7 @@ congress: charm: "./{{ ubuntu.release }}/congress" num_units: 1 +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: region: {{ os.region }} diff --git a/ci/config_tpl/juju2/bundle_tpl/glance.yaml b/ci/config_tpl/juju2/bundle_tpl/glance.yaml index cf535486..e8eee7fd 100644 --- a/ci/config_tpl/juju2/bundle_tpl/glance.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/glance.yaml @@ -1,6 +1,7 @@ glance: charm: "./{{ ubuntu.release }}/glance" num_units: {{ unit_qty() }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/heat.yaml b/ci/config_tpl/juju2/bundle_tpl/heat.yaml index f6f29ef1..4af546d3 100644 --- a/ci/config_tpl/juju2/bundle_tpl/heat.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/heat.yaml @@ -1,6 +1,7 @@ heat: charm: "./{{ ubuntu.release }}/heat" num_units: 1 +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml index 5a8e16c1..c25f309b 100644 --- a/ci/config_tpl/juju2/bundle_tpl/keystone.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/keystone.yaml @@ -1,6 +1,7 @@ keystone: charm: "./{{ ubuntu.release }}/keystone" num_units: {{ unit_qty() }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml index c7789d82..863715d3 100644 --- a/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml @@ -1,6 +1,7 @@ neutron-api: charm: "./{{ ubuntu.release }}/neutron-api" num_units: {{ unit_qty() }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml index 16b4b1ca..cb459cc1 100644 --- a/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml @@ -2,8 +2,10 @@ charm: "./{{ ubuntu.release }}/neutron-gateway" num_units: 1 {% if opnfv.spaces_dict.data is defined %} +{% if os.service.bindings %} bindings: data: admin +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/neutron-ovs.yaml b/ci/config_tpl/juju2/bundle_tpl/neutron-ovs.yaml index 21155c49..7eb02534 100644 --- a/ci/config_tpl/juju2/bundle_tpl/neutron-ovs.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/neutron-ovs.yaml @@ -2,9 +2,11 @@ charm: ./{{ ubuntu.release }}/neutron-openvswitch options: {% if opnfv.spaces_dict.data is defined %} +{% if os.service.bindings %} bindings: data: admin {% endif %} +{% endif %} {% if os.network.dpdk %} enable-dpdk: true #dpdk-driver: uio_pci_generic diff --git a/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml b/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml index ef36ea78..e20e99a7 100644 --- a/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml @@ -1,6 +1,7 @@ nova-cloud-controller: charm: "./{{ ubuntu.release }}/nova-cloud-controller" num_units: {{ unit_qty() }} +{% if os.service.bindings %} bindings: internal: internal {% if opnfv.spaces_dict.data is defined %} @@ -12,6 +13,7 @@ public: public {% else %} public: internal +{% endif %} {% endif %} options: openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/config_tpl/juju2/bundle_tpl/rabbitmq.yaml b/ci/config_tpl/juju2/bundle_tpl/rabbitmq.yaml index daf9a13a..a9515202 100644 --- a/ci/config_tpl/juju2/bundle_tpl/rabbitmq.yaml +++ b/ci/config_tpl/juju2/bundle_tpl/rabbitmq.yaml @@ -1,6 +1,10 @@ rabbitmq-server: charm: "./{{ ubuntu.release }}/rabbitmq-server" num_units: {{ unit_qty() }} +{% if os.service.bindings %} + bindings: + amqp: internal +{% endif %} options: {% if opnfv.storage_dict.ceph is defined %} ceph-osd-replication-count: {{ unit_ceph_qty() }} diff --git a/ci/default_deployment_config.yaml b/ci/default_deployment_config.yaml index 887b0966..61bd9f04 100644 --- a/ci/default_deployment_config.yaml +++ b/ci/default_deployment_config.yaml @@ -30,5 +30,6 @@ os: service: congress: True promise: True + bindings: False kubernetes: loadbalancer: False -- 2.16.6