summaryrefslogtreecommitdiffstats
path: root/ci/02-maasdeploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/02-maasdeploy.sh')
-rwxr-xr-xci/02-maasdeploy.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh
index e7155c26..72c2c615 100755
--- a/ci/02-maasdeploy.sh
+++ b/ci/02-maasdeploy.sh
@@ -25,17 +25,24 @@ case "$1" in
;;
* )
virtinstall=1
+ ./cleanvm.sh
cp maas/default/deployment.yaml ./deployment.yaml
;;
esac
+#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
+
#make sure no password asked during the deployment.
echo "$USER ALL=(ALL) NOPASSWD:ALL" > 90-joid-init
if [ -e /etc/sudoers.d/90-joid-init ]; then
sudo cp /etc/sudoers.d/90-joid-init 91-joid-init
- cat 90-joid-init >> 91-joid-init
+ sudo chown $USER:$USER 91-joid-init
+ sudo chmod 660 91-joid-init
+ sudo cat 90-joid-init >> 91-joid-init
sudo chown root:root 91-joid-init
sudo mv 91-joid-init /etc/sudoers.d/
else
@@ -52,7 +59,7 @@ fi
if [ ! -e /var/lib/libvirt/images ]; then
sudo apt-get install libvirt-bin -y
- sudo adduser ubuntu libvirtd
+ sudo adduser $USER libvirtd
sudo virsh pool-define-as default --type dir --target /var/lib/libvirt/images/
sudo virsh pool-start default
sudo virsh pool-autostart default
@@ -132,9 +139,12 @@ apikey=`grep maas-oauth: environments.yaml | cut -d "'" -f 2`
maas login maas http://${maas_ip}/MAAS/api/1.0 ${apikey}
maas maas boot-source update 1 url="http://maas.ubuntu.com/images/ephemeral-v2/daily/"
#maas maas boot-source-selections create 1 os="ubuntu" release="precise" arches="amd64" subarches="*" labels="*"
-maas maas boot-resources import
+maas maas node-groups import-boot-images
maas maas sshkeys new key="`cat $HOME/.ssh/id_rsa.pub`"
+#Added the Qtip public to run the Qtip test after install on bare metal nodes.
+maas maas sshkeys new key="`cat ./maas/sshkeys/QtipKey.pub`"
+
#adding compute and control nodes VM to MAAS for deployment purpose.
if [ "$virtinstall" -eq 1 ]; then
# create two more VMs to do the deployment.
@@ -179,9 +189,9 @@ case "$1" in
;;
'orangepod2' )
maas refresh
- enableautomodebyname eth1 DHCP "192.168.2.0/24" compute || true
+ enableautomodebyname eth4 DHCP "192.168.22.0/24" compute || true
enableautomodebyname eth5 AUTO "192.168.12.0/24" compute || true
- enableautomodebyname eth1 DHCP "192.168.2.0/24" control || true
+ enableautomodebyname eth2 DHCP "192.168.22.0/24" control || true
enableautomodebyname eth3 AUTO "192.168.12.0/24" control || true
;;
'attvirpod1' )