summaryrefslogtreecommitdiffstats
path: root/ci/01-deploybundle.sh
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-06-02 01:59:09 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-06-02 02:05:08 -0500
commit53447be957517322501caf7c2d441693c350d73f (patch)
tree47d037e4a34e1af63bf008898795b58c1d98c99d /ci/01-deploybundle.sh
parentcceaaac23491b76e3e095dcb44e3e03c3d6247d0 (diff)
remove the ext-port and data network dependency on the labs.
All data will be captured from labconfig.yaml Change-Id: I11a2431b3896a65dc74cc0423a1b03050ef16146 Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/01-deploybundle.sh')
-rwxr-xr-xci/01-deploybundle.sh54
1 files changed, 12 insertions, 42 deletions
diff --git a/ci/01-deploybundle.sh b/ci/01-deploybundle.sh
index 90724096..22eea3f8 100755
--- a/ci/01-deploybundle.sh
+++ b/ci/01-deploybundle.sh
@@ -29,27 +29,17 @@ case "$1" in
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/ //'`
+ sed --i "s@#ext-port: \"eth1\"@ext-port: \"$extport\"@g" ./bundles.yaml
+ datanet=`grep "dataNetwork" deployment.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/ //'`
+ sed --i "s@10.4.1.1@$admnet@g" ./bundles.yaml
+fi
+
case "$3" in
- 'orangepod1' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/192.168.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.11.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
- # Use host for public API for Orange pod2
- # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
- ;;
- 'orangepod2' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/192.168.2.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 192.168.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth1"/g' ./bundles.yaml
- # Use host for public API for Orange pod2
- # sed -i -- 's/#os-public-hostname: api.public-fqdn/os-public-hostname: api.pod2.opnfv.fr/g' ./bundles.yaml
- ;;
'intelpod9' )
# As per your lab vip address list be deafult uses 10.9.1.11 - 10.9.1.20
sed -i -- 's/10.4.1.1/10.9.1.2/g' ./bundles.yaml
@@ -60,26 +50,6 @@ case "$3" in
# Provide the gateway MAC to route the traffic externally.
sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
;;
- 'intelpod6' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/10.6.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.6.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
- # Provide the gateway MAC to route the traffic externally.
- sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
- ;;
- 'intelpod5' )
- # As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
- sed -i -- 's/10.4.1.1/10.5.1.2/g' ./bundles.yaml
- # choose the correct interface to use for data network
- sed -i -- 's/#os-data-network: 10.4.8.0\/21/os-data-network: 10.5.12.0\/24/g' ./bundles.yaml
- # Choose the external port to go out from gateway to use.
- sed -i -- 's/#ext-port: "eth1"/ext-port: "eth5"/g' ./bundles.yaml
- # Provide the gateway MAC to route the traffic externally.
- sed -i -- 's/#gateway-mac: "default"/gateway-mac: "default"/g' ./bundles.yaml
- ;;
'attvirpod1' )
# As per your lab vip address list be deafult uses 10.4.1.11 - 10.4.1.20
sed -i -- 's/10.4.1.1/192.168.10.1/g' ./bundles.yaml
@@ -164,6 +134,6 @@ case "$6" in
esac
echo "... Deployment Started ...."
- juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
- juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"
+ juju-deployer -vW -d -t 3600 -c bundles.yaml $6-"$2"-nodes
+ juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $6-"$2"