modfiied to take care of using juju 2.1-beta4. Will switch once 29/28029/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Sat, 4 Feb 2017 11:04:28 +0000 (05:04 -0600)
committerNarinder Gupta <narinder.gupta@canonical.com>
Sat, 4 Feb 2017 11:04:28 +0000 (05:04 -0600)
get the final confirmation of release.

Change-Id: Id5964a5fd458df9c0486051dd3c6fbbd2abaa7bd
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/03-maasdeploy.sh
ci/config_tpl/juju2/bundle_tpl/ceilometer.yaml
ci/config_tpl/juju2/bundle_tpl/odl.yaml
ci/config_tpl/juju2/bundle_tpl/openstack-dashboard.yaml
ci/config_tpl/juju2/bundle_tpl/opnfv-promise.yaml
labconfig/huawei/pod12/labconfig.yaml

index 2dd0c26..425116c 100755 (executable)
@@ -10,16 +10,19 @@ if [ ! -e $HOME/.ssh/id_rsa ]; then
 fi
 
 #install the packages needed
-sudo apt-add-repository ppa:juju/stable -y
+sudo apt-add-repository ppa:juju/dev -y
 sudo apt-add-repository ppa:maas/stable -y
 sudo apt-add-repository cloud-archive:newton -y
 sudo apt-get update -y
-sudo apt-get dist-upgrade -y
-sudo apt-get install openssh-server bzr git juju virtinst qemu-kvm libvirt-bin \
+#sudo apt-get dist-upgrade -y
+sudo apt-get install openssh-server bzr git virtinst qemu-kvm libvirt-bin \
              maas maas-region-controller python-pip python-psutil python-openstackclient \
              python-congressclient gsutil charm-tools pastebinit python-jinja2 sshpass \
              openssh-server vlan ipmitool jq -y
 
+wget https://launchpad.net/~juju/+archive/ubuntu/devel/+files/juju-2.0_2.1~beta4-0ubuntu1~16.04.1~juju1_amd64.deb
+sudo dpkg -i juju-2.0_2.1~beta4-0ubuntu1~16.04.1~juju1_amd64.deb
+
 sudo pip install --upgrade pip
 
 #first parameter should be custom and second should be either
@@ -320,7 +323,7 @@ addnodes(){
     done
 
     if [ "$virtinstall" -eq 1 ]; then
-        ntew=virbr0
+        ntew=" --network bridge=virbr0,model=virtio"
     else
         brid=`brctl show | grep 8000 | cut -d "8" -f 1 |  tr "\n" " " | tr "\t" " " | tr -s " "`
 
@@ -328,6 +331,8 @@ addnodes(){
         for feature in $brid; do
             if [ "$feature" == "" ]; then
                 netw=$netw
+            elif [ "$feature" == "virbr0" ]; then
+                netw=$netw
             else
                 netw=$netw" --network bridge="$feature",model=virtio"
             fi
@@ -338,11 +343,12 @@ addnodes(){
                  cirrus --arch x86_64 --disk size=20,format=qcow2,bus=virtio,io=native,pool=default \
                  $netw --boot network,hd,menu=off --noautoconsole \
                  --vnc --print-xml | tee bootstrap
+
     if [ "$virtinstall" -eq 1 ]; then
         bootstrapmac=`grep  "mac address" bootstrap | head -1 | cut -d '"' -f 2`
     else
         bootstrapmac=""
-        bootstrapmacs=`grep  "mac address" bootstrap| cut -d "'" -f 2`
+        bootstrapmacs=`grep  "mac address" bootstrap| cut -d '"' -f 2`
         for mac in $bootstrapmacs; do
             bootstrapmac=$bootstrapmac" mac_addresses="$mac
         done
@@ -353,6 +359,7 @@ addnodes(){
         tags='bootstrap' hostname='bootstrap' power_type='virsh' mac_addresses=$bootstrapmac \
         power_parameters_power_address='qemu+ssh://'$USER'@'$MAAS_IP'/system' \
         architecture='amd64/generic' power_parameters_power_id='bootstrap'
+
     bootstrapid=$(maas $PROFILE machines read | jq -r 'select(.[].hostname == "bootstrap")[0].system_id')
 
     maas $PROFILE tag update-nodes bootstrap add=$bootstrapid
@@ -361,18 +368,15 @@ addnodes(){
 
         sudo virt-install --connect qemu:///system --name node1-control --ram 8192 --cpu host --vcpus 4 \
                      --disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
-                     --network bridge=virbr0,model=virtio $netw \
-                     --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node1-control
+                     $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node1-control
 
         sudo virt-install --connect qemu:///system --name node2-compute --ram 8192 --cpu host --vcpus 4 \
                     --disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
-                    --network bridge=virbr0,model=virtio $netw \
-                    --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node2-compute
+                    $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node2-compute
 
         sudo virt-install --connect qemu:///system --name node5-compute --ram 8192 --cpu host --vcpus 4 \
                    --disk size=120,format=qcow2,bus=virtio,io=native,pool=default \
-                   --network bridge=virbr0,model=virtio $netw \
-                   --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node5-compute
+                   $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee node5-compute
 
 
         node1controlmac=`grep  "mac address" node1-control | head -1 | cut -d '"' -f 2`
@@ -410,8 +414,12 @@ configuremaas
 if [ "$virtinstall" -eq 1 ]; then
     enablesubnetanddhcp
 fi
+
+# lets sleep for around 5 more minutes to make sure all images are in sync.
+sleep(300)
+
+#lets add the nodes now. Currently works only for virtual deploymnet.
 addnodes
-#sudo chown $USER:$USER environments.yaml
 
 echo "... Deployment of maas finish ...."
 
index 644de69..1cfa1e4 100644 (file)
@@ -1,6 +1,22 @@
     mongodb:
       charm: ./{{ ubuntu.release }}/mongodb
       num_units: 1
+{% if os.service.bindings %}
+      bindings:
+        shared-db: internal-api
+        internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+        public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin-api
+{% else %}
+        admin: internal-api
+{% endif %}
+{% else %}
+        admin: internal-api
+        public: internal-api
+{% endif %}
+{% endif %}
       to:
         - "lxd:nodes/0"
     ceilometer:
index 27e22cb..2be64b1 100644 (file)
@@ -1,6 +1,22 @@
     odl-controller:
       charm: ./{{ ubuntu.release }}/odl-controller
       num_units: 1
+{% if os.service.bindings %}
+      bindings:
+        shared-db: internal-api
+        internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+        public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin-api
+{% else %}
+        admin: internal-api
+{% endif %}
+{% else %}
+        admin: internal-api
+        public: internal-api
+{% endif %}
+{% endif %}
       options:
         install-url: "https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.5.2-Boron-SR2/distribution-karaf-0.5.2-Boron-SR2.tar.gz"
 {% if os.network.sfc %}
index aef9260..28ad55c 100644 (file)
@@ -1,6 +1,22 @@
     openstack-dashboard:
       charm: "./{{ ubuntu.release }}/openstack-dashboard"
       num_units: {{ unit_qty() }}
+{% if os.service.bindings %}
+      bindings:
+        shared-db: internal-api
+        internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+        public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin-api
+{% else %}
+        admin: internal-api
+{% endif %}
+{% else %}
+        admin: internal-api
+        public: internal-api
+{% endif %}
+{% endif %}
       options:
         openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}"
         secret: admin
index d237287..92bf37d 100644 (file)
@@ -1,6 +1,22 @@
     opnfv-promise:
       charm: ./{{ ubuntu.release }}/promise
       num_units: 1
+{% if os.service.bindings %}
+      bindings:
+        shared-db: internal-api
+        internal: internal-api
+{% if opnfv.spaces_dict.public is defined %}
+        public: public-api
+{% if opnfv.spaces_dict.data is defined %}
+        admin: admin-api
+{% else %}
+        admin: internal-api
+{% endif %}
+{% else %}
+        admin: internal-api
+        public: internal-api
+{% endif %}
+{% endif %}
       to:
         - "lxd:nodes/0"
 {# Empty block to avoid bad block trim #}
index 1d3da94..d10069f 100644 (file)
@@ -107,7 +107,7 @@ opnfv:
   - type: nosdn
   storage:
   - type: ceph
-    disk: /srv
+    disk: /dev/sdb
   feature: odl_l2
   spaces:
   - type: admin