I’ve finally found a moment to breathe between my various other projects, which means I’ve a few idle cycles to think about our Discourse environments and how, when or if we should approach the Ubuntu 16.04 LTS upgrade.
Ubuntu 14.04 is supported through until late 2019, so there’s no huge rush to accomplish this, but I like to check in on such topics and at least be aware of the potential risks and benefits. From what I can see elsewhere 16.04 is officially supported for fresh installations, but has anyone weighed up upgrading the OS versus migrating the Discourse install to a clean box?
From what I can gather, hosts such as DO will leave 16.04 machines on an older kernel that may not be upgradable for some time, are there any other gotchas?
Has anyone successfully upgraded their machines from 14.04->16.04? What state was Discourse in post-install?
I did an upgrade on two droplets on DO for a client. I had a bit of an issue with Docker that I had to reinstall on one droplet (I didn’t do the install and I had trouble with Docker on this droplet before that) but other than that, it went well on both. No trouble with the database or anything else. If you do a backup or even better a snapshot, you don’t have to worry.
The duration was about 15 minutes. The forum is still running the first minutes, but not for the rest.
I upgraded from 14.04->16.04 on a DO droplet. All went well except I had to add the new repository for Xenial for Docker and update it. Did a restart app as @Steven said and I was up and running again.
All your third party apt repositoires will be disabled when you upgrade as you need to point them to new Xenial ones if needed.
The only minor issue I’ve had on 16.04 (clean or upgraded) is that when I reboot the droplet (only on droplets who have a swap), the forum takes ~5 minutes to come back instead of 1 min on 14.04.
/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.
Your Docker installation is not working correctly
See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
I noticed on Docker’s website the minimum verison was Ubuntu 16.04.
I attempted to downgrade docker back to what I had (17.05.0~ce-0~ubuntu-trusty), but couldn’t get it to work with this command:
Everyone seems to recommend a fresh install, but I don’t know how to do that with my limited experience with Digital Ocean/Ubuntu … and all the steps it seems to require.
So in my final attempt I updated Ubuntu 14.04 to 16.04 and everything worked again with Docker.
do-release-upgrade
Note: I backed up everything after updating my Discourse install, before I attempted to install system updates.
Yep, my standard practice now for any OS dot release is an in-place upgrade, for anything more I just move backups to a new server, copy the yml files over and reinstall. It’s very quick, and almost completely painless.
Sure, that’s exactly what you do, just re-run the 30 minute install, which thee days takes me 10 minutes or less, copy over your yml, repoint DNS and restore the backup.
We’re talking about an operation you do once every couple of years at best, if you’re trying to minimise risk of an OS upgrade hosing docker it’s a small price to pay.
Servers costs are prorated, and you’re not going to parallel run for long at all.
I just migrated to a new server for one of my personal Discourse sites, and while I was at it, we did a complete pass on the howto docs for migrating your Discourse from server to server (via backups) recently. They’re in very good shape.