diff --git a/base/images/README.md b/base/images/README.md new file mode 100644 index 00000000000..d4809af4e83 --- /dev/null +++ b/base/images/README.md @@ -0,0 +1,12 @@ + + +# 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. \ 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..a531e4638b5 --- /dev/null +++ b/base/images/container-base/container-base.image.toml @@ -0,0 +1,4 @@ +[images.container-base] +description = "Container Base Image" +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..0887fb25fec --- /dev/null +++ b/base/images/vm-base/vm-base.image.toml @@ -0,0 +1,29 @@ +[images.vm-base] +description = "VM Base Image" +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..00be8255264 100644 --- a/external/schemas/azldev.schema.json +++ b/external/schemas/azldev.schema.json @@ -403,10 +403,193 @@ "title": "Description", "description": "Description of the image" }, + "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,