summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2015-09-30 16:14:54 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2015-09-30 16:14:54 -0500
commitf3c28248e67eeec3a871844e7d528446421e5507 (patch)
treef2eceebe4f7f6cb1ee4246f032be36d1e11e2821 /ci
parentd63001c410ec8502802c6f2be9edd70fb102ac75 (diff)
to create default pool in virsh
Change-Id: I13c94a371e85f12aac12c751fcd5723490efad66
Diffstat (limited to 'ci')
-rwxr-xr-xci/02-maasdeploy.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh
index 2df7c0a8..d8afb0c5 100755
--- a/ci/02-maasdeploy.sh
+++ b/ci/02-maasdeploy.sh
@@ -18,16 +18,15 @@ case "$1" in
esac
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
+if [ ! -e $HOME/.ssh/id_rsa ]; then
+ ssh-keygen -N '' -f $HOME/.ssh/id_rsa
fi
-sudo adduser ubuntu libvirtd
-if [ ! 'virsh pool-list | grep default' ]; then
+if [ ! -e /var/lib/libvirt/images ]; then
+
+ sudo apt-get install libvirt-bin -y
+ sudo adduser ubuntu libvirtd
virsh pool-define /dev/stdin <<EOF
<pool type='dir'>
@@ -43,7 +42,11 @@ EOF
fi
-cat /home/ubuntu/.ssh/id_rsa.pub >> /home/ubuntu/.ssh/authorized_keys
+sudo apt-add-repository ppa:maas-deployers/stable -y
+sudo apt-get update -y
+sudo apt-get install maas-deployer -y
+
+cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
maas-deployer -c deployment.yaml -d --force
echo "... Deployment of maas finish ...."