modified the disk 01/15101/3
authorNarinder Gupta <narinder.gupta@canonical.com>
Thu, 2 Jun 2016 15:02:10 +0000 (10:02 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Thu, 2 Jun 2016 16:29:53 +0000 (11:29 -0500)
Change-Id: I6a153b5cdb02e29650d454ca262856a4c775d6a5
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/01-deploybundle.sh
ci/02-maasdeploy.sh
ci/deploy.py
labconfig/intel/pod5/labconfig.yaml
labconfig/intel/pod6/labconfig.yaml

index e46d0c1..5ab56eb 100755 (executable)
@@ -31,16 +31,20 @@ esac
 
 #read the value from deployment.yaml
 if [ -e ~/.juju/deployment.yaml ]; then
-   extport=`grep "ext-port" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+
+   cp ~/.juju/deployment.yaml ./deployment.yaml
+   cp ~/.juju/deployconfig.yaml ./deployconfig.yaml
+
+   extport=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
    sed --i "s@#ext-port: \"eth1\"@ext-port: \"$extport\"@g" ./bundles.yaml
 
-   datanet=`grep "dataNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+   datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
    sed --i "s@#os-data-network: 10.4.8.0/21@os-data-network: $datanet@g" ./bundles.yaml
 
-   admnet=`grep "admNetwork" deployment.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+   admnet=`grep "admNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
    sed --i "s@10.4.1.1@$admnet@g" ./bundles.yaml
 
-   cephdisk=`grep "disk" deployment.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
+   cephdisk=`grep "disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
    sed --i "s@osd-devices: /srv@osd-devices: $cephdisk@g" ./bundles.yaml
 fi
 
index 4aa9199..4d3fdb0 100755 (executable)
@@ -183,6 +183,7 @@ sed --i "s@/home/ubuntu@$HOME@g" ./deployment.yaml
 sed --i "s@qemu+ssh://ubuntu@qemu+ssh://$USER@g" ./deployment.yaml
 
 cp ./deployment.yaml ~/.juju/
+cp ./deployconfig.yaml ~/.juju/
 
 sudo maas-deployer -c deployment.yaml -d --force
 
index cef5d26..fffe1bd 100644 (file)
@@ -18,6 +18,7 @@ with open('labconfig.yaml', 'r') as labf:
     labcfg = yaml.load(labf)
 
 opnfvcfg={}
+opnfvlabcfg={}
 
 def getFromDict(dataDict, mapList):
     return reduce(lambda d, k: d[k], mapList, dataDict)
@@ -52,7 +53,7 @@ opnfvcfg['demo-maas']={'juju-bootstrap':{'memory': 4096,'name': "bootstrap",\
                               }\
                       }
 
-opnfvcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':'','ceph-disk':'/srv/'}
+opnfvlabcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':'','ceph-disk':'/srv/'}
 
 opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:maas/stable")
 opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:juju/stable")
@@ -85,7 +86,7 @@ while c < len(labcfg["opnfv"]["spaces"]):
         ethbrAdmin = getFromDict(labcfg, ["opnfv","spaces",c,"bridge"])
         brgway = getFromDict(labcfg, ["opnfv","spaces",c,"gateway"])
         tmpcidr = brcidr[:-4]
-        opnfvcfg["opnfv"]["admNetwork"]=tmpcidr+"2"
+        opnfvlabcfg["opnfv"]["admNetwork"]=tmpcidr+"2"
 
         nodegroup={"device": "eth"+str(y), "ip": tmpcidr+"5","subnet_mask": "255.255.255.0", \
                    "broadcast_ip": tmpcidr+"255", "router_ip": brgway,\
@@ -139,7 +140,7 @@ while c < len(labcfg["opnfv"]["spaces"]):
                         '    netmask 255.255.255.0\n')
             opnfvcfg["demo-maas"]["juju-bootstrap"]["interfaces"].append("bridge="+brname+",model=virtio")
         if brtype == "data":
-            opnfvcfg["opnfv"]["dataNetwork"]=brcidr
+            opnfvlabcfg["opnfv"]["dataNetwork"]=brcidr
 
     c=c+1
 
@@ -200,10 +201,12 @@ while c < len(labcfg["lab"]["racks"][0]["nodes"]):
 
     c=c+1
 
-opnfvcfg["opnfv"]["floating-ip-range"]=labcfg["lab"]["racks"][0]["floating-ip-range"]
-opnfvcfg["opnfv"]["ext-port"]=labcfg["lab"]["racks"][0]["ext-port"]
-opnfvcfg["opnfv"]["ceph-disk"]=labcfg["opnfv"]["storage"][0]["disk"]
+opnfvlabcfg["opnfv"]["floating-ip-range"]=labcfg["lab"]["racks"][0]["floating-ip-range"]
+opnfvlabcfg["opnfv"]["ext-port"]=labcfg["lab"]["racks"][0]["ext-port"]
+opnfvlabcfg["opnfv"]["ceph-disk"]=labcfg["opnfv"]["storage"][0]["disk"]
 
 with open('deployment.yaml', 'wa') as opnfvf:
    yaml.dump(opnfvcfg, opnfvf, default_flow_style=False)
 
+with open('deployconfig.yaml', 'wa') as opnfvf:
+   yaml.dump(opnfvlabcfg, opnfvf, default_flow_style=False)
index f671a24..63775c3 100644 (file)
@@ -26,8 +26,8 @@ lab:
         spaces: [admin]
         mac: ["00:1E:67:CF:B8:93"]
       - ifname: eth4
-         spaces: [data]
-         mac: ["90:E2:BA:84:08:B8"]
+        spaces: [data]
+        mac: ["90:E2:BA:84:08:B8"]
       power:
         type: ipmi
         address: 10.2.117.82
index a105133..58b8af6 100644 (file)
@@ -90,7 +90,7 @@ opnfv:
   - type: nosdn
   storage:
   - type: ceph
-  disk: /srv
+    disk: /srv
   feature: odl_l2
   spaces:
   - type: admin