I recently have been updating code for private image server.
There are numerous changes in upstream “https://uk.lxd.images.canonical.com” , with which I try to catch up.
- There are root.squashfs and root.tar.xz files.
Which is by default fetched when creating a container? Is there an optional choice? - There are multiple versions of item sets maintained, Is this is an insurance policy?
I guess, by launching a container, the latest version is fetched.
In order to save space and migration, I maintain only one version. In this case, can I skip the createion of ‘root.date…vcdiff’: ftype:squashfs.vcdiff diff delta? - lxc image list has a field “type” : container/virtual-machine. Is this based on whether “disk.qcow2” is given in i.versions.tems []l?
- Is there a way to publish a unified tarball instead of split (meta+root)?
how would that unified item look like? Compared to this split context:
“items”: {
“lxd.tar.xz”: {
“ftype”: “lxd.tar.xz”,
“sha256”: “fc”,
“size”: 1356,
“path”: “images/almalinux/8/amd64/cloud/20220209_23:09/lxd.tar.xz”,
“combined_sha256”: “ed”,
“combined_rootxz_sha256”: “ed”,
“combined_squashfs_sha256”: “b3”,
“combined_disk-kvm-img_sha256”: “bc”
},
“root.tar.xz”: {
“ftype”: “root.tar.xz”,
“sha256”: “d3128e914e2a4c8f4539f3fdb5a8c4b802a132c9c9fb8c53fa128476419d3d58”,
“size”: 128108152,
“path”: “images/almalinux/8/amd64/cloud/20220209_23:09/rootfs.tar.xz”
},
“root.squashfs”: {
“ftype”: “squashfs”,
“sha256”: “eaf930fa7c057fdd737272f23f6346cec61b3b6eb1d7198db44152728523c938”,
“size”: 153804800,
“path”: “images/almalinux/8/amd64/cloud/20220209_23:09/rootfs.squashfs”
},
Generally maintaining an image server consumes a lot of resources and time, I dont run all images, but certain os are chosen with extra options to create hundreds ready applications.
The fresh fetching os and creation of those applications is taking hours/day with distrobuilder.
Now sha256 once single once combined is quite challenge. I used to assign attr to those tarballs or get the timestamp of the files, in order to prevent a nonsense re-calculating of sha256s when only selected images where newly created.
Also selectively reduce the images.json inplace by selecting “amd64” or "default’ or by the lastest set of items.