Skip to content

Commit 2da9f5a

Browse files
committed
Add logically bound images for EDPM services
This change adds logically bound images for use with bootc. This is implementing based on: https://containers.github.io/bootc/logically-bound-images.html Signed-off-by: Brendan Shephard <[email protected]>
1 parent 1f6b557 commit 2da9f5a

File tree

16 files changed

+780
-28
lines changed

16 files changed

+780
-28
lines changed

bootc/Containerfile.centos9

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,64 @@ RUN rm -rf /etc/yum.repos.d/*.repo
44
COPY output/yum.repos.d /etc/yum.repos.d
55

66
ARG PACKAGES="\
7-
bind-utils \
8-
buildah \
9-
cephadm \
10-
chrony \
11-
cloud-init \
12-
crudini \
13-
crypto-policies-scripts \
14-
device-mapper-multipath \
15-
driverctl \
16-
grubby \
17-
iproute-tc \
18-
iptables-services \
19-
iscsi-initiator-utils \
20-
jq \
21-
lvm2 \
22-
nftables \
23-
numactl \
24-
openssh-server \
25-
openstack-selinux \
26-
openvswitch \
27-
os-net-config \
28-
podman \
29-
python3-libselinux \
30-
python3-pyyaml \
31-
rsync \
32-
tmpwatch \
33-
tuned-profiles-cpu-partitioning \
34-
sysstat"
7+
bind-utils \
8+
buildah \
9+
cephadm \
10+
chrony \
11+
cloud-init \
12+
crudini \
13+
crypto-policies-scripts \
14+
device-mapper-multipath \
15+
driverctl \
16+
grubby \
17+
iproute-tc \
18+
iptables-services \
19+
iscsi-initiator-utils \
20+
jq \
21+
lvm2 \
22+
NetworkManager-ovs \
23+
nftables \
24+
numactl \
25+
openssh-server \
26+
openstack-selinux \
27+
openvswitch \
28+
os-net-config \
29+
podman \
30+
python3-libselinux \
31+
python3-pyyaml \
32+
rsync \
33+
sysstat \
34+
tmpwatch \
35+
tuned-profiles-cpu-partitioning"
36+
3537
ARG ENABLE_UNITS="openvswitch"
3638

3739
RUN dnf -y update && dnf -y install $PACKAGES && dnf clean all && systemctl enable $ENABLE_UNITS
40+
41+
# Template systemd service for services
42+
COPY embedded-services/quadlets/systemd/service-template.kube /usr/share/containers/systemd/[email protected]
43+
44+
## Service specific quadlets
45+
COPY embedded-services/quadlets/ovn-controller/ovn_controller.yaml /usr/share/containers/systemd/ovn_controller.yaml
46+
COPY embedded-services/quadlets/ovn-controller/ovn_controller.image /usr/share/containers/systemd/ovn_controller.image
47+
COPY embedded-services/quadlets/iscsid/iscsid.yaml /usr/share/containers/systemd/iscsid.yaml
48+
COPY embedded-services/quadlets/iscsid/iscsid.image /usr/share/containers/systemd/iscsid.image
49+
COPY embedded-services/quadlets/nova_compute/nova_compute.yaml /usr/share/containers/systemd/nova_compute.yaml
50+
COPY embedded-services/quadlets/nova_compute/nova_compute.image /usr/share/containers/systemd/nova_compute.image
51+
COPY embedded-services/quadlets/ovn_metadata_agent/ovn_metadata_agent.yaml /usr/share/containers/systemd/ovn_metadata_agent.yaml
52+
COPY embedded-services/quadlets/ovn_metadata_agent/ovn_metadata_agent.image /usr/share/containers/systemd/ovn_metadata_agent.image
53+
COPY embedded-services/quadlets/logrotate_crond/logrotate_crond.yaml /usr/share/containers/systemd/logrotate_crond.yaml
54+
COPY embedded-services/quadlets/logrotate_crond/logrotate_crond.image /usr/share/containers/systemd/logrotate_crond.image
55+
COPY embedded-services/quadlets/multipathd/multipathd.yaml /usr/share/containers/systemd/multipathd.yaml
56+
COPY embedded-services/quadlets/multipathd/multipathd.image /usr/share/containers/systemd/multipathd.image
57+
COPY embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.yaml /usr/share/containers/systemd/ceilometer_agent_compute.yaml
58+
COPY embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.image /usr/share/containers/systemd/ceilometer_agent_compute.image
59+
60+
# Pre-cache containers for each service
61+
RUN podman pull quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified
62+
RUN podman pull quay.io/podified-antelope-centos9/openstack-iscsid:current-podified
63+
RUN podman pull quay.io/podified-antelope-centos9/openstack-cron:current-podified
64+
RUN podman pull quay.io/podified-antelope-centos9/openstack-multipathd:current-podified
65+
RUN podman pull quay.io/podified-antelope-centos9/openstack-nova-compute:current-podified
66+
RUN podman pull quay.io/podified-antelope-centos9/openstack-ovn-controller:current-podified
67+
RUN podman pull quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[install]
2+
WantedBy=edpm-compute@ceilometer_agent_compute.service
3+
4+
[Image]
5+
Image=quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
bind-mount-options: /var/lib/openstack/cacerts/telemetry/tls-ca-bundle.pem:z
7+
creationTimestamp: "2024-11-21T04:54:58Z"
8+
labels:
9+
app: ceilometeragentcompute-pod
10+
name: ceilometeragentcompute-pod
11+
spec:
12+
containers:
13+
- args:
14+
- kolla_start
15+
env:
16+
- name: KOLLA_CONFIG_STRATEGY
17+
value: COPY_ALWAYS
18+
- name: OS_ENDPOINT_TYPE
19+
value: internal
20+
image: quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified
21+
name: ceilometeragentcompute
22+
securityContext:
23+
runAsGroup: 42405
24+
runAsUser: 42405
25+
seLinuxOptions:
26+
type: ceilometer_polling_t
27+
volumeMounts:
28+
- mountPath: /openstack
29+
name: var-lib-openstack-healthchecks-ceilometer_agent_compute-host-0
30+
readOnly: true
31+
- mountPath: /run/libvirt
32+
name: run-libvirt-host-2
33+
readOnly: true
34+
- mountPath: /dev/log
35+
name: dev-log-host-3
36+
- mountPath: /var/lib/kolla/config_files/config.json
37+
name: var-lib-openstack-config-telemetry-ceilometer-agent-compute.json-host-6
38+
- mountPath: /etc/hosts
39+
name: etc-hosts-host-7
40+
readOnly: true
41+
- mountPath: /var/lib/openstack/config/
42+
name: var-lib-openstack-config-telemetry-host-8
43+
- mountPath: /etc/localtime
44+
name: etc-localtime-host-9
45+
readOnly: true
46+
hostNetwork: true
47+
hostname: edpm-compute-0
48+
volumes:
49+
- hostPath:
50+
path: /var/lib/openstack/healthchecks/ceilometer_agent_compute
51+
type: Directory
52+
name: var-lib-openstack-healthchecks-ceilometer_agent_compute-host-0
53+
- hostPath:
54+
path: /run/libvirt
55+
type: Directory
56+
name: run-libvirt-host-2
57+
- hostPath:
58+
path: /dev/log
59+
type: File
60+
name: dev-log-host-3
61+
- hostPath:
62+
path: /etc/pki/ca-trust/source/anchors
63+
type: Directory
64+
name: etc-pki-ca-trust-source-anchors-host-4
65+
- hostPath:
66+
path: /var/lib/openstack/config/telemetry/ceilometer-agent-compute.json
67+
type: File
68+
name: var-lib-openstack-config-telemetry-ceilometer-agent-compute.json-host-6
69+
- hostPath:
70+
path: /etc/hosts
71+
type: File
72+
name: etc-hosts-host-7
73+
- hostPath:
74+
path: /var/lib/openstack/config/telemetry
75+
type: Directory
76+
name: var-lib-openstack-config-telemetry-host-8
77+
- hostPath:
78+
path: /etc/localtime
79+
type: File
80+
name: etc-localtime-host-9
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[install]
2+
3+
4+
[Image]
5+
Image=quay.io/podified-antelope-centos9/openstack-iscsid:current-podified
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
bind-mount-options: /var/lib/openstack/healthchecks/iscsid:z
7+
creationTimestamp: "2024-11-20T02:16:18Z"
8+
labels:
9+
app: iscsid-pod
10+
name: iscsid-pod
11+
spec:
12+
containers:
13+
- args:
14+
- kolla_start
15+
env:
16+
- name: KOLLA_CONFIG_STRATEGY
17+
value: COPY_ALWAYS
18+
image: quay.io/podified-antelope-centos9/openstack-iscsid@sha256:4c9b5389a2564388e7a862d5756c37dc7d9739472b8d822dd6faae868a483a2d
19+
name: iscsid
20+
securityContext:
21+
privileged: true
22+
procMount: Unmasked
23+
volumeMounts:
24+
- mountPath: /etc/target
25+
name: etc-target-host-1
26+
- mountPath: /sys
27+
name: sys-host-3
28+
- mountPath: /dev/log
29+
name: dev-log-host-4
30+
- mountPath: /lib/modules
31+
name: lib-modules-host-5
32+
readOnly: true
33+
- mountPath: /var/lib/iscsi
34+
name: var-lib-iscsi-host-6
35+
- mountPath: /etc/hosts
36+
name: etc-hosts-host-7
37+
readOnly: true
38+
- mountPath: /etc/localtime
39+
name: etc-localtime-host-8
40+
readOnly: true
41+
- mountPath: /var/lib/kolla/config_files/config.json
42+
name: var-lib-kolla-config_files-iscsid.json-host-12
43+
readOnly: true
44+
- mountPath: /etc/iscsi
45+
name: etc-iscsi-host-13
46+
- mountPath: /run
47+
name: run-host-14
48+
- mountPath: /dev
49+
name: dev-host-15
50+
- mountPath: /openstack
51+
name: var-lib-openstack-healthchecks-iscsid-host-16
52+
readOnly: true
53+
hostNetwork: true
54+
hostname: edpm-compute-0
55+
volumes:
56+
- hostPath:
57+
path: /etc/target
58+
type: Directory
59+
name: etc-target-host-1
60+
- hostPath:
61+
path: /sys
62+
type: Directory
63+
name: sys-host-3
64+
- hostPath:
65+
path: /dev/log
66+
type: File
67+
name: dev-log-host-4
68+
- hostPath:
69+
path: /lib/modules
70+
type: Directory
71+
name: lib-modules-host-5
72+
- hostPath:
73+
path: /var/lib/iscsi
74+
type: Directory
75+
name: var-lib-iscsi-host-6
76+
- hostPath:
77+
path: /etc/hosts
78+
type: File
79+
name: etc-hosts-host-7
80+
- hostPath:
81+
path: /etc/localtime
82+
type: File
83+
name: etc-localtime-host-8
84+
- hostPath:
85+
path: /var/lib/kolla/config_files/iscsid.json
86+
type: File
87+
name: var-lib-kolla-config_files-iscsid.json-host-12
88+
- hostPath:
89+
path: /etc/iscsi
90+
type: Directory
91+
name: etc-iscsi-host-13
92+
- hostPath:
93+
path: /run
94+
type: Directory
95+
name: run-host-14
96+
- hostPath:
97+
path: /dev
98+
type: Directory
99+
name: dev-host-15
100+
- hostPath:
101+
path: /var/lib/openstack/healthchecks/iscsid
102+
type: Directory
103+
name: var-lib-openstack-healthchecks-iscsid-host-16
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[install]
2+
WantedBy=edpm-compute@logrotate_crond.service
3+
4+
[Image]
5+
Image=quay.io/podified-antelope-centos9/openstack-cron:current-podified
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
apiVersion: v1
3+
kind: Pod
4+
metadata:
5+
annotations:
6+
bind-mount-options: /var/lib/openstack/healthchecks/logrotate_crond:z
7+
creationTimestamp: "2024-11-21T04:43:22Z"
8+
labels:
9+
app: logrotatecrond-pod
10+
name: logrotatecrond-pod
11+
spec:
12+
containers:
13+
- args:
14+
- kolla_start
15+
env:
16+
- name: KOLLA_CONFIG_STRATEGY
17+
value: COPY_ALWAYS
18+
- name: EDPM_CONFIG_HASH
19+
value: dbeb85a6e8c49962f43cd1b33d267c56e4fc2875277fdec63dde667651963664
20+
image: quay.io/podified-antelope-centos9/openstack-cron:current-podified
21+
name: logrotatecrond
22+
securityContext:
23+
privileged: true
24+
procMount: Unmasked
25+
volumeMounts:
26+
- mountPath: /dev/log
27+
name: dev-log-host-2
28+
- mountPath: /var/lib/kolla/config_files/src
29+
name: var-lib-config-data-ansible-generated-crond-host-3
30+
readOnly: true
31+
- mountPath: /var/log/containers
32+
name: var-log-containers-host-4
33+
- mountPath: /etc/localtime
34+
name: etc-localtime-host-7
35+
readOnly: true
36+
- mountPath: /etc/hosts
37+
name: etc-hosts-host-9
38+
readOnly: true
39+
- mountPath: /var/lib/kolla/config_files/config.json
40+
name: var-lib-kolla-config_files-logrotate_crond.json-host-10
41+
readOnly: true
42+
- mountPath: /openstack
43+
name: var-lib-openstack-healthchecks-logrotate_crond-host-11
44+
readOnly: true
45+
volumes:
46+
- hostPath:
47+
path: /dev/log
48+
type: File
49+
name: dev-log-host-2
50+
- hostPath:
51+
path: /var/lib/config-data/ansible-generated/crond
52+
type: Directory
53+
name: var-lib-config-data-ansible-generated-crond-host-3
54+
- hostPath:
55+
path: /var/log/containers
56+
type: Directory
57+
name: var-log-containers-host-4
58+
- hostPath:
59+
path: /etc/pki/tls/certs/ca-bundle.crt
60+
type: File
61+
- hostPath:
62+
path: /etc/localtime
63+
type: File
64+
name: etc-localtime-host-7
65+
- hostPath:
66+
path: /etc/hosts
67+
type: File
68+
name: etc-hosts-host-9
69+
- hostPath:
70+
path: /var/lib/kolla/config_files/logrotate_crond.json
71+
type: File
72+
name: var-lib-kolla-config_files-logrotate_crond.json-host-10
73+
- hostPath:
74+
path: /var/lib/openstack/healthchecks/logrotate_crond
75+
type: Directory
76+
name: var-lib-openstack-healthchecks-logrotate_crond-host-11
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[install]
2+
3+
4+
[Image]
5+
Image=quay.io/podified-antelope-centos9/openstack-multipathd:current-podified

0 commit comments

Comments
 (0)