X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2F02-maasdeploy.sh;h=839d29f4efadbde2107d414634d18d2a9d7aca72;hb=aca4784eacb9b27e8640b90af3edbebea96aa39f;hp=ca7653993f43a4475a060688d109a007d547e11a;hpb=8dd980414fa15ae9f724213338f9c190917cf749;p=joid.git diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index ca765399..839d29f4 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -14,8 +14,6 @@ sudo apt-get update -y sudo apt-get dist-upgrade -y sudo apt-get install openssh-server git maas-deployer juju juju-deployer maas-cli python-pip python-openstackclient gsutil -y -cp maas/deployment.yaml ./deployment.yaml - #first parameter should be custom and second should be either # absolute location of file (including file name) or url of the # file to download. @@ -40,7 +38,7 @@ if [ "$1" == "custom" ]; then cp ../labconfig/default/deployment.yaml ./ cp ../labconfig/default/labconfig.yaml ./ fi - labname=`grep "lab_location" labconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` + labname=`grep "maas_name" deployment.yaml | cut -d ':' -f 2 | sed -e 's/ //'` else case "$1" in 'intelpod5' ) @@ -59,13 +57,19 @@ else python deploy.py ;; 'orangepod1' ) - cp maas/orange/pod1/deployment.yaml ./deployment.yaml + cp ../labconfig/orange/pod1/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py ;; 'orangepod2' ) - cp maas/orange/pod2/deployment.yaml ./deployment.yaml + cp ../labconfig/orange/pod1/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py ;; 'attvirpod1' ) - cp maas/att/virpod1/deployment.yaml ./deployment.yaml + cp ../labconfig/att/virpod1/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py ;; 'juniperpod1' ) cp maas/juniper/pod1/deployment.yaml ./deployment.yaml @@ -75,7 +79,7 @@ else ;; * ) virtinstall=1 - labname = "default" + labname="default" ./cleanvm.sh cp ../labconfig/default/deployment.yaml ./ ;; @@ -176,13 +180,16 @@ crnodevlanint() { done } -#convert labconfig file to deployment.yaml to consume by MAAS. -#python deploy.py - #just make sure the ssh keys added into maas for the current user 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/ + +if [ -e ./deployconfig.yaml ]; then + cp ./deployconfig.yaml ~/.juju/ +fi + sudo maas-deployer -c deployment.yaml -d --force sudo chown $USER:$USER environments.yaml @@ -234,13 +241,11 @@ fi case "$labname" in 'intelpod5' ) maas refresh - enableautomodebyname eth4 AUTO "10.5.12.0/24" compute || true - enableautomodebyname eth4 AUTO "10.5.12.0/24" control || true + enableautomode eth4 AUTO "10.5.12.0/24" || true ;; 'intelpod6' ) maas refresh - enableautomodebyname eth4 AUTO "10.6.12.0/24" compute || true - enableautomodebyname eth4 AUTO "10.6.12.0/24" control || true + enableautomode eth4 AUTO "10.6.12.0/24" || true ;; 'intelpod9' ) maas refresh @@ -255,20 +260,18 @@ case "$labname" in ;; 'orangepod1' ) maas refresh - enableautomodebyname eth2 DHCP "192.168.21.0/24" compute || true - enableautomodebyname eth3 AUTO "192.168.11.0/24" compute || true - enableautomodebyname eth2 DHCP "192.168.21.0/24" control || true - enableautomodebyname eth3 AUTO "192.168.11.0/24" control || true + enableautomode eth2 DHCP "192.168.21.0/24" || true + enableautomode eth3 AUTO "192.168.11.0/24" || true ;; 'orangepod2' ) maas refresh - enableautomodebyname eth4 DHCP "192.168.22.0/24" compute || true - enableautomodebyname eth5 AUTO "192.168.12.0/24" compute || true - enableautomodebyname eth2 DHCP "192.168.22.0/24" control || true - enableautomodebyname eth3 AUTO "192.168.12.0/24" control || true + enableautomode eth4 DHCP "192.168.22.0/24" || true + enableautomode eth2 DHCP "192.168.22.0/24" || true + enableautomode eth5 AUTO "192.168.12.0/24" || true + enableautomode eth3 AUTO "192.168.12.0/24" || true ;; 'attvirpod1' ) - enableautomodebyname eth1 AUTO "192.168.10.0/24" control || true + enableautomode eth1 AUTO "192.168.10.0/24" || true ;; 'juniperpod1' ) ;;