ofn-install
ofn-install copied to clipboard
Upgrade Ubuntu
New servers should have a supported OS for as long as possible. ~~The just released Ubuntu 18.04 will probably be supported till 2023.~~ ~~Update: It's 2023 now and we should go straight to Ubuntu 22.~~ Update: Our Ansible stack doesn't support past Ubuntu 20. So for now, we will upgrade the oldest servers from v16 to 20.
- [ ] #938
- [ ] #939
- [ ] #940
- [ ] uk_prod
- [ ] de_prod
- [ ] ie_prod
- [ ] be_prod
We should probably start a new branch so that we can support the old and new servers. I guess cherry-picking to other release branches is easier than writing code that runs on all releases. What do you think?
I would propose:
-
master
: newest version for new servers -
ubuntu16
: to use with current servers
The wiki states that we still have some Ubuntu 12 and Ubuntu 14 servers. It may be out of date.
I will try to run current playbook in container running bionic, i think it may just work.
We need to check the priority of this and the current situation of all the instances that are gradually adopting ofn-install
. I propose to do that before we dedicate any effort to this.
Ping @pacodelaluna
In Katuma we will soon migrate our old and small production server and will do it with 18.04. I'll keep you posted.
AFAIK every managed instance is running on Ubuntu 18, closing
@sigmundpetersen UK and FR at least are on 16.
Yes I was confusing 18 compatibility with actual implementation on the servers. Sorry
Current status:
openfoodnetwork.be: 16.04
openfoodnetwork.org.uk: 16.04
openfoodnetwork.ie: 16.04
openfoodnetwork.de: 16.04
coopcircuits.fr: 16.04
openfoodnetwork.ca: 16.04
-----------------------------
app.katuma.org: 18.04
openfoodnetwork.net: 18.04
openfoodnetwork.org.au: 18.04
Servers still running on Ubuntu 16:
- staging.openfoodnetwork.org.au
- staging.openfoodnetwork.org.uk
- openfoodnetwork.ca
- openfoodnetwork.org.uk
- openfoodnetwork.ie
- openfoodnetwork.de
- coopcircuits.fr
Normal updates are over now. Extended security updates will last till 2026.
Estimate
I actually did the last upgrade of the French server. I logged 6h40m for that task.
- #825
We probably need a similar time for the first server upgrade because there are always little issues coming up. But then we are in a position to just execute scripts for each server.
- 7 hours first server
- 2 hours per server afterwards
We have 11 prod servers and 3 staging servers. The full estimate is 7 + 2 * 13 = 33
hours or 5 days.
Github action has started throwing deprecation warning :
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
From the github post :
Our plan is to transition all actions to run on Node 20 by Spring 2024.
Node upgrade is currently blocked by the server upgrade, see https://github.com/openfoodfoundation/openfoodnetwork/pull/10846#pullrequestreview-1429945654
One more reason to get moving on this.
Current status:
$ ansible all_staging -u openfoodnetwork -a "lsb_release -a" | grep -F -e '|' -e Description
staging.openfoodnetwork.org.au | CHANGED | rc=0 >>
Description: Ubuntu 16.04.7 LTS
staging.openfoodnetwork.org.uk | CHANGED | rc=0 >>
Description: Ubuntu 16.04.3 LTS
staging.coopcircuits.fr | CHANGED | rc=0 >>
Description: Ubuntu 18.04.5 LTS
$ ansible all_prod -u openfoodnetwork -a "lsb_release -a" | grep -F -e '|' -e Description
openfoodnetwork.org.au | CHANGED | rc=0 >>
Description: Ubuntu 18.04.4 LTS
openfoodnetwork.org.nz | CHANGED | rc=0 >>
Description: Ubuntu 20.04.6 LTS
openfoodnetwork.in | CHANGED | rc=0 >>
Description: Ubuntu 20.04.6 LTS
openfoodnetwork.ca | CHANGED | rc=0 >>
Description: Ubuntu 16.04.6 LTS
openfoodnetwork.net | CHANGED | rc=0 >>
Description: Ubuntu 18.04.5 LTS
openfoodnetwork.org.uk | CHANGED | rc=0 >>
Description: Ubuntu 16.04.5 LTS
app.katuma.org | CHANGED | rc=0 >>
Description: Ubuntu 18.04.4 LTS
openfoodnetwork.ie | CHANGED | rc=0 >>
Description: Ubuntu 16.04.6 LTS
openfoodnetwork.de | CHANGED | rc=0 >>
Description: Ubuntu 16.04.6 LTS
coopcircuits.fr | CHANGED | rc=0 >>
Description: Ubuntu 20.04.5 LTS
csicsoka.org | CHANGED | rc=0 >>
Description: Ubuntu 18.04.6 LTS
openfoodnetwork.be | CHANGED | rc=0 >>
Description: Ubuntu 16.04.5 LTS
Priority is updating Ubuntu 16 servers:
- staging.openfoodnetwork.org.au
- staging.openfoodnetwork.org.uk
- openfoodnetwork.ca
- openfoodnetwork.org.uk
- openfoodnetwork.ie
- openfoodnetwork.de
- openfoodnetwork.be
Note that during server upgrades, we will not need to install and configure collectd on any servers for Wormly monitoring. We plan to retire it in favour of New Relic.
Just trying out Ubuntu 20.24 and it has Python 3.12 which doesn't seem compatible with our current version of Ansible. We use a very old version of Ansible which may need updating first. I'm questioning again if Ansible is the right tool for us...
what would you use instead of Ansible ?
what would you use instead of Ansible ?
Maybe just a bash script? At Ceres Fair Food we use a Git post-receive hook for deployments and it's only 40 lines of code.
Provisioning is a little bit more complicated in our current setup and maybe Ansible is a better fit for that. Ansible is good at recognising state and skipping tasks that are already done. But that also means that we go through a lot of code just to skip it and it slows things down. You can select to run only a certain tag but I would find it easier just to run a certain bash script.
One upside of Ansible is that lots of roles work with many different operating systems or distributions. But we are locked to Ubuntu anyway and don't use that feature.
We decided to de-scope and upgrade only the oldest servers, to the most recent version of Ubuntu supported by ofn-install, which is Ubuntu 20 (which runs out of support next April)
We'll proceed in this order:
- uk_staging (first because they are keen to change hosts)
- au_staging
- ca_prod
- uk_prod
- de_prod
- ie_prod
- be_prod
(IE and BE are last because we haven't confirmed yet if they have funded the work).
@dacook it's confirmed that we can upgrade IE and BE 💪
I've updated the order above. AU staging had a blocker, so I will proceed with updating CA (ready to go) and UK (they are keen to change hosting providers anyway).
After that I will check if the hosting arrangements for each remaining server allow for Ubuntu 20, and if not, discuss with the team about next steps.