diff options
Diffstat (limited to 'ci/02-maasdeploy.sh')
-rwxr-xr-x | ci/02-maasdeploy.sh | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index d56cd9f0..2df7c0a8 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -4,10 +4,16 @@ set -ex case "$1" in 'intelpod5' ) - cp intel/pod5/maas/deployment.yaml ./deployment.yaml + cp maas/intel/pod5/deployment.yaml ./deployment.yaml + ;; + 'intelpod6' ) + cp maas/intel/pod6/deployment.yaml ./deployment.yaml + ;; + 'orangepod2' ) + cp maas/orange/pod2/deployment.yaml ./deployment.yaml ;; * ) - cp intel/pod5/maas/deployment.yaml ./deployment.yaml + cp maas/intel/pod5/deployment.yaml ./deployment.yaml ;; esac @@ -15,11 +21,29 @@ echo "... Deployment of maas Started ...." sudo apt-add-repository ppa:maas-deployers/stable -y sudo apt-get update -y sudo apt-get install maas-deployer -y + if [ ! -e /home/ubuntu/.ssh/id_rsa ]; then ssh-keygen -N '' -f /home/ubuntu/.ssh/id_rsa fi sudo adduser ubuntu libvirtd -cat /home/ubuntu/.ssh/id_rsa.pub > /home/ubuntu/.ssh/authorized_keys + +if [ ! 'virsh pool-list | grep default' ]; then + + virsh pool-define /dev/stdin <<EOF +<pool type='dir'> + <name>default</name> + <target> + <path>/var/lib/libvirt/images</path> + </target> +</pool> +EOF + + virsh pool-start default + virsh pool-autostart default + +fi + +cat /home/ubuntu/.ssh/id_rsa.pub >> /home/ubuntu/.ssh/authorized_keys maas-deployer -c deployment.yaml -d --force echo "... Deployment of maas finish ...." |