You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,6 +80,9 @@ or 'community'. Default is 'public'
76
80
`os_images_common`: A set of elements to include in every image listed.
77
81
Defaults to `cloud-init enable-serial-console stable-interface-names`.
78
82
83
+
`os_images_common_properties`: A dict of Glance image properties to set on all images.
84
+
Defaults to an empty dict, and is overridden by `os_images_list.*.properties`.
85
+
79
86
`os_images_dib_pkg_name`: Optionally customise the name parameter passed
80
87
to the ansible.builtin.pip module when installing diskimage-builder. This can
81
88
be used to install diskimage-builder from version control.
@@ -121,30 +128,31 @@ will be replaced with the newly built image if `os_images_upload` is set to `Tru
121
128
Changing platform architecture in os_images
122
129
-------------------------------------------
123
130
124
-
The `Generate diskimage-builder images` job in the ``os_images`` role can build an
125
-
image for a chosen CPU architecture by defining the ``cpu_arch`` image property before
126
-
calling the ``os_images`` role. This is an [example](https://github.com/stackhpc/kayobe/blob/18ca11b47af42ce10507516c2f9e34f447d5e39a/ansible/overcloud-host-image-build.yml#L21_)
127
-
of a playbook calling the ``os_image`` role & below is an example of how to set the
128
-
``cpu_arch``image property in a configuration like StackHPC-Kayobe-Config:
131
+
The target CPU architecture for each image defined in `os_images_list` may be set to any architecture supported by diskimage-builder with the `architecture` parameter.
132
+
133
+
If it is unset, an image with the default diskimage-builder architecture (`x86_64`) will be built and optionally uploaded to Glance, with the Glance image property `cpu_arch` set to `x86_64`.
134
+
135
+
If `architecture` is set for an image, consider also setting `properties.cpu_arch` to an architecture [supported by Glance](https://docs.openstack.org/glance/latest/admin/useful-image-properties.html#image-property-keys-and-values). An example is given below.
129
136
130
137
```yaml
131
-
stackhpc_overcloud_dib_host_image:
132
-
name: "{{ image_name }}"
133
-
elements: "{{ dib_elements }}"
134
-
env: "{{ dib_env_vars }}"
135
-
packages: "{{ dib_packages }}"
138
+
os_images_list:
139
+
- name: ubuntu
140
+
elements:
141
+
- ubuntu
142
+
packages:
143
+
- biosdevname
144
+
type: qcow2
145
+
- name: ubuntu-aarch64
146
+
architecture: arm64
147
+
elements:
148
+
- ubuntu
136
149
properties:
137
-
- cpu_arch: "arm64"
150
+
cpu_arch: aarch64
151
+
packages:
152
+
- biosdevname
153
+
type: qcow2
138
154
```
139
155
140
-
The ``cpu_arch`` variable will also be set as an image property within the `Upload
141
-
cloud tenant images` task in the ``upload.yml`` task.
142
-
143
-
If left unset the ``cpu_arch`` variable will default to `x86_64` for ``upload.yml``.
144
-
However, if not set, the `Generate diskimage-builder images` job will takes the
0 commit comments