From d8d40f184ce5538ba4912aae8c86efe59bba7ddd Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 22 Sep 2017 05:09:33 -0400 Subject: [PATCH] add cumulus upgrade doc --- .../onie_switches/os_cumulus/index.rst | 1 + .../onie_switches/os_cumulus/install.rst | 2 + .../onie_switches/os_cumulus/upgrade.rst | 62 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 docs/source/advanced/networks/onie_switches/os_cumulus/upgrade.rst diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst index d2b369957..82f0e4e38 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst @@ -10,3 +10,4 @@ This documentation will focus on installing the Cumulus Network Operating System prepare.rst install.rst manage.rst + upgrade.rst diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst index e0d132dfb..8915d02af 100644 --- a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst @@ -78,6 +78,8 @@ Validate the ssh keys are correctly configured by running a ``xdsh`` command: :: xdsh frame01sw1 uptime +.. _activate-the-license: + Activate the License -------------------- diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/upgrade.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/upgrade.rst new file mode 100644 index 000000000..da079129c --- /dev/null +++ b/docs/source/advanced/networks/onie_switches/os_cumulus/upgrade.rst @@ -0,0 +1,62 @@ +Cumulus OS upgrade +================== + +The Cumulus OS on the ONIE switches can be upgraded in 2 ways: + +* Upgrade only the changed packages, using ``apt-get update`` and ``apt-get upgrade``. If the ONIE switches has internet access, this is the preferred method, otherwise, you need to build up a local cumulus mirror in the cluster. + + Since in a typical cluster setup, the switches usually do not have internet access, you can create a local mirror on the server which has internet access and can be reached from the switches, the steps are :: + + mkdir -p /install/mirror/cumulus + cd /install/mirror/cumulus + #the wget might take a long time, it will be better if you can set up + #a cron job to sync the local mirror with upstream + wget -m --no-parent http://repo3.cumulusnetworks.com/repo/ + + then compose a ``sources.list`` file on MN like this(take 172.21.253.37 as ip address of the local mirror server) :: + + #cat /tmp/sources.list + deb http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3 cumulus upstream + deb-src http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3 cumulus upstream + + deb http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3-security-updates cumulus upstream + deb-src http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3-security-updates cumulus upstream + + deb http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3-updates cumulus upstream + deb-src http://172.21.253.37/install/mirror/cumulus/repo3.cumulusnetworks.com/repo CumulusLinux-3-updates cumulus upstream + + distribute the ``sources.list`` file to the switches to upgrade with ``xdcp``, take "switch1" as an example here :: + + xdcp switch1 /tmp/sources.list /etc/apt/sources.list + + then invoke ``apt-get update`` and ``apt-get install`` on the switches to start package upgrade, a reboot might be needed after upgrading :: + + xdsh switch1 'apt-get update && apt-get upgrade && reboot' + + check the `/etc/os-release` file to make sure the Cumulus OS has been upgraded :: + + cat /etc/os-release + + + +* Performe a binary (full image) install of the new version, using ONIE. If you expect to upgrade between major versions or if you have the binary image to upgrade to, this way is the recommended one. Make sure to backup your data and configuration files because binary install will erase all the configuration and data on the switch. + + The steps to perform a binary (full image) install of the new version are: + + 1) place the binary image "cumulus-linux-3.4.1.bin" under ``/install`` directory on MN("172.21.253.37") :: + + mkdir -p /install/onie/ + cp cumulus-linux-3.4.1.bin /install/onie/ + + 2) invoke the upgrade on switches with ``xdsh`` :: + + xdsh switch1 "/usr/cumulus/bin/onie-install -a -f -i http://172.21.253.37/install/onie/cumulus-linux-3.4.1.bin && reboot" + + The full upgrade process might cost 30 min, you can ping the switch with ``ping switch1`` to check whether it finishes upgrade. + + 3) After upgrading, the license should be installed, see :ref:`Activate the License ` for detailed steps. + + 4) Restore your data and configuration files on the switch. + + +