Opened 6 years ago

Closed 6 years ago

#2269 closed task (fixed)

Switch OSGeo 7 to use snap package for lxd which is now at 3.12

Reported by: robe Owned by: sac@…
Priority: normal Milestone: Sysadmin Contract 2019-I
Component: SysAdmin Keywords:
Cc:

Description

I installed OSGeo7 with the lxd that came with Ubuntu 18.04 so that means it's at LXD version 3.0.3, which at this point is "ancient".

Ubuntu policy is to stick this (only security updates for the life of it) which means we'd be stuck at 3.0 for 5 years.

That said, the suggested recommendation for many software including LXD is to use snap packages instead. Snap packages come in

stable
candidate
beta
edge

and they are generally set to upgrade automatically and allow downgrade to previous working should something go wrong.

That said, I'd like to switch our LXD to the snap package version which is at 3.11.

Aside from I think snap will give a better upgrade experience, I also want the new pressing feature of lxd

LXD starting at 3.3 supports the proxy_protocol which both HAProxy and NGINX support. This will allow our nginx proxy to properly pass along the real ip address of the user making the request. This is important for some apps such as wordpress and nextcloud which use tha info for blocking access.

So before I bring any more containers on board, I'd like get this out of the way.

I did a trial run on my own 18.04 server running lxd 3.0.3 that has about 10 containers one of whic is of comparable size to our nextcloud one (Our biggest), and the upgrade was pretty fast. So I don't expect any issues. I'll backup the containers first just in case.

For reference these are the steps I'll be taking to migrate

Based on this blog - https://blog.simos.info/how-to-migrate-lxd-from-deb-ppa-package-to-snap-package/

apt install snapd
snap install lxd
lxd.migrate

The lxd.migrate process

1) shuts down the containers and the old lxd service 2) then moves them to the snapd version making any upgrade changes to the containers needed 3) Then brings them back online

I'm also going to experiment with the nginx proxy thing on my test server to confirm that all works as expected before I change the osgeo7 box.

If anybody has issue with the above plan, let me know.

Change History (4)

comment:1 by robe, 6 years ago

I should add the whole process on my test server was under 2 minutes.

comment:2 by robe, 6 years ago

I'm planning to do this today after I am done backing up the containers as images in case something should go wrong.

Other features added since 3.0 - in 3.8 they add ability to for built-in scheduling of snapshots of containers https://discuss.linuxcontainers.org/t/lxd-3-8-has-been-released/3450

and in 3.10 auto-setting an expiration date on the snapshots. https://discuss.linuxcontainers.org/t/lxd-3-10-has-been-released/4018

So this feature will help with part of backup so we can restore an image to a good point in time and use bacula for backing up critical user files.

comment:3 by robe, 6 years ago

Summary: Switch OSGeo 7 to use snap package for lxd which is now at 3.11Switch OSGeo 7 to use snap package for lxd which is now at 3.12

Completed:

lxd --version

now reads:

3.12

comment:4 by robe, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.