diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-05-18 00:47:50 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-05-18 00:49:21 -0500 |
commit | 91cac14de17bfe686d8872c3c4548ac4b5f673ca (patch) | |
tree | b20f90f1ab4d7896addb841bb3fce8b7e557e89f /ci/02-maasdeploy.sh | |
parent | d539072595e3227a011407a88fa9e606045a4eb6 (diff) |
modified all intel lab labconfig
Change-Id: I79a80255cac4355bc1ec39348e31913c748f9fcc
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/02-maasdeploy.sh')
-rwxr-xr-x | ci/02-maasdeploy.sh | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index 32679f12..f40631e5 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -3,6 +3,7 @@ set -ex virtinstall=0 +labname = $1 #install the packages needed sudo apt-add-repository ppa:maas-deployers/stable -y @@ -36,53 +37,51 @@ if [ "$1" == "custom" ]; then if [ ! -e ./labconfig.yaml ]; then virtinstall=1 + cp ../labconfig/default/deployment.yaml ./ cp ../labconfig/default/labconfig.yaml ./ - python deploy.py fi + labname=`grep "lab_location" labconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` +else + case "$1" in + 'intelpod5' ) + cp ../labconfig/intel/pod5/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py + ;; + 'intelpod6' ) + cp ../labconfig/intel/pod6/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py + ;; + 'intelpod9' ) + cp ../labconfig/intel/pod6/labconfig.yaml ./ + #to be removed later once converted for all labs. + python deploy.py + ;; + 'orangepod1' ) + cp maas/orange/pod1/deployment.yaml ./deployment.yaml + ;; + 'orangepod2' ) + cp maas/orange/pod2/deployment.yaml ./deployment.yaml + ;; + 'attvirpod1' ) + cp maas/att/virpod1/deployment.yaml ./deployment.yaml + ;; + 'juniperpod1' ) + cp maas/juniper/pod1/deployment.yaml ./deployment.yaml + ;; + 'cengnlynxpod1' ) + cp maas/cengn_lynx/pod1/deployment.yaml ./deployment.yaml + ;; + * ) + virtinstall=1 + labname = "default" + ./cleanvm.sh + cp ../labconfig/default/deployment.yaml ./ + ;; + esac fi -case "$1" in - 'intelpod5' ) - cp ../labconfig/intel/pod5/labconfig.yaml ./ - #to be removed later once converted for all labs. - python deploy.py - ;; - 'intelpod6' ) - cp ../labconfig/intel/pod6/labconfig.yaml ./ - #to be removed later once converted for all labs. - python deploy.py - ;; - 'intelpod9' ) - cp ../labconfig/intel/pod6/labconfig.yaml ./ - #to be removed later once converted for all labs. - python deploy.py - ;; - 'orangepod1' ) - cp maas/orange/pod1/deployment.yaml ./deployment.yaml - ;; - 'orangepod2' ) - cp maas/orange/pod2/deployment.yaml ./deployment.yaml - ;; - 'attvirpod1' ) - cp maas/att/virpod1/deployment.yaml ./deployment.yaml - ;; - 'juniperpod1' ) - cp maas/juniper/pod1/deployment.yaml ./deployment.yaml - ;; - 'cengnlynxpod1' ) - cp maas/cengn_lynx/pod1/deployment.yaml ./deployment.yaml - ;; - 'custom' ) - cp maas/custom/deployment.yaml ./deployment.yaml - ;; - * ) - virtinstall=1 - ./cleanvm.sh - cp maas/default/deployment.yaml ./deployment.yaml - ;; -esac - - #make sure no password asked during the deployment. echo "$USER ALL=(ALL) NOPASSWD:ALL" > 90-joid-init @@ -232,7 +231,7 @@ if [ "$virtinstall" -eq 1 ]; then fi # Enable vlan interfaces with maas -case "$1" in +case "$labname" in 'intelpod5' ) maas refresh enableautomodebyname eth4 AUTO "10.5.12.0/24" compute || true |