-
Notifications
You must be signed in to change notification settings - Fork 791
feat(templates): add amazonlinux-2023 distro #4454
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
base: master
Are you sure you want to change the base?
feat(templates): add amazonlinux-2023 distro #4454
Conversation
|
Testing it with: Correct os-release Info: Correct uname: Correct repos: |
|
It's weird, but the only problem is that the backspace does not work. I don't know if Lima uses SSH underneath, but I'll investigate the debug logs by re-shelling to the VM. [Update] Yep, it looks like it uses SSH. Then I believe it could be an issue with SendEnv. [Update 2] The --preserve-env did not work either. Plus, I realised that the mountpoint did not work. I believe there has to be a directory called /Users/gokhankocmarli, which is my $HOME on the host machine. |
|
Previous attempt with this (Amazon Linux) was: I think it also failed to automate the updating? |
Thank you for the info! I have reviewed the comments there and see that two concerns are in common:
I'll spend some time fixing those. However, I believe that we can move this template to experimental ones and start iteratively on fixing stuff. Some folks may not need mounts or be happy with just having AL2023 with Lima without the latest image since it's possible to easily update the system using We could easily patch it by adding a run-script when the image is initialised and upgrading the system to the latest. Wdyt? |
|
You can "fix" the mount problems by excluding the methods that don't work, like 9p (check other templates for examples) But it's a problem if there is no download URL. Maybe something that upstream can provide, if you ask them? |
0f476bd to
e33f646
Compare
I used the same mount point restrictions as the previous PR, the issue still exists but I'm investigating it.
I added a new update-template script under hack/ directory. This script automatically fetches the latest version and updates the template. I used the trick of following the URL endpoint /latest and parsing its 302 response to resolve the latest version number (including .1/.0 at the end). I don't know who calls them in what frequency, but I see that it's the common and agreed approach. |
9dba5e5 to
897084e
Compare
|
Update: The mount problem is gone, and it's possible to update the image to the latest one within a new script under I'll check the unit test and the lining stuff later. Does it look OK to you? |
b48521f to
dedcd61
Compare
c5fd2b5 to
2130e26
Compare
This commit adds a simple template for the Amazon Linux 2023 operating system's 2025-12-08 version. The OS is scheduled to release every two weeks, therefore, a new script called hack/update-template-amazonlinux.sh is added next to the other template updater scripts. Find the latest images here: cdn.amazonlinux.com/al2023/os-images/latest/ This patch: - Adds amazonlinux-2023 template with 2025-12-08 release by default (fallback). - Resolves mount issues on AL2023 with host OS. - Introduces a script on VM init where it updates the system to latest release. - Adds update-template-amazonlinux.sh script to help maintainers automatically update the verison. Signed-off-by: Gyokhan Kochmarla <[email protected]>
2130e26 to
6935a63
Compare
| script: | | ||
| #!/bin/bash | ||
| set -eux -o pipefail | ||
| # Update to the latest release on the first boot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use upgradePackages instead, if desired
Then cloud-init will call dnf, and reboot if required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found an example of the usage or found the implementation on the Go modules. However, AL2023 does use a different style of releases. Running a simple "yum/dnf upgrade" would not do anything if "releasever" is not defined. I guess this version of upgrade is better. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You lost me there. The upgradePackages is a template feature:
# Upgrade the instance on boot
# Reboot after upgrade if required
# 🟢 Builtin default: false
upgradePackages: nullThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you mean that "dnf upgrade -y" does not work in this distribution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It have a different effect then giving releasever. Amazon Linux uses a "fixed" repository method where every two week, they release another repo. This helps customers to make sure that whenever they use the AL2023 with releasever=20251208, all packages would be the same. So, if one wants to update their packages, they have to upgrade the release version of the repository.
Standard yum/dnf upgrade or update is not going to work since it does not define which version to upgrade the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it seems to me that the template should not be updating anything at all. If the user writes 20251208.0 they want just that, similar to when you run a docker container. If you want a newer version, you get a newer image? Instead of trying to run the package manager inside a container. Or that it shouldn't be automatic...
For CentOS it was the opposite, they didn't support snapshots (not even monthly, let alone weekly) and when you upgraded you always got the latest. Not the "x.y.z" thing that RHEL support bought you, but only the "x". So I would just skip the whole section, but otherwise it should create the /etc file after upgrading I think?
|
Could someone possibly help me reproduce these CI checks? I do run shellcheck, shfmt, etc. but I guess there's some configurations different since all seems good on my local. There has to be a guide on running/replicating GitHub actions in this doc: https://lima-vm.io/docs/dev/testing/ |
|
There is |
|
I still don't want new commits to Lima every two (just to bump a snapshot version) every two weeks |
This commit adds a simple template for the Amazon Linux 2023 operating system's latest version. The OS is scheduled to release every two weeks, therefore, we need to find a way to automatically update it from the following AWS website: