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

Inherit system images and share them between examples #824

Closed
afbjorklund opened this issue Apr 27, 2022 · 4 comments
Closed

Inherit system images and share them between examples #824

afbjorklund opened this issue Apr 27, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@afbjorklund
Copy link
Member

afbjorklund commented Apr 27, 2022

Description

For instance Vagrant had this concept of boxes, where you would hide complexity under a name.

https://www.vagrantup.com/docs/boxes

It has the same problems of central control and what not as the yaml files themselves do, though.

https://app.vagrantup.com/ubuntu/boxes/focal64

Side note: it was only for VirtualBox, the others were https://app.vagrantup.com/generic/boxes/ubuntu2004
But it doesn't matter for this discussion, it was supposed to just reference the official Ubuntu cloud image...


But the idea of reducing the OS definition to a single line, would still be a useful concept ?

Instead of:

images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20220420/ubuntu-22.04-server-cloudimg-amd64.img"
  arch: "x86_64"
  digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20220420/ubuntu-22.04-server-cloudimg-arm64.img"
  arch: "aarch64"
  digest: "sha256:66224c7fed99ff5a5539eda406c87bbfefe8af6ff6b47d92df3187832b5b5d4f"

One would just say "ubuntu-22.04-20220420" (or something).

images:
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2"
  arch: "x86_64"
  digest: "sha256:fe84502779b3477284a8d4c86731f642ca10dd3984d2b5eccdf82630a9ca2de6"
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/aarch64/images/Fedora-Cloud-Base-35-1.2.aarch64.qcow2"
  arch: "aarch64"
  digest: "sha256:c71f2e6ce75b516d565e2c297ea9994c69b946cb3eaa0a4bbea400dbd6f59ae6"

This would be "fedora-35-1.2", and similar lookups for the rest.

Currently it is all copy/paste, between the different examples.

@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Apr 27, 2022
@AkihiroSuda
Copy link
Member

AkihiroSuda commented Apr 27, 2022

You can already use limactl start template://ubuntu, limactl start template://fedora, ...

Does this satisfy your requirement?

@afbjorklund
Copy link
Member Author

afbjorklund commented Apr 27, 2022

It is not a requirement, it was more of a feature that could be used in docker or k8s or similar.

Like how the nerdctl archives are predefined, and you only need to say "true" or "false"

@afbjorklund
Copy link
Member Author

afbjorklund commented Apr 30, 2022

Not sure what the best yaml engineering would be, just that it looks a bit redundant at the moment.

examples/buildkit.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/default.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/docker.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/faasd.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/k3s.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/k8s.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/podman.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/ubuntu-lts.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/ubuntu.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"
examples/vmnet.yaml: digest: "sha256:de5e632e17b8965f2baf4ea6d2b824788e154d9a65df4fd419ec4019898e15cd"

@afbjorklund
Copy link
Member Author

Closed as duplicate of #2418, which has an implementation of the yaml engineering

images:
- ubuntu-22.04

@afbjorklund afbjorklund closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants