From fb8552f65b708d64a6b824a0087d8e9765b2a523 Mon Sep 17 00:00:00 2001 From: Sudipta Pandit Date: Fri, 13 Mar 2026 15:23:16 +0530 Subject: [PATCH 1/2] [WIP] Draft proposal for new image tomls --- base/images/README.md | 14 ++ .../container-base/container-base.image.toml | 5 + base/images/images.toml | 17 +- base/images/vm-base/vm-base.image.toml | 30 +++ external/schemas/azldev.schema.json | 188 ++++++++++++++++++ 5 files changed, 238 insertions(+), 16 deletions(-) create mode 100644 base/images/README.md create mode 100644 base/images/container-base/container-base.image.toml create mode 100644 base/images/vm-base/vm-base.image.toml diff --git a/base/images/README.md b/base/images/README.md new file mode 100644 index 00000000000..47a391d8452 --- /dev/null +++ b/base/images/README.md @@ -0,0 +1,14 @@ + + +# Images + +`images.toml` is the registry entry point for image manifests and should stay thin. +Each image directory owns its own `*.image.toml` manifest alongside the build definition (for example, a `.kiwi` file). + +These per-image manifests now carry both azldev build registration and image metadata consumed by downstream tooling such as TEE. +The schema in `external/schemas/azldev.schema.json` has been extended accordingly, but azldev runtime support still needs to be implemented in the tool codebase. + +# Notes +- 'distro` is a required field in the image manifest, but it is not used by azldev at this time. It is intended for use by downstream tooling such as TEE to categorize images by their base distribution. + +- Introduced `name` alongside `description` in the image manifest. The `name` field is intended to be a concise identifier for the image, while `description` can provide more detailed information. Thoughts? \ No newline at end of file diff --git a/base/images/container-base/container-base.image.toml b/base/images/container-base/container-base.image.toml new file mode 100644 index 00000000000..5db1a82da11 --- /dev/null +++ b/base/images/container-base/container-base.image.toml @@ -0,0 +1,5 @@ +[images.container-base] +description = "Container Base Image" +name = "Azure Linux 4 Container Base" +distro = "azurelinux" +definition = { type = "kiwi", path = "container-base.kiwi" } \ No newline at end of file diff --git a/base/images/images.toml b/base/images/images.toml index fe2b2564af3..39ed8b7e9c8 100644 --- a/base/images/images.toml +++ b/base/images/images.toml @@ -1,16 +1 @@ -[images.vm-base] -description = "VM Base Image" -definition = { type = "kiwi", path = "vm-base/vm-base.kiwi" } - -[images.container-base] -description = "Container Base Image" -definition = { type = "kiwi", path = "container-base/container-base.kiwi" } - -# NOTE: -# sudo dnf install -y kiwi-cli -# sudo kiwi --loglevel 10 \ -# --kiwi-file container-base.kiwi \ -# system build \ -# --description ./container-base \ -# --target-dir \ -# --add-repo='file:///home/username/some/dir/with/private/rpms,rpm-md,azl,1 +includes = ["**/*.image.toml"] diff --git a/base/images/vm-base/vm-base.image.toml b/base/images/vm-base/vm-base.image.toml new file mode 100644 index 00000000000..0e447660fc2 --- /dev/null +++ b/base/images/vm-base/vm-base.image.toml @@ -0,0 +1,30 @@ +[images.vm-base] +description = "VM Base Image" +name = "Azure Linux 4" +distro = "azurelinux" +definition = { type = "kiwi", path = "vm-base.kiwi" } + +[images.vm-base.delivery.marketplace] +publisher = "MicrosoftCBLMariner" +offer = "azure-linux-4" +sku_prefix = "azure-linux-4" +version = "*" + +[images.vm-base.delivery.vhd] +vhd_path = "*" + +[images.vm-base.delivery.shared_gallery] +subscription_id = "*" +resource_group_name = "*" +image_gallery = "*" +image_definition = "*" +image_version = "*" + +[images.vm-base.variants] +architectures = [ + "amd64", + "arm64", +] +hyperv_generations = [ + "gen2", +] \ No newline at end of file diff --git a/external/schemas/azldev.schema.json b/external/schemas/azldev.schema.json index 44783186caa..98eb4949f2c 100644 --- a/external/schemas/azldev.schema.json +++ b/external/schemas/azldev.schema.json @@ -403,10 +403,198 @@ "title": "Description", "description": "Description of the image" }, + "name": { + "type": "string", + "title": "Name", + "description": "Human readable image name exposed to downstream consumers" + }, + "distro": { + "type": "string", + "title": "Distro", + "description": "Distribution identifier for the image" + }, "definition": { "$ref": "#/$defs/ImageDefinition", "title": "Definition", "description": "Identifies where to find the definition for this image" + }, + "delivery": { + "$ref": "#/$defs/ImageDeliveryConfig", + "title": "Delivery configuration", + "description": "Delivery mechanisms and publish-time metadata available for this image" + }, + "variants": { + "$ref": "#/$defs/ImageVariantsConfig", + "title": "Variants", + "description": "Allowed variant values for this image" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageDeliveryConfig": { + "properties": { + "marketplace": { + "$ref": "#/$defs/ImageMarketplaceDeliveryConfig", + "title": "Marketplace delivery", + "description": "Azure Marketplace delivery metadata" + }, + "vhd": { + "$ref": "#/$defs/ImageVhdDeliveryConfig", + "title": "VHD delivery", + "description": "VHD delivery metadata" + }, + "shared_gallery": { + "$ref": "#/$defs/ImageSharedGalleryDeliveryConfig", + "title": "Shared gallery delivery", + "description": "Shared Image Gallery delivery metadata" + }, + "community_gallery": { + "$ref": "#/$defs/ImageCommunityGalleryDeliveryConfig", + "title": "Community gallery delivery", + "description": "Community gallery delivery metadata" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageMarketplaceDeliveryConfig": { + "properties": { + "publisher": { + "type": "string", + "title": "Publisher", + "description": "Azure Marketplace publisher" + }, + "offer": { + "type": "string", + "title": "Offer", + "description": "Azure Marketplace offer" + }, + "sku_prefix": { + "type": "string", + "title": "SKU prefix", + "description": "SKU prefix before architecture or generation suffixes are applied" + }, + "version": { + "type": "string", + "title": "Version", + "description": "Marketplace version or placeholder to be resolved during fulfillment" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageVhdDeliveryConfig": { + "properties": { + "vhd_path": { + "type": "string", + "title": "VHD path", + "description": "VHD URL or placeholder to be resolved during fulfillment" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageSharedGalleryCapabilityConfig": { + "properties": { + "accelerated_networking": { + "type": "boolean", + "title": "Accelerated networking", + "description": "Whether accelerated networking is supported" + }, + "hibernation_support": { + "type": "boolean", + "title": "Hibernation support", + "description": "Whether hibernation is supported" + }, + "high_perf_nvme": { + "type": "boolean", + "title": "High performance NVMe", + "description": "Whether high performance NVMe is supported" + }, + "security_type": { + "type": "string", + "title": "Security type", + "description": "Security type exposed by the published image" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageSharedGalleryDeliveryConfig": { + "properties": { + "subscription_id": { + "type": "string", + "title": "Subscription ID", + "description": "Azure subscription ID or placeholder" + }, + "resource_group_name": { + "type": "string", + "title": "Resource group name", + "description": "Resource group name or placeholder" + }, + "image_gallery": { + "type": "string", + "title": "Image gallery", + "description": "Shared Image Gallery name or placeholder" + }, + "image_definition": { + "type": "string", + "title": "Image definition", + "description": "Shared Image Gallery image definition name or placeholder" + }, + "image_version": { + "type": "string", + "title": "Image version", + "description": "Shared Image Gallery version or placeholder" + }, + "capability": { + "$ref": "#/$defs/ImageSharedGalleryCapabilityConfig", + "title": "Capabilities", + "description": "Capability metadata exposed for the shared gallery image" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageCommunityGalleryDeliveryConfig": { + "properties": { + "image_gallery": { + "type": "string", + "title": "Image gallery", + "description": "Community gallery name or placeholder" + }, + "image_definition": { + "type": "string", + "title": "Image definition", + "description": "Community gallery image definition name or placeholder" + }, + "image_version": { + "type": "string", + "title": "Image version", + "description": "Community gallery image version or placeholder" + } + }, + "additionalProperties": false, + "type": "object" + }, + "ImageVariantsConfig": { + "properties": { + "architectures": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Architectures", + "description": "Allowed architecture values for this image" + }, + "hyperv_generations": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Hyper-V generations", + "description": "Allowed Hyper-V generation values for this image" } }, "additionalProperties": false, From 4df7dfdcd939749980fa952b0045886a97272479 Mon Sep 17 00:00:00 2001 From: Sudipta Pandit Date: Fri, 13 Mar 2026 18:04:41 +0530 Subject: [PATCH 2/2] wip: remove incompatible name parameter --- base/images/README.md | 4 +--- base/images/container-base/container-base.image.toml | 1 - base/images/vm-base/vm-base.image.toml | 1 - external/schemas/azldev.schema.json | 5 ----- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/base/images/README.md b/base/images/README.md index 47a391d8452..d4809af4e83 100644 --- a/base/images/README.md +++ b/base/images/README.md @@ -9,6 +9,4 @@ These per-image manifests now carry both azldev build registration and image met The schema in `external/schemas/azldev.schema.json` has been extended accordingly, but azldev runtime support still needs to be implemented in the tool codebase. # Notes -- 'distro` is a required field in the image manifest, but it is not used by azldev at this time. It is intended for use by downstream tooling such as TEE to categorize images by their base distribution. - -- Introduced `name` alongside `description` in the image manifest. The `name` field is intended to be a concise identifier for the image, while `description` can provide more detailed information. Thoughts? \ No newline at end of file +- 'distro` is a required field in the image manifest, but it is not used by azldev at this time. It is intended for use by downstream tooling such as TEE to categorize images by their base distribution. \ No newline at end of file diff --git a/base/images/container-base/container-base.image.toml b/base/images/container-base/container-base.image.toml index 5db1a82da11..a531e4638b5 100644 --- a/base/images/container-base/container-base.image.toml +++ b/base/images/container-base/container-base.image.toml @@ -1,5 +1,4 @@ [images.container-base] description = "Container Base Image" -name = "Azure Linux 4 Container Base" distro = "azurelinux" definition = { type = "kiwi", path = "container-base.kiwi" } \ No newline at end of file diff --git a/base/images/vm-base/vm-base.image.toml b/base/images/vm-base/vm-base.image.toml index 0e447660fc2..0887fb25fec 100644 --- a/base/images/vm-base/vm-base.image.toml +++ b/base/images/vm-base/vm-base.image.toml @@ -1,6 +1,5 @@ [images.vm-base] description = "VM Base Image" -name = "Azure Linux 4" distro = "azurelinux" definition = { type = "kiwi", path = "vm-base.kiwi" } diff --git a/external/schemas/azldev.schema.json b/external/schemas/azldev.schema.json index 98eb4949f2c..00be8255264 100644 --- a/external/schemas/azldev.schema.json +++ b/external/schemas/azldev.schema.json @@ -403,11 +403,6 @@ "title": "Description", "description": "Description of the image" }, - "name": { - "type": "string", - "title": "Name", - "description": "Human readable image name exposed to downstream consumers" - }, "distro": { "type": "string", "title": "Distro",