One of the primary Linux server distributions in use today in the cloud is the Ubuntu distro from Canonical. Ubuntu is a Debian-based distro and has a regular cadence of releases every 6 months. If you haven't cracked the numbering code yet, each release is indicated by the year (e.g. "12" for 2012) and then the month (e.g. "04" for April). In addition, each release has a whimsical name associated with it (the 12.04 release is "Precise Pangolin") with each subsequent release incremented alphabetically. In conversation you may hear someone refer to the "Precise" release, now you know that it was released in April, 2012.
Every 2 years Canonical signifies a release as a "Long Term Supported" release, or "LTS". A normal release has a 9 month support window while an LTS release is supported for 5 years. This allows folks who desire a stable platform that is not moving every 6 months to stick on an LTS release, and then have time to migrate to the next LTS release.
Two years ago the 12.04 Precise release was designated an LTS release. Recently Canonical released 14.04 (Trusty Tahr, or simply "Trusty") as the most recent LTS. We are going to demonstrate how to upgrade the latest Ubuntu image on the CenturyLink Cloud, which is the 12.04 release, to the latest 14.04 release.
By the way, the interim Ubuntu releases have been:
- 12.04 - Precise Pangolin (LTS)
- 12.10 - Quantal Quetzal
- 13.04 - Raring Ringtail
- 13.10 - Saucy Salamander
- 14.04 - Trusty Tahr (LTS)
And the upcoming release will be 14.10 - Utopic Unicorn.
Upgrading from Ubuntu "Precise" to "Trusty" on the CenturyLink Cloud
We start with creating a CenturyLink Cloud server. Select the "Ubuntu 12 64-bit" image, 2 CPU's, 4GB of memory and build the server. Once this is complete add a public IP, enabling ports for PING, HTTP, HTTPS, and SSH. Your completed server should look like:
From your terminal shell (ssh) into your new server, logging in as root. First thing is to check the version of Linux and Ubuntu that we are currently running:
$ uname -mrs
This will return a Linux version string that looks like:
Linux 3.2.0-39-generic x86_64
$ lsb_release -a
And you should see a return that indicates that this is, indeed, the Precise release.
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
Upgrade the server
First let's ensure that the apt package list is up to date and that we have the latest version of the update manager.
$ apt-get update $ apt-get install update-manager-core
Now comes the fun part. Since the Trusty release is so new it doesn't show up in the update manager list yet. Canonical waits until the first point release (14.04.1 in this case) to include it as an update target. While this is expected later this summer we can force the system to give us a Trusty release by indicating that we want the "devel" or latest "unstable" version. You shouldn't be scared of the "unstable" terminology, this is used to indicate code that is incremental to the last stable build but not yet certified as a release. In order to start the upgrade process (note that the "-d" parameter indicates the "devel" code):
$ do-release-upgrade -d
Answer 'y' to the intermediate questions until the following screen appears:
There will be a series of screens with selections to follow:
- Answer 'No' to "Disable SSH password authentication for root?"
- Answer 'Yes' to "Restart services during package upgrades without asking?"
- Answer 'N' when prompted to keep your existing snmpd daemon (this keeps the current version).
- Answer 'y' to remove obsolete packages.
- Answer 'y' to restarting the system.
The system restart will terminate your ssh session, so wait a few minutes and then log back in as root.
Now let's check the version of Linux and Ubuntu that we are currently running:
$ uname -mrs
This should now return a Linux version string that looks like:
Linux 3.13.0-30-generic x86_64
$ lsb_release -a
And you should see a return that indicates that this is, indeed, the Trusty release.
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04 LTS Release: 14.04 Codename: trusty
Congratulations, you are now running the latest and greatest version of the Ubuntu server on your CenturyLink Cloud server!