Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate server updates #134

Open
MarcoIeni opened this issue Sep 3, 2024 · 2 comments
Open

Automate server updates #134

MarcoIeni opened this issue Sep 3, 2024 · 2 comments

Comments

@MarcoIeni
Copy link
Member

MarcoIeni commented Sep 3, 2024

Updating our servers (e.g. the dev-desktops) at the moment consists in logging in into the machines and running apt commands.

Automate packages update

A first step would be writing a cronjob that tries to run:

sudo apt update && sudo apt upgrade && sudo apt autoremove && sudo reboot now

This can run periodically. Not too often otherwise it would be bad for devs productivity. Say 1 per month.

EDIT: not sure we want to reboot because it would imply downtime.

Automate ubuntu update

It would be great if we could automate the distro upgrade too (e.g. 22 -> 24).
Running sudo do-release-upgrade manually on every server takes a lot of time.
It would be cool if we had a way to define the Ubuntu version from IaC (e.g. terraform).

At the moment, terraform thinks that we are running ubuntu, while in reality we are in the process of manually upgrading to ubuntu 24 everywhere.

Challenges

This is challenging, because at the moment the home volume is not separated from the root one, so upgrading the OS image from terraform would probably result in rustc developers loosing their files.

Tests

Ideally we should have some tests or deployment strategy so that we check that the system is working before rotating VMs.

EDIT: we probably don't want to automate do-release-upgrade because there are breaking changes, such as packages missing.

@Kobzol
Copy link

Kobzol commented Sep 3, 2024

What about using ubuntu's own system for automating package updates (https://phoenixnap.com/kb/automatic-security-updates-ubuntu? Seems a bit more elegant than running a cron job for this.

@MarcoIeni
Copy link
Member Author

MarcoIeni commented Sep 3, 2024

oh, I didn't know about it. Definitely!

EDIT: another idea suggested here is to have two ansible playbooks, one for updates and one for the server initialization.

We could run the update playbook periodically from CI.

@MarcoIeni MarcoIeni changed the title Automate dev desktops update Automate server updates Oct 21, 2024
@github-project-automation github-project-automation bot moved this to Backlog in infra-team Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants