Skip to content

Commit 9794df1

Browse files
committed
Align quadlet templates with ephemeral HTTPS/file-ISO changes
The ironic-https branch added HTTPS vmedia support and file:// boot ISO sourcing to the ephemeral container path but the quadlet templates (used by the persistent phase-7 path) were not updated. - metal3-ironic-api.container.j2: add /iso volume bind-mount, OS_CONDUCTOR__FILE_URL_ALLOWED_PATHS=/iso, and conditional ironic-vmedia-cert/key secrets + VMEDIA_TLS_PORT/IRONIC_EXTERNAL_IP env vars when ironic_https_configured is true - metal3-httpd.container.j2: add unconditional VMEDIA_TLS_PORT=6183 and conditional ironic-vmedia-cert/key secrets - deploy_ironic.yaml: add become: metal3_persistent to the two vmedia secret creation tasks so they land in the root podman secret store when running the persistent/quadlet path Signed-off-by: Rafa Porres Molina <rporresm@redhat.com> Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cd62773 commit 9794df1

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

playbooks/tasks/deploy_ironic.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797

9898
- name: Create podman secret for Ironic vmedia TLS certificate
9999
when: ironic_https_configured | bool
100+
become: "{{ metal3_persistent | default(false) | bool }}"
100101
containers.podman.podman_secret:
101102
name: ironic-vmedia-cert
102103
data: "{{ ironicHTTPSCertificate }}\n"
@@ -107,6 +108,7 @@
107108

108109
- name: Create podman secret for Ironic vmedia TLS key
109110
when: ironic_https_configured | bool
111+
become: "{{ metal3_persistent | default(false) | bool }}"
110112
containers.podman.podman_secret:
111113
name: ironic-vmedia-key
112114
data: "{{ ironicHTTPSKey }}\n"

playbooks/templates/quadlets/metal3-httpd.container.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ Pod=metal3-ironic.pod
99
User=1002:1003
1010
DropCapability=ALL
1111
Volume=metal3-ironic-shared:/shared
12+
{% if ironic_https_configured | default(false) | bool %}
13+
Secret=ironic-vmedia-cert,type=mount,target=/certs/vmedia/tls.crt,uid=1002,gid=1003,mode=0400
14+
Secret=ironic-vmedia-key,type=mount,target=/certs/vmedia/tls.key,uid=1002,gid=1003,mode=0400
15+
{% endif %}
1216
Environment=IRONIC_LISTEN_PORT=6385
1317
Environment=HTTP_PORT=6180
18+
Environment=VMEDIA_TLS_PORT=6183
1419
Environment=LISTEN_ALL_INTERFACES=true
1520
Environment=USE_IRONIC_INSPECTOR=false
1621
Environment=PROVISIONING_IP={{ lzBmcIP }}

playbooks/templates/quadlets/metal3-ironic-api.container.j2

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ DropCapability=ALL
1111
Volume=metal3-ironic-conf:/conf
1212
Volume=metal3-ironic-data:/data
1313
Volume=metal3-ironic-shared:/shared
14+
Volume={{ workingDir }}/ocp-cluster/abi-iso:/iso:ro
1415
Secret=metal3-ironic-htpasswd,type=env,target=IRONIC_HTPASSWD
1516
{% if ssl_certs_configured | bool %}
1617
Secret=metal3-ca-bundle,type=mount,target=/certs/ca-bundle.crt,uid=1002,gid=1003,mode=0400
1718
{% endif %}
19+
{% if ironic_https_configured | default(false) | bool %}
20+
Secret=ironic-vmedia-cert,type=mount,target=/certs/vmedia/tls.crt,uid=1002,gid=1003,mode=0400
21+
Secret=ironic-vmedia-key,type=mount,target=/certs/vmedia/tls.key,uid=1002,gid=1003,mode=0400
22+
{% endif %}
1823
Environment=IRONIC_LISTEN_PORT=6385
1924
Environment=HTTP_PORT=6180
2025
Environment=LISTEN_ALL_INTERFACES=true
@@ -23,9 +28,14 @@ Environment=PROVISIONING_IP={{ lzBmcIP }}
2328
Environment=IRONIC_USE_MARIADB=false
2429
Environment=IRONIC_EXPOSE_JSON_RPC=false
2530
Environment=OS_JSON_RPC__PORT=6189
31+
Environment=OS_CONDUCTOR__FILE_URL_ALLOWED_PATHS=/iso
2632
{% if ssl_certs_configured | bool %}
2733
Environment=WEBSERVER_CACERT_FILE=/certs/ca-bundle.crt
2834
{% endif %}
35+
{% if ironic_https_configured | default(false) | bool %}
36+
Environment=VMEDIA_TLS_PORT=6183
37+
Environment=IRONIC_EXTERNAL_IP={{ lzBmcIP }}
38+
{% endif %}
2939
Exec=/bin/runironic
3040

3141
[Service]

0 commit comments

Comments
 (0)