Upgrade to Ubuntu 18.04 LTS & Update EasyEngine to v3.8.1 (DigitalOcean)

This guide will walk you step by step on how to safely upgrade to Ubuntu 18.04 LTS and update EasyEngine to version 3.8.1 on a website hosted on DigitalOcean.

It is important to perform a backup before attempting any of the steps outlined below. Do not skip this step.

(!) You might want to perform these steps after midnight as your server will go down during the upgrade.

(!) This guide uses DigitalOcean as its web hosting of choice. 

Create a snapshot of your Droplet. 

Snapshots allow you to manually copy and store an image of your entire Droplet or volume. 

DigitalOcean

Log into your DigitalOcean account and under Manage > Images

Under Images, you will see Snapshots

Choose your Droplet, image name and click on Take Snapshot.

Create a Snapshot in DigitalOcean

The amount of time this process takes is dependent on the amount of data that needs to be backed up. 

From the More dropdown menu, the Snapshot can be renamed, restored, deleted, etc. 

It’s time to get into your favorite flavor of Linux, Mac OS X, etc. The next set of steps require the user to ssh into their server using terminal commands.

Upgrade to Ubuntu 18.04 LTS

When you first launch the terminal, you may be greeted by a similar output such as this one:

New release ‘18.04.1 LTS’ available.

Run ‘do-release-upgrade’ to upgrade to it.

Type do-release-upgrade

You will get a series of Continue [yN] and [ENTER] commands.

It is important to type y and hit [Enter] when asked to allow the upgrade to proceed. 

At some point during the upgrade, you will reach a screen labeled as Configuring the openssh-server 

Configuring openssh-server

Select Install the package maintainer’s version and hit enter.

Once the process is complete, it will ask the user if they wish to remove obsolete packages. Type y for yes.

The final process is to restart the system. Type y and you’ll be booted out of your server.

Repair EasyEngine

SSH back into your server. 

Type any ee -v or any ee command and you will notice that EasyEngine commands are broken despite the fact that your website is up and healthy.

The following command will fix EasyEngine but it is not suitable for a fresh installation.

Type into the terminal:

sudo rm -rf /tmp/easyengine

sudo git clone -b master https://github.com/EasyEngine/easyengine.git /tmp/easyengine

cd /tmp/easyengine

sudo python3 setup.py install

and type cd to exit.

Note: The update command was fixed in version 3.8.1. If you are running EasyEngine v3.8.1, the ee update command will work just fine.

Verify your version of EasyEngine

Typeee -v 

You should be met with a similar output:

EasyEngine v3.8.1

Upgrade Nginx

Type: ee stack upgrade –nginx

You should receive the following output:

During package update process non nginx-cached parts of your site may remain down

Type y to continue with the upgrade.

Do you want to continue:[y/N]

Your final output will be:

Updating packages, please wait…

Restart : nginx     [OK]

Successfully updated packages

Alternatively, if you wish to upgrade all of EasyEngine’s tools (nginx, php, postfix, mysql, etc.) to their latest version, type ee stack upgrade

Verify Nginx

Type nginx -v

You should receive a similar output to this:

nginx version: nginx/1.14.0 (EasyEngine)

Verify that everything is in working order before deleting the snapshot you created earlier (as you will be billed separately for it).