Skip to content

Commit 8f04e80

Browse files
committed
Reorganize images folder: move DIB files to dib/
Assisted-By: Claude (claude-4.5-sonnet) Signed-off-by: Harald Jensås <hjensas@redhat.com>
1 parent 4b6ee7f commit 8f04e80

File tree

8 files changed

+41
-7
lines changed

8 files changed

+41
-7
lines changed

images/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ controller_dib_build: controller_dib_setup
4444
@mkdir -p $(CONTROLLER_DIB_WORKDIR)/cache
4545
@. $(CONTROLLER_DIB_VENV)/bin/activate && \
4646
cd $(CURDIR) && \
47-
ELEMENTS_PATH=$(CURDIR)/elements \
47+
ELEMENTS_PATH=$(CURDIR)/dib/elements \
4848
DIB_IMAGE_CACHE=$(CONTROLLER_DIB_WORKDIR)/cache \
4949
DIB_DEBUG_TRACE=1 \
50-
diskimage-builder controller-image.yaml
50+
diskimage-builder dib/controller-image.yaml
5151
@echo "Controller image built successfully: $(CONTROLLER_IMAGE_NAME)"
5252

5353
controller_convert:

images/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ deployments. The tasks are executed using the `make` utility.
1212

1313
- **controller**: A customized CentOS 9 Stream image with packages needed for
1414
the hotstack controller node. Built using diskimage-builder (DIB) with custom
15-
elements.
15+
elements from the `dib/` subdirectory.
1616
- **blank**: A minimal blank image used for virtual baremetal node disks with
1717
Redfish virtual BMC
1818
- **nat64**: A NAT64 appliance image built using ci-framework for IPv6-only
@@ -102,8 +102,8 @@ directly use qcow2 images for VM disks.
102102
- `controller_dib_setup`: Creates a Python virtual environment and installs
103103
diskimage-builder.
104104
- `controller_dib_build`: Builds the controller image using DIB with the
105-
configuration from `controller-image.yaml` and the custom `hotstack-controller`
106-
element from `elements/`.
105+
configuration from `dib/controller-image.yaml` and the custom `hotstack-controller`
106+
element from `dib/elements/`.
107107
- `controller_convert`: Converts the image to the format specified by
108108
`CONTROLLER_IMAGE_FORMAT` (in-place conversion if `raw`).
109109
- `controller_clean`: Removes the controller image, virtual environment, and
@@ -151,7 +151,7 @@ make clean
151151
```
152152

153153
This will create a Python virtual environment, install diskimage-builder,
154-
build the image using the configuration from `controller-image.yaml`, and
154+
build the image using the configuration from `dib/controller-image.yaml`, and
155155
convert it to raw format (default).
156156

157157
2. Upload the controller image to Glance:

images/dib/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Diskimage-builder (DIB) Files
2+
3+
This directory contains all files related to building the HotStack controller image using diskimage-builder (DIB).
4+
5+
## Contents
6+
7+
- `controller-image.yaml` - DIB configuration file that defines the controller image build
8+
- `elements/` - Custom DIB elements for HotStack
9+
- `hotstack-controller/` - Element that installs packages and configures the controller node
10+
- `controller.d/` - DIB manifests directory
11+
- `dib-manifests/` - Contains DIB arguments and environment configuration
12+
13+
## Building the Controller Image
14+
15+
The controller image is built using the parent Makefile:
16+
17+
```bash
18+
cd ..
19+
make controller
20+
```
21+
22+
This will:
23+
1. Create a Python virtual environment with diskimage-builder
24+
2. Build the image using the configuration from `controller-image.yaml`
25+
3. Apply the custom `hotstack-controller` element from `elements/`
26+
4. Convert the image to the desired format (raw or qcow2)
27+
28+
## Custom Elements
29+
30+
See `elements/README.md` for information about creating and using custom DIB elements.
31+
32+
## References
33+
34+
- [diskimage-builder documentation](https://docs.openstack.org/diskimage-builder/latest/)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Custom element for building the HotStack controller node image.
2727

2828
## Usage
2929

30-
These elements are used automatically by the Makefiles when building images with diskimage-builder. They are referenced in the image configuration YAML files (e.g., `controller-image.yaml`).
30+
These elements are used automatically by the Makefiles when building images with diskimage-builder. They are referenced in the image configuration YAML files (e.g., `../controller-image.yaml`).
3131

3232
## Creating New Elements
3333

File renamed without changes.
File renamed without changes.

images/elements/hotstack-controller/package-installs.yaml renamed to images/dib/elements/hotstack-controller/package-installs.yaml

File renamed without changes.

0 commit comments

Comments
 (0)