summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/01-deploybundle.sh12
-rwxr-xr-xci/02-maasdeploy.sh1
-rw-r--r--ci/deploy.py15
3 files changed, 18 insertions, 10 deletions
diff --git a/ci/01-deploybundle.sh b/ci/01-deploybundle.sh
index e46d0c11..5ab56eb6 100755
--- a/ci/01-deploybundle.sh
+++ b/ci/01-deploybundle.sh
@@ -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
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh
index 4aa9199b..4d3fdb03 100755
--- a/ci/02-maasdeploy.sh
+++ b/ci/02-maasdeploy.sh
@@ -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
diff --git a/ci/deploy.py b/ci/deploy.py
index cef5d265..fffe1bdc 100644
--- a/ci/deploy.py
+++ b/ci/deploy.py
@@ -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)