modfiied to have space support in the juju2 configuration. 91/26391/2
authorNarinder Gupta <narinder.gupta@canonical.com>
Wed, 21 Dec 2016 18:24:09 +0000 (12:24 -0600)
committerNarinder Gupta <narinder.gupta@canonical.com>
Wed, 21 Dec 2016 18:28:47 +0000 (12:28 -0600)
Change-Id: I2ccdee8604ef41ef79bb76eb9a165b1c02147d10
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
12 files changed:
ci/03-maasdeploy.sh
ci/config_tpl/juju2/bundle_tpl/aodh.yaml
ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
ci/config_tpl/juju2/bundle_tpl/ceph.yaml
ci/config_tpl/juju2/bundle_tpl/cinder.yaml
ci/config_tpl/juju2/bundle_tpl/congress.yaml
ci/config_tpl/juju2/bundle_tpl/glance.yaml
ci/config_tpl/juju2/bundle_tpl/heat.yaml
ci/config_tpl/juju2/bundle_tpl/keystone.yaml
ci/config_tpl/juju2/bundle_tpl/neutron-api.yaml
ci/config_tpl/juju2/bundle_tpl/neutron-gateway.yaml
ci/config_tpl/juju2/bundle_tpl/nova-cloud-controller.yaml

index 1e5fcf6..b7e684f 100755 (executable)
@@ -164,14 +164,14 @@ fi
 mkdir ~/joid_config/ || true
 mkdir ~/.juju/ || true
 
-sudo mkdir -p ~maas || true
-sudo chown maas:maas ~maas
-if [ ! -e ~maas/.ssh/id_rsa ]; then
-    sudo -u maas ssh-keygen -N '' -f ~maas/.ssh/id_rsa -y
+sudo mkdir -p ~/maas || true
+sudo chown maas:maas ~/maas
+if [ ! -e ~/maas/.ssh/id_rsa ]; then
+    sudo -u maas ssh-keygen -N '' -f ~/maas/.ssh/id_rsa -y
 fi
 
 # Ensure virsh can connect without ssh auth
-sudo cat ~maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
+sudo cat ~/maas/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
 sudo cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
 
 #
@@ -213,7 +213,7 @@ configuremaas(){
     maas $PROFILE tags create name='storage'
 }
 
-enablesubnetand dhcp(){
+enablesubnetanddhcp(){
 
     SUBNET_PREFIX="192.168.122"
     SUBNET_CIDR="($SUBNET_PREFIX).0/24"
@@ -243,7 +243,6 @@ enablesubnetand dhcp(){
     maas $PROFILE subnet update $SUBNET_CIDR gateway_ip=$MY_GATEWAY
     maas $PROFILE subnet update $SUBNET_CIDR dns_servers=$MY_NAMESERVER
 
-
 }
 
 ## derived from https://gist.github.com/epiloque/8cf512c6d64641bde388
@@ -458,6 +457,8 @@ if [ -e ./deployconfig.yaml ]; then
 
   # split EXTERNAL_NETWORK=first ip;last ip; gateway;network
 
+  maas maas spaces create internal "Using for pxe network within the lab"
+
   if [ "$datanet" != "''" ]; then
       EXTNET=(${enableiflist//,/ })
       i="0"
@@ -466,6 +467,8 @@ if [ -e ./deployconfig.yaml ]; then
           enableautomode ${EXTNET[i]} AUTO $datanet || true
           i=$[$i+1]
       done
+      maas maas spaces create admin "Using for admin network within the lab"
+
   fi
   if [ "$stornet" != "''" ]; then
       EXTNET=(${enableiflist//,/ })
@@ -484,6 +487,7 @@ if [ -e ./deployconfig.yaml ]; then
           enableautomode ${EXTNET[i]} AUTO $pubnet || true
           i=$[$i+1]
       done
+      maas maas spaces create public "Using for public network within the lab"
   fi
 fi
 
index ab5f6db..fc5f148 100644 (file)
@@ -1,6 +1,18 @@
     aodh:
       charm: "./{{ ubuntu.release }}/aodh"
       num_units: 1
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
       to:
index 2404810..6c3eec4 100644 (file)
@@ -6,6 +6,18 @@
     ceilometer:
       charm: "./{{ ubuntu.release }}/ceilometer"
       num_units: {{ unit_qty() }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}
index 412b966..63a95d9 100644 (file)
     ceph-radosgw:
       charm: "./{{ ubuntu.release }}/ceph-radosgw"
       num_units: {{ unit_qty() if os.beta.hacluster_ceph_radosgw else 1 }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         region: {{ os.region }}
         use-embedded-webserver: true
index dd541f7..18313cb 100644 (file)
@@ -4,6 +4,18 @@
       num_units: 1
 {% else %}
       num_units: {{ unit_qty() }}
+{% endif %}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
 {% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
index 07ae71c..8e75826 100644 (file)
@@ -1,6 +1,18 @@
     congress:
       charm: "./{{ ubuntu.release }}/congress"
       num_units: 1
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         region: {{ os.region }}
 {% if ubuntu.release == 'trusty' %}
index eb812e9..cf53548 100644 (file)
@@ -1,6 +1,18 @@
     glance:
       charm: "./{{ ubuntu.release }}/glance"
       num_units: {{ unit_qty() }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}
index aa676f1..f6f29ef 100644 (file)
@@ -1,6 +1,18 @@
     heat:
       charm: "./{{ ubuntu.release }}/heat"
       num_units: 1
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}
index 65c1f76..bbb2358 100644 (file)
@@ -1,11 +1,24 @@
     keystone:
       charm: "./{{ ubuntu.release }}/keystone"
       num_units: {{ unit_qty() }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}
         admin-role: {{ os.admin.role }}
         keystone-admin-role: {{ os.admin.role }}
+        preferred-api-version: 3
 {% if os.network.ipv6 %}
         prefer-ipv6: {{ os.network.ipv6 }}
 {% endif %}
index 420a0af..c7789d8 100644 (file)
@@ -1,6 +1,18 @@
     neutron-api:
       charm: "./{{ ubuntu.release }}/neutron-api"
       num_units: {{ unit_qty() }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}
index 2f9e9ab..c240cb7 100644 (file)
@@ -1,6 +1,18 @@
     neutron-gateway:
       charm: "./{{ ubuntu.release }}/neutron-gateway"
       num_units: 1
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
 {% if os.api.worker_multiplier %}
index 2a7f848..ef36ea7 100644 (file)
@@ -1,6 +1,18 @@
     nova-cloud-controller:
       charm: "./{{ ubuntu.release }}/nova-cloud-controller"
       num_units: {{ unit_qty() }}
+      bindings:
+        internal: internal
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin
+{% else %}
+        admin: internal
+{% endif %}
+{% if opnfv.spaces_dict.public is defined %}
+        public: public
+{% else %}
+        public: internal
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         region: {{ os.region }}