-
Notifications
You must be signed in to change notification settings - Fork 602
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
Add possibility to download IPFS images #2408
Changes from all commits
30f81c3
a8437e4
0a21255
6a5ab99
448fc17
4e22822
1bcf402
cc3004e
a0b72ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,9 +39,11 @@ images: | |
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-amd64.img" | ||
arch: "x86_64" | ||
digest: "sha256:0e25ca6ee9f08ec5d4f9910054b66ae7163c6152e81a3e67689d89bd6e4dfa69" | ||
cid: "bafybeievi2i673t7kgzx6vsxc6lod3bvagzc364e6kes43p6catfowgone" | ||
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-arm64.img" | ||
arch: "aarch64" | ||
digest: "sha256:5ecac6447be66a164626744a87a27fd4e6c6606dc683e0a233870af63df4276a" | ||
cid: "bafybeich5idqhqtdh3f4nxq6kv6l2fd2nsvynha3vdqek4a7mu7nawp6sm" | ||
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240821/ubuntu-24.04-server-cloudimg-riscv64.img" | ||
arch: "riscv64" | ||
digest: "sha256:f5886ad4e405e689585dfef0e96c31b06478e0cb12bc7f3fae965759a32d729e" | ||
|
@@ -310,6 +312,12 @@ rosetta: | |
# 🟢 Builtin default: use name from /etc/timezone or deduce from symlink target of /etc/localtime | ||
timezone: null | ||
|
||
# Allow using IPFS for downloading files with a provided CID. | ||
# If set to `true`, this will try to use ipfs cid before the location url. | ||
# It requires either the "ipfs" tool (kubo), or setting the IPFS_GATEWAY. | ||
# 🟢 Builtin default: false | ||
ipfs: null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use ipfs: instead of https:, but then it becomes a different URL... (which is bad because it would require multiple digests, and cache entries) Also it would make it mandatory to use ipfs (or a ipfs gateway), to download? By having it as an attribute on the File, it is possible to have it optional (and share digest) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this is better than introducing more YAML fields?
The downloader should just fall back to the next candidate in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is possible to do this with the current implementation, i.e. it supports both ways You can change the location (url), or you can provide a cid for an existing location There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the fields are optional, they should not interfer so much with existing templates? Probably want to have some more automation / sharing in place, before adding them. |
||
|
||
firmware: | ||
# Use legacy BIOS instead of UEFI. Ignored for aarch64 and vz. | ||
# 🟢 Builtin default: false | ||
|
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 don't think we should add the cid to the built-in templates unless the distro publishes the cid by themselves, as computing the cid incurs downloading and reading the whole images.
The same applies to contained too.
You may still add experimental/ubuntu-ipfs.yaml with
location: ipfs://CID
.I still think the locator object doesn't need a dedicated field for
cid
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.
Also hack/update-template.sh should skip ubuntu-ipfs.yaml by default
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.
That means that the data will be stored twice in cache, depending on where you download it from.
But we already have the same issue with other files (like packages), depending on their mirror*.
* today we don't have any mirror lists for the images or archives, so only affects future features
e.g. It is a problem when trying to cache apt packages, so apt-cacher-ng has an "equality list"
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 can remove the CID feature, then IPFS would be more similar to ORAS.