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

Create amazonlinux2023 template #2537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

siennathesane
Copy link

Adds a default template reference for Amazon Linux 2023.

@jandubois
Copy link
Member

Please fix lint error (remove trailing spaces on first line) and apply DCO signature to the commit: https://github.com/lima-vm/lima/pull/2537/checks?check_run_id=28484568245

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filename should be amazonlinux.yaml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree because Amazon Linux, Amazon Linux 2, and Amazon Linux 2023 are different operating systems in the same way that Fedora & RedHat are different operating systems. Given #625 was denied, it's an important distinction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't get why the new distro (and later versions) can't be called "amazonlinux".

Does that mean that the new distro will be called "Amazon Linux 2023" practically forever, even in 2030s?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there will be "Amazon Linux 2025", "Amazon Linux 2027", etc in the future.

You can see the expected lifecycles at https://docs.aws.amazon.com/linux/al2023/ug/release-cadence.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there will be "Amazon Linux 2025", "Amazon Linux 2027", etc in the future.

So given that in 2027 there will be AL2023 and AL2025 in maintenance, and AL2027 will be the current version, I think it makes sense to include the "2023" in the name.

I wonder though if it should be amazonlinux-2023.yaml, and then have an amazonlinux.yaml symlink to it, similarly to how we have almalinux-9.yaml or debian-12.yaml. That way in the future we can symlink to amazonlinux-2025.yaml while still keeping the old amazonlinux-2023.yaml around until it is EOL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it has to go in experimental either, just because upstream is missing a symlink?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it in experimental due to no latest version and because it requires virtiofs. Since virtiofs requires experimental vz on macOS, it made more sense. Do you want me to move it?

Copy link
Member

@afbjorklund afbjorklund Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it require virtiofs, or does it just not support 9p? I was thinking it would fall back to reverse-sshfs?

Copy link
Member

@afbjorklund afbjorklund Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazon Linux 2023 repository                     13 MB/s |  26 MB     00:02
Amazon Linux 2023 Kernel Livepatch repository   2.2 kB/s | 8.3 kB     00:03
No match for argument: fuse-sshfs
Error: Unable to find a match: fuse-sshfs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, # CONFIG_NET_9P is not set in kernel. So that means that it does indeed only support virtiofs.

vmType: "vz"
mountType: "virtiofs"
images:
- location: "https://cdn.amazonlinux.com/al2023/os-images/2023.5.20240805.0/kvm/al2023-kvm-2023.5.20240805.0-kernel-6.1-x86_64.xfs.gpt.qcow2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these images persistent for years, or are they wiped periodically?
In the latter case, the "latest" image has to be specified as a fallback option.
(See other templates)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these images persistent for years, or are they wiped periodically?

I don't know, that's an Amazon question, sorry. To my knowledge there is no latest option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these images persistent for years, or are they wiped periodically?

I think "somebody" will have to reach out to AWS to find out. I'll be offline soon, so I can't do it right now; ping me in September if it is still unresolved by then. 😄

Maybe ask the finch people to find out who can help. They have a channel on the CNCF Slack.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be left to just go 404 when it is removed, like with the other distributions?

The "latest" is a nice to have / recovery, but ultimately they all need bumping anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is this image link fine for the purposes of the PR? It is an example of an experimental config, not a production config

@afbjorklund
Copy link
Member

There is a https://cdn.amazonlinux.com/al2023/os-images/latest/ link, but all filenames seem to be unique?

https://docs.aws.amazon.com/linux/al2023/ug/outside-ec2-download.html

Maybe there could be an issue or documentation created upstream, how to link to the latest KVM image?

https://aws.amazon.com/about-aws/whats-new/2023/12/amazon-linux-kvm-vmware-images-al2023-3/


Maybe finch wants to help out, as well ?

Or I suppose you could just use fedora :-)

@siennathesane
Copy link
Author

There is a https://cdn.amazonlinux.com/al2023/os-images/latest/ link, but all filenames seem to be unique?

https://docs.aws.amazon.com/linux/al2023/ug/outside-ec2-download.html

Maybe there could be an issue or documentation created upstream, how to link to the latest KVM image?

https://aws.amazon.com/about-aws/whats-new/2023/12/amazon-linux-kvm-vmware-images-al2023-3/

Do you want a link to that in the example file? I think anything more than that is more than I want to do for the scope of this PR.

Maybe finch wants to help out, as well ?

The two are different projects, I'm not sure how they relate, sorry.

Or I suppose you could just use fedora :-)

Amazon Linux 2023 & Fedora are not the same despite many similarities.

@siennathesane
Copy link
Author

I moved it into experimental to allow for more user awareness of the state due to lack of latest support.

@afbjorklund
Copy link
Member

I was just referring to that Amazon projects (like linux or finch) could make this easier for lima?

The template itself doesn't need that information (at the moment), beyond the "latest" image.

@pendo324
Copy link
Contributor

pendo324 commented Aug 9, 2024

Maybe there could be an issue or documentation created upstream, how to link to the latest KVM image?

Unfortunately, I think this is the best we've got right now:

# extract the latest release from the repo
# append .0 to it so that it works properly in the CDN URL
# I'm not sure if this always has to be .0 or if it can be other digits
distribution_release_al2023="$(curl -s https://al2023-repos-us-west-2-de612dc2.s3.dualstack.us-west-2.amazonaws.com/core/releasemd.xml | xmllint --xpath "string(//root/releases/release[last()]/@version)" -).0"

# extract the filename from the SHASUMS file since that file name is "static"
filename=$(curl -Ls "https://cdn.amazonlinux.com/al2023/os-images/$distribution_release_al2023/kvm/SHA256SUMS" | awk -F '[[:space:]]+' '{print $2}')

curl -OL https://cdn.amazonlinux.com/al2023/os-images/$distribution_release_al2023/kvm/$filename

@afbjorklund
Copy link
Member

The update procedure is a separate topic (and not a requirement), many others also lack a good method.

Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM, but the file rename needs to be reflected in the README.

@@ -14,6 +14,7 @@ Distro:
- [`almalinux-8`](./almalinux-8.yaml): AlmaLinux 8
- [`almalinux-9`](./almalinux-9.yaml), `almalinux.yaml`: AlmaLinux 9
- [`alpine`](./alpine.yaml): ☆Alpine Linux
- [`amazonlinux2023.yaml`](./experimental/amazonlinux2023.yaml): [experimental] Amazon Linux 2023
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file has been renamed:

Suggested change
- [`amazonlinux2023.yaml`](./experimental/amazonlinux2023.yaml): [experimental] Amazon Linux 2023
- [`amazonlinux-2023.yaml`](./experimental/amazonlinux-2023.yaml): [experimental] Amazon Linux 2023

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is renamed on disk, so you need to rename it here in the README too, to match the actual filename.

Also please squash all commits.

@jandubois
Copy link
Member

You are missing the DCO sign-off. Also please squash commits!

@siennathesane
Copy link
Author

You are missing the DCO sign-off. Also please squash commits!

Done

Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Unfortunately not there yet:

  • The filenames in the README need to be updated to match the filenames on disk.

  • Adding a comment about the mountType would be nice.

  • Commits need to be squashed.

@@ -14,6 +14,7 @@ Distro:
- [`almalinux-8`](./almalinux-8.yaml): AlmaLinux 8
- [`almalinux-9`](./almalinux-9.yaml), `almalinux.yaml`: AlmaLinux 9
- [`alpine`](./alpine.yaml): ☆Alpine Linux
- [`amazonlinux2023.yaml`](./experimental/amazonlinux2023.yaml): [experimental] Amazon Linux 2023
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is renamed on disk, so you need to rename it here in the README too, to match the actual filename.

Also please squash all commits.

examples/experimental/amazonlinux-2023.yaml Show resolved Hide resolved
@siennathesane
Copy link
Author

Commits need to be squashed.

Sorry, I didn't realise y'all use master so git reset --soft HEAD~$(git rev-list --count HEAD ^main) didn't catch everything. Addressed & fixed.

Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

PR looks good to me now, but while testing it on Sonoma with M1 I noticed that the mounts didn't actually work. Do they work for anybody else?

@jandubois jandubois added this to the v1.0 milestone Sep 5, 2024
@AkihiroSuda
Copy link
Member

@siennathesane Could you take a look at the mount issue?

@siennathesane
Copy link
Author

@siennathesane Could you take a look at the mount issue?

This PR has been enough effort just to share an experimental example. I think it's unclear to me what the purpose of examples are if there's such a high bar to share something that's also experimental. The intent of this PR was to share an example of what an AWS config could look like, because it's my understanding that these are examples, esp experimental ones.

At this point if there's a reason not to merge, then go ahead and close the PR, but I'm not going to spend any more time on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants