Update your cloud

This is how I update my cloud.

Link to the youtube video: https://youtu.be/_AEU0vedekE

Here is what my update.sh script looks like, put this one on MAAS in the home directory:

#!/bin/bash

sudo apt-get update

sudo apt-get upgrade -y

export JUJU_HOME=~/.cloud-install/juju

juju ssh 0/lxc/0 sudo apt-get update

juju ssh 0/lxc/0 sudo apt-get upgrade -y

juju ssh 0/lxc/1 sudo apt-get update

juju ssh 0/lxc/1 sudo apt-get upgrade -y

juju ssh 0/lxc/2 sudo apt-get update

juju ssh 0/lxc/2 sudo apt-get upgrade -y

juju ssh 0/lxc/3 sudo apt-get update

juju ssh 0/lxc/3 sudo apt-get upgrade -y

juju ssh 0/lxc/4 sudo apt-get update

juju ssh 0/lxc/4 sudo apt-get upgrade -y

juju ssh 0/lxc/5 sudo apt-get update

juju ssh 0/lxc/5 sudo apt-get upgrade -y

juju ssh 0 sudo apt-get update

juju ssh 0 sudo apt-get upgrade -y


juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash' './update2.sh'


juju ssh 0 sudo reboot now


Here is what my update2.sh looks like, put this one on the landscape node in the home directory:

#!/bin/bash
juju ssh 0 sudo apt-get update

juju ssh 0 sudo apt-get upgrade -y

juju ssh 1 sudo apt-get update

juju ssh 1 sudo apt-get upgrade -y

juju ssh 2 sudo apt-get update

juju ssh 2 sudo apt-get upgrade -y

juju ssh 3 sudo apt-get update

juju ssh 3 sudo apt-get upgrade -y

juju ssh 4 sudo apt-get update

juju ssh 4 sudo apt-get upgrade -y

juju ssh 0/lxc/0 sudo apt-get update

juju ssh 0/lxc/0 sudo apt-get upgrade -y

juju ssh 0/lxc/1 sudo apt-get update

juju ssh 0/lxc/1 sudo apt-get upgrade -y

juju ssh 1/lxc/0 sudo apt-get update

juju ssh 1/lxc/0 sudo apt-get upgrade -y

juju ssh 1/lxc/1 sudo apt-get update

juju ssh 1/lxc/1 sudo apt-get upgrade -y

juju ssh 2/lxc/0 sudo apt-get update

juju ssh 2/lxc/0 sudo apt-get upgrade -y

juju ssh 2/lxc/1 sudo apt-get update

juju ssh 2/lxc/1 sudo apt-get upgrade -y

juju ssh 3/lxc/0 sudo apt-get update

juju ssh 3/lxc/0 sudo apt-get upgrade -y

juju ssh 3/lxc/1 sudo apt-get update

juju ssh 3/lxc/1 sudo apt-get upgrade -y

juju ssh 4/lxc/0 sudo apt-get update

juju ssh 4/lxc/0 sudo apt-get upgrade -y

juju ssh 4/lxc/1 sudo apt-get update

juju ssh 4/lxc/1 sudo apt-get upgrade -y

juju ssh 3 sudo reboot now

juju ssh 1 sudo reboot now

juju ssh 2 sudo reboot now

juju ssh 4 sudo reboot now

juju ssh 0 sudo reboot now

exit



Restart down compute node service:
sudo service nova-compute restart

Restart l3 agent, if you get an error when trying to restart the L3 agent run sudo apt install neutron-l3-agent

sudo service neutron-l3-agent restart

Restart DHCP serivce:
sudo service neutron-dhcp-agent


Comments