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
Introduce .image quadlet units to decouple image sourcing from container
definitions. Container roles now reference Image=<name>.image instead of
full registry URLs, and a new images role handles deployment with a
three-tier precedence model: admin overrides (/etc/foremanctl/images.d/)
> vendor RPMs (/usr/share/foremanctl/images.d/) > generated defaults.
Resolves: #277
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
See [IOP Architecture](iop.md) for details on the services deployed and configuration options.
54
54
55
-
### Authenticated Registry Handling
55
+
### Image Management
56
56
57
-
If you need to pull images from private or authenticated container registries, you can configure registry authentication using Podman's auth file.
57
+
foremanctl uses Podman quadlet `.image` units to separate image sourcing from container definitions. Each unique container image (foreman, candlepin, pulp, etc.) gets a corresponding `.image`file deployed to `/etc/containers/systemd/`. Container roles reference these by name rather than by full image URL:
58
58
59
-
#### Setting up Registry Authentication
59
+
```ini
60
+
# /etc/containers/systemd/foreman.image
61
+
[Image]
62
+
Image=quay.io/foreman/foreman:nightly
63
+
```
60
64
61
-
1.**Login to your registry** using Podman and save credentials to the default auth file location:
2.**Deploy as usual** - foremanctl will automatically detect and use the authentication file:
67
-
```bash
68
-
./foremanctl deploy
71
+
All containers that share a base image (e.g., foreman, dynflow-sidekiq, foreman-recurring) reference the same `.image` unit. systemd ensures the image is pulled before any dependent container starts.
72
+
73
+
#### Image Overrides via Drop-ins
74
+
75
+
foremanctl uses quadlet's native drop-in mechanism for image overrides. Each `.image` file has a corresponding `.image.d/` directory. Drop-in `.conf` files placed there are merged on top of the base in lexicographic order — last wins.
76
+
77
+
The quadlet generator reads from two directory tiers, with `/etc/` taking precedence over `/usr/share/`:
78
+
79
+
```
80
+
/usr/share/containers/systemd/
81
+
foreman.image.d/
82
+
10-product.conf # vendor/RPM layer
83
+
20-archive.conf # ISO/archive layer
84
+
85
+
/etc/containers/systemd/
86
+
foreman.image # base, always generated by foremanctl
87
+
foreman.image.d/
88
+
90-user.conf # user override layer
89
+
```
90
+
91
+
Precedence (last wins):
92
+
93
+
1.`foreman.image` — foremanctl default from `images.yml`
94
+
2.`10-product.conf` — vendor/RPM provided
95
+
3.`20-archive.conf` — ISO or archive extraction provided
96
+
4.`90-user.conf` — user provided (highest priority)
97
+
98
+
#### Use Cases
99
+
100
+
**Upstream default (no user action):** foremanctl generates `.image` files from its built-in `images.yml`:
101
+
102
+
```ini
103
+
# /etc/containers/systemd/foreman.image (generated by foremanctl)
104
+
[Image]
105
+
Image=quay.io/foreman/foreman:nightly
106
+
```
107
+
108
+
**RPM-provided images:** A product RPM ships numbered drop-ins to `/usr/share/containers/systemd/` pointing at the product registry. No user action required beyond installing the RPM:
This approach integrates seamlessly with both the happy path and advanced deployment paths described above. The authentication is handled transparently during image pulling operations.
117
+
**Disconnected install from ISO:** The ISO extraction adds a higher-numbered drop-in alongside the RPM layer, redirecting pulls to local archives:
**User's own registry:** For redirecting all images to a private registry that mirrors upstream image names, use a `registries.conf.d` entry — one file covers all images:
foremanctl configures all image units to use `/etc/foreman/registry-auth.json` as the credential file. When pulling images from an authenticated registry, log in once before deploying:
@@ -81,7 +167,7 @@ Some of the stages will be made available to the user to run independently.
81
167
a. system requirements
82
168
b. tuning requirements
83
169
c. certificate requirements
84
-
4. Place `.container` files
170
+
4. Place `.image` and `.container` files
85
171
5. Create podman secrets
86
172
6. Reload systemd
87
173
7. (re)start services
@@ -103,7 +189,9 @@ When the user provides parameters to alter the deployment, the deployment utilit
103
189
104
190
## Container changes (Upgrades)
105
191
106
-
When the running containers change because the stream was changed in the configuration, the deployment utility will pull the new images and use the new images when starting services.
192
+
When the running containers change because the stream was changed in the configuration, the deployment utility regenerates `.image` units with the new image references and restarts services to pull and use the updated images.
193
+
194
+
User drop-in overrides in `.image.d/90-user.conf` take precedence over the base `.image` values — if a user-provided drop-in pins a specific tag, it will not be changed by an upgrade.
107
195
108
196
As there is currently no way for the deployment utility to verify which image version is used by a running service, the user is advised to stop all services before performing an upgrade.
0 commit comments