Skip to content

Commit 3bd7e2f

Browse files
authored
Add Standards/scs-0102-v2-image-metadata.md (#988)
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
1 parent 11d8713 commit 3bd7e2f

2 files changed

Lines changed: 274 additions & 0 deletions

File tree

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
---
2+
title: SCS Image Metadata
3+
type: Standard
4+
status: Draft
5+
track: IaaS
6+
description: |
7+
This is version 2 of the SCS-0102 Image Metadata Standard.
8+
It outlines how to categorize and manage metadata for cloud-based operating
9+
system images to ensure usability and clarity. The standard encompasses naming conventions, technical requirements,
10+
image handling protocols including updating and origin, and licensing/support details. These guidelines ensure
11+
that users can understand, access, and utilize OS images effectively, with clear information on features, updates,
12+
and licensing provided through well-defined metadata properties.
13+
replaces: scs-0102-v1-image-metadata.md
14+
---
15+
16+
## Motivation
17+
18+
Many clouds offer standard Operating System images for their users' convenience.
19+
To make them really useful, they should contain metadata (properties) to allow
20+
users to understand what they can expect using these images.
21+
22+
The specification is targeting images that are managed by the service provider,
23+
provided for public consumption. The spec or parts of it however might turn out
24+
to be useful whenever someone manages images for somebody else's consumption.
25+
26+
## Overview
27+
28+
We categorize the image properties into a few buckets
29+
30+
- Technical requirements and features
31+
- Image handling aspects
32+
- Licensing/Maintenance/Support aspects
33+
34+
## Technical requirements and features
35+
36+
This is dependent on whether we deal with VM images or container images.
37+
38+
For VM images (OpenStack), we recommend to use the properties as described
39+
in the [OpenStack Image documentation](https://docs.openstack.org/glance/latest//admin/useful-image-properties).
40+
41+
The following properties are considered mandatory:
42+
43+
- `architecture`
44+
- `min_disk` (in GiB), `min_ram` (in MiB)
45+
- `os_version`, `os_distro`, `os_purpose` (see below)
46+
- `hw_disk_bus` (`scsi` recommended, and then setting `hw_scsi_model` is also recommended)
47+
48+
**Note**: Disk sizes tend to be measured in GB = 10^9 and not GiB = 2^30 in the disk industry, but OpenStack uses GiB.
49+
50+
The value given vor `min_ram` MUST be sufficient for the VM to boot and survive (for at least 10 s).
51+
52+
To allow the distinction between general purpose images (which should come from upstream with at most some
53+
targeted adjustments as required by the cloud such as e.g. drivers) and images that are purpose-built, we
54+
require an additional field:
55+
56+
- `os_purpose`
57+
58+
The following values are allowed:
59+
60+
| `os_purpose` value | Intention |
61+
|--------------------|-----------------------------------------------------------|
62+
| `generic` | A general purpose image, (mostly) vanilla from upstream |
63+
| `minimal` | A much more barebones general purpose image |
64+
| `k8snode` | Node image built for k8s with CRI and kubelet |
65+
| `gpu` | Image with GPU drivers e.g. for HPC or AI |
66+
| `network` | Network appliance (firewall, router, loadbalancer, ...) |
67+
| `custom` | None of the above |
68+
69+
Note that no other values are currently allowed, and `custom` should be used in case
70+
of doubt. Talk to the SCS standardization bodies if you'd like to see this list extended which is
71+
likely the case if you fall back to `custom`.
72+
73+
The usage of standardized `os_distro`, `os_version`, `architecture`, and `os_purpose` help cloud users to create
74+
automation that works across clouds without requiring image names to be standardized.
75+
76+
_Uniqueness requirement_: whenever there are two images that have `os_hidden=False`, `visibility=public`,
77+
and that coincide in all three fields `os_distro`, `os_version`, and `architecture`, then only one of them may
78+
have `os_purpose=generic`. In other words, users who search visible public images for a generic OS
79+
of a certain distro, version, and architecture will not get more than one result.
80+
81+
The following property is recommended:
82+
83+
- `hypervisor_type`
84+
85+
The values for `architecture` and `os_distro` and `hypervisor_type` (the latter only if specified) values
86+
must follow the [OpenStack specifications](https://docs.openstack.org/glance/2025.1/admin/useful-image-properties.html).
87+
The `os_version` string should be numeric if the distribution uses numbers, the pair `os_distro` `os_version` should
88+
for example be `ubuntu` `24.04` for Ubuntu Noble Numbat 24.04[.x] LTS.
89+
90+
The following further properties are recommended (if the features are supported):
91+
92+
- `hw_rng_model`
93+
- `os_secure_boot`, `hw_firmware_type`
94+
- `hw_watchdog_action`, `hw_mem_encryption`, `hw_pmu`, `hw_video_ram`, `hw_vif_multiqueue_enabled`
95+
96+
The `trait:XXX=required` property can be used to indicate that certain virtual hardware
97+
features `XXX` are required which may be advertised in matching
98+
[flavor extra specs](https://docs.openstack.org/nova/latest/user/flavors.html#extra-specs).
99+
100+
## Image handling
101+
102+
### Image updating
103+
104+
It is recommended that provider managed images are regularly updated.
105+
This means that users referencing an image _by name_ will always get the latest image for the
106+
operating system indicated by that name (which includes a version number, but not the patch
107+
level).
108+
109+
Technically, the thus updated image is a new image and will thus carry a new UUID.
110+
It is recommended that the old image gets renamed (e.g. build date or patch level attached)
111+
and hidden (`os_hidden=True`), but remains accessible via its (unchanged) UUID for some
112+
time.
113+
114+
The update handling by the provider is described via the properties `replace_frequency`,
115+
`uuid_validity`, `provided_until`, and `hotfix_hours`.
116+
117+
The `replace_frequency`, `provided_until`, and `hotfix_hours` fields reference to the image
118+
as referenced by its name.
119+
120+
| `replace_frequency` | meaning |
121+
| ------------------- | -------------------------------------------------------------------------------- |
122+
| `yearly` | the image will get replaced _at least_ once per year |
123+
| `quarterly` | the image will get replaced _at least_ once per quarter |
124+
| `monthly` | the image will get replaced _at least_ once per month |
125+
| `weekly` | the image will get replaced _at least_ once per week |
126+
| `daily` | the image will get replaced _at least_ once per day |
127+
| `critical_bug` | the image will get replaced for critical issues only |
128+
| `never` | the image referenced by name will never change (until the date `provided_until`) |
129+
130+
Note the _at least_ wording: Providers can replace images more often.
131+
The frequency is starting from the first release; so an image published on 2021-04-14 with an
132+
update frequency of `monthly`, should be replaced no later than 2021-05-14. Due to weekends
133+
etc., up to 3 days later is not considered a violation of this policy. So a valid sequence
134+
from an image with `monthly` update frequency might be 2021-04-14, 2021-05-14, 2021-06-15,
135+
2021-07-14, 2021-07-27 (hotfix), 2021-08-13 ...
136+
137+
Promises to update the registered public images typically depend on upstream image providers
138+
(Linux distributors, OS vendors) keeping their promises to build and provide updated images.
139+
Failures from upstream are not a reason to claim the cloud provider to be in violation of his
140+
promises. However, if the provider observes massive upstream failures (which can e.g. cause
141+
increased security risks), we advise the provider to inform the users.
142+
143+
We recommend updating images at least monthly.
144+
145+
The `hotfix_hours` field indicates how providers deal with critical security issues
146+
that affect the images; it is an optional field that contains a numerical value, indicating
147+
how quickly (in hours) a new image is provided _after the latter of the points in time that
148+
the issue becomes public and a tested fix is available as maintenance update from the upstream
149+
distribution_. A value of 0 indicates a best-effort approach without firm SLAs; the field not
150+
being present indicates no commitment. A value of 48 would indicate that the provider
151+
commits to a new image within 48hrs. A critical issue is defined as a security vulnerability
152+
with a CVSS score of 9.0 or higher that affects software that is included in the image.
153+
154+
The `provided_until` field is supposed to contain a date in `YYYY-MM-DD` format that
155+
indicates until when an image under this name will be provided and (according to the
156+
`replace_frequency`) updated at least. (Providers are free to provide updates for
157+
longer or leave the non-updated image visible for longer.)
158+
If this field is set to `none`, no promises are made, if it is set to `notice`, updates
159+
will be provided until a deprecation notice is published. (The values are the same as
160+
for below `uuid_validity`, except that `forever` and `last-N` don't make any sense.)
161+
162+
The `uuid_validity` field indicates how long the public image will be referencable
163+
by its UUID.
164+
165+
| `uuid_validity` | meaning |
166+
| --------------- | ----------------------------------------------------------------------- |
167+
| `none` | UUID will only be valid as long as the content does not change |
168+
| `last-N` | The last N images for newer replacement will remain accessible via UUID |
169+
| `YYYY-MM-DD` | UUID will be valid until at least the date YYYY-MM-DD |
170+
| `notice` | UUID will remain valid until a deprecation notice will be published |
171+
| `forever` | UUID will remain valid for as long as the cloud operates |
172+
173+
Note that the old images must be hidden from the image catalogue or renamed (or both)
174+
to avoid failing referencing by name. Note that `last-N` may be limited by the `provided_until`
175+
date. We recommend providers that keep old images according to the advertized `uuid_validity`
176+
to hide older images (setting the `os_hidden` property to `True`). If the outdated images must
177+
remain visible, the recommendation is to rename the images by attaching a datestamp in the
178+
format " `YYYYMMDD`" to the name where the date must reflect the `build_date` of the image.
179+
180+
The three properties `uuid_validity`, `provided_until` and `replace_frequency` are mandatory;
181+
the field `hotfix_hours` is optional.
182+
183+
All dates are in UTC.
184+
185+
#### Example
186+
187+
Providing an image with name `OPSYS MAJ.MIN` with
188+
`replace_frequency=monthly`, `provided_until=2022-09-30`, `uuid_validity=2022-12-31`,
189+
`hotfix_hours=0`
190+
means that we will have a new image with this name at least once per month (starting from
191+
the initial release) until the end of September 2022. Old images will be hidden and/or
192+
renamed, but remain accessible via their UUID until at least the end of 2022 (in Universal Time).
193+
The provider makes an effort to replace images upon critical security issues out of order.
194+
195+
### Image Origin
196+
197+
- Mandatory: `image_source` needs to be a URL to point to a place from which the image can be downloaded.
198+
(Note: This may be set to the string "private" to indicate that the image can not be freely
199+
downloaded.)
200+
- Mandatory: `image_description` needs to be a URL (or text) with release notes and other human-readable
201+
data about the image.
202+
203+
- Recommended _tag_: `managed_by_VENDOR`
204+
205+
Note that for most images that come straight from an upstream source, `image_description` should point
206+
to an upstream web page where these images are described. If download links are available as well
207+
on that page, `image_source` can point to the same page, otherwise a more direct link to the image
208+
should be used, e.g. directly linking the `.qcow2` or `.img` file.
209+
If providers have their own image building machinery or do some post-processing on top of
210+
upstream images, they should point to the place where they document and offer these images.
211+
212+
### Image build info
213+
214+
- Mandatory: `image_build_date` needs to be `YYYY-MM-DD` or `YYYY-MM-DD hh:mm[:ss]` (time in UTC,
215+
24hrs clock).
216+
All publicly released and generally recommended patches before this date must be included in the
217+
image build. If the cutoff date is earlier, this cutoff date needs to be set instead, even
218+
if the actual build happens significantly after the cutoff date. If not all patches can be
219+
included for a good reason, then the `patchlevel` field (see below) must be used to describe
220+
the patch status.
221+
- Mandatory: `image_original_user` is the default login user for the operating system which can connect
222+
to the image via the injected SSH key or provided password. (This can be set to `none` if no default
223+
username exists for the operating system.)
224+
- Optional: `patchlevel` can be set to an operating specific patch level that describes the
225+
patch status — typically we would expect the `image_build_date` to be sufficient.
226+
227+
- Recommended: `os_hash_algo` and `os_hash_value`: The sha256 or sha512 hash
228+
for the image file. (This references the image file in the format it is stored in, we
229+
recommend raw over qcow2 for systems that use ceph.) Note that these values are
230+
typically generated automatically upon image registration.
231+
232+
- Recommended _tag_: `os:OPERATINGSYSTEM`
233+
234+
### Licensing / Maintenance subscription / Support
235+
236+
Some images require a license; in many cases the cloud providers include the license cost
237+
by a per-use (e.g. hourly) fee. However, it is also possible sometimes that customers
238+
use their own license agreements with the OS vendor with a bring-your-own-license (BYOL)
239+
program. These properties may be attached to the image. Note that free Linux images
240+
might not use any of these properties, except maybe `maintained_until`. Note that
241+
Windows images would typically require `license_included`, `subscription_included`.
242+
A boolean property that is not present is considered to be `false`.
243+
244+
- Optional: `license_included` (boolean) indicates whether the flavor fee
245+
includes the licenses required to use this image. This field is mandatory for
246+
images that contain software that requires commercial licenses.
247+
- Optional: `license_required` (boolean) indicates whether a customer must bring
248+
its own license to be license compliant. This can not be true at the same time as the
249+
previous setting. This field is mandatory IF customers need to bring their own
250+
license to use the image.
251+
- Optional: `subscription_included` (boolean) indicates that the image contains already
252+
a maintenance subscription which typically gives access to bug fixes, security
253+
fixes and (minor) function updates. If a subscription is included, the CSP should
254+
have prepared the image to also receive the provided maintenance updates from the
255+
vendor (optionally via a mirror).
256+
- Optional: `subscription_required` (boolean) indicates that the customer requires
257+
a maintenance subscription from the OS vendor in order to receive fixes
258+
(which is often also a prerequisite to be eligible for support).
259+
- Optional: `maintained_until: YYYY-MM-DD` promises maintenance from the OS vendor
260+
until at least this date (in UTC).
261+
- Optional: `l1_support_contact` contains a URI that provides customer support
262+
contact for issues with this image. Note that this field must only be set if the
263+
service provider does provide support for this image included in the image/flavor
264+
pricing (but it might be provided by a contracted 3rd party, e.g. the OS vendor).
265+
266+
### Version history
267+
268+
- Version 1.0 has existed without notable changes since June 2021.
269+
- Version 1.1 was created in preparation for a new major version 2.0 and has the following additional recommendations:
270+
- Reference OpenStack image spec for standard values of `os_distro`, `architecture` and `hypervisor_type`.
271+
- Recommendation on `os_version` to be a version number (if such a value exists).
272+
- Recommended field `os_purpose`.
273+
- Version 2.0 (this one) makes the field `os_purpose` mandatory.

Standards/scs-0102-w1-image-metadata-implementation-testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ type: Supplement
44
track: IaaS
55
supplements:
66
- scs-0102-v1-image-metadata.md
7+
- scs-0102-v2-image-metadata.md
78
---
89

910

0 commit comments

Comments
 (0)