-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logically bound images for EDPM services #39
Draft
bshephar
wants to merge
3
commits into
openstack-k8s-operators:main
Choose a base branch
from
bshephar:logically-bound-images
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+951
−30
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,36 +4,39 @@ RUN rm -rf /etc/yum.repos.d/*.repo | |
COPY output/yum.repos.d /etc/yum.repos.d | ||
|
||
ARG PACKAGES="\ | ||
bind-utils \ | ||
buildah \ | ||
cephadm \ | ||
chrony \ | ||
cloud-init \ | ||
cronie \ | ||
crudini \ | ||
crypto-policies-scripts \ | ||
device-mapper-multipath \ | ||
driverctl \ | ||
grubby \ | ||
iproute-tc \ | ||
iptables-services \ | ||
iscsi-initiator-utils \ | ||
jq \ | ||
lvm2 \ | ||
nftables \ | ||
numactl \ | ||
openssh-server \ | ||
openstack-network-scripts \ | ||
openstack-selinux \ | ||
openvswitch \ | ||
os-net-config \ | ||
podman \ | ||
python3-libselinux \ | ||
python3-pyyaml \ | ||
rsync \ | ||
tmpwatch \ | ||
tuned-profiles-cpu-partitioning \ | ||
sysstat" | ||
bind-utils \ | ||
buildah \ | ||
cephadm \ | ||
chrony \ | ||
cloud-init \ | ||
cronie \ | ||
crudini \ | ||
crypto-policies-scripts \ | ||
device-mapper-multipath \ | ||
driverctl \ | ||
grubby \ | ||
iproute-tc \ | ||
iptables-services \ | ||
iscsi-initiator-utils \ | ||
jq \ | ||
libvirt \ | ||
libvirt-daemon-driver-qemu \ | ||
lvm2 \ | ||
nftables \ | ||
numactl \ | ||
openssh-server \ | ||
openstack-network-scripts \ | ||
openstack-selinux \ | ||
openvswitch \ | ||
os-net-config \ | ||
podman \ | ||
python3-libselinux \ | ||
python3-pyroute2 \ | ||
python3-pyyaml \ | ||
rsync \ | ||
tmpwatch \ | ||
tuned-profiles-cpu-partitioning \ | ||
sysstat" | ||
ARG ENABLE_UNITS="openvswitch" | ||
|
||
RUN dnf -y install $PACKAGES && dnf clean all && systemctl enable $ENABLE_UNITS | ||
|
@@ -46,3 +49,18 @@ RUN ln -s /etc/sysconfig/network-scripts/ifdown /usr/sbin/ifdown | |
# Drop Ansible fact into place | ||
COPY ansible-facts/bootc.fact /usr/etc/ansible/facts.d/bootc.fact | ||
RUN chmod +x /usr/etc/ansible/facts.d/bootc.fact | ||
|
||
# Template systemd service for services | ||
COPY embedded-services/quadlets/systemd/service-template.kube /usr/share/containers/systemd/[email protected] | ||
|
||
## Service specific quadlets | ||
COPY embedded-services/quadlets/*/* /usr/share/containers/systemd/ | ||
|
||
# Pre-cache containers for each service | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-iscsid:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-cron:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-multipathd:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-nova-compute:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-ovn-controller:current-podified | ||
RUN podman pull quay.io/podified-antelope-centos9/openstack-neutron-metadata-agent-ovn:current-podified | ||
5 changes: 5 additions & 0 deletions
5
bootc/embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[install] | ||
WantedBy=edpm-compute@ceilometer_agent_compute.service | ||
|
||
[Image] | ||
Image=quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified |
95 changes: 95 additions & 0 deletions
95
bootc/embedded-services/quadlets/ceilometer_agent_compute/ceilometer_agent_compute.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
annotations: | ||
bind-mount-options: /var/lib/openstack/cacerts/telemetry/tls-ca-bundle.pem:z | ||
labels: | ||
app: ceilometeragentcompute | ||
name: ceilometeragentcompute | ||
spec: | ||
containers: | ||
- args: | ||
- kolla_start | ||
env: | ||
- name: KOLLA_CONFIG_STRATEGY | ||
value: COPY_ALWAYS | ||
- name: OS_ENDPOINT_TYPE | ||
value: internal | ||
image: quay.io/podified-antelope-centos9/openstack-ceilometer-compute@sha256:f6bba9df7ce1d877daa7fe2cd36e5149b99ded1f3e9b88576944d83a4429f25b | ||
name: ceilometeragentcompute | ||
securityContext: | ||
runAsGroup: 42405 | ||
runAsUser: 42405 | ||
seLinuxOptions: | ||
type: ceilometer_polling_t | ||
volumeMounts: | ||
- mountPath: /openstack | ||
name: var-lib-openstack-healthchecks-ceilometer_agent_compute-host-0 | ||
readOnly: true | ||
- mountPath: /etc/pki/tls/certs/ca-bundle.trust.crt | ||
name: etc-pki-tls-certs-ca-bundle.trust.crt-host-1 | ||
readOnly: true | ||
- mountPath: /run/libvirt | ||
name: run-libvirt-host-2 | ||
readOnly: true | ||
- mountPath: /dev/log | ||
name: dev-log-host-3 | ||
- mountPath: /etc/pki/ca-trust/source/anchors | ||
name: etc-pki-ca-trust-source-anchors-host-4 | ||
readOnly: true | ||
- mountPath: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | ||
name: var-lib-openstack-cacerts-telemetry-tls-ca-bundle.pem-host-5 | ||
readOnly: true | ||
- mountPath: /var/lib/kolla/config_files/config.json | ||
name: var-lib-openstack-config-telemetry-ceilometer-agent-compute.json-host-6 | ||
- mountPath: /etc/hosts | ||
name: etc-hosts-host-7 | ||
readOnly: true | ||
- mountPath: /var/lib/openstack/config/ | ||
name: var-lib-openstack-config-telemetry-host-8 | ||
- mountPath: /etc/localtime | ||
name: etc-localtime-host-9 | ||
readOnly: true | ||
hostNetwork: true | ||
volumes: | ||
- hostPath: | ||
path: /var/lib/openstack/healthchecks/ceilometer_agent_compute | ||
type: Directory | ||
name: var-lib-openstack-healthchecks-ceilometer_agent_compute-host-0 | ||
- hostPath: | ||
path: /etc/pki/tls/certs/ca-bundle.trust.crt | ||
type: File | ||
name: etc-pki-tls-certs-ca-bundle.trust.crt-host-1 | ||
- hostPath: | ||
path: /run/libvirt | ||
type: Directory | ||
name: run-libvirt-host-2 | ||
- hostPath: | ||
path: /dev/log | ||
type: File | ||
name: dev-log-host-3 | ||
- hostPath: | ||
path: /etc/pki/ca-trust/source/anchors | ||
type: Directory | ||
name: etc-pki-ca-trust-source-anchors-host-4 | ||
- hostPath: | ||
path: /var/lib/openstack/cacerts/telemetry/tls-ca-bundle.pem | ||
type: File | ||
name: var-lib-openstack-cacerts-telemetry-tls-ca-bundle.pem-host-5 | ||
- hostPath: | ||
path: /var/lib/openstack/config/telemetry/ceilometer-agent-compute.json | ||
type: File | ||
name: var-lib-openstack-config-telemetry-ceilometer-agent-compute.json-host-6 | ||
- hostPath: | ||
path: /etc/hosts | ||
type: File | ||
name: etc-hosts-host-7 | ||
- hostPath: | ||
path: /var/lib/openstack/config/telemetry | ||
type: Directory | ||
name: var-lib-openstack-config-telemetry-host-8 | ||
- hostPath: | ||
path: /etc/localtime | ||
type: File | ||
name: etc-localtime-host-9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[install] | ||
[email protected] | ||
|
||
[Image] | ||
Image=quay.io/podified-antelope-centos9/openstack-iscsid:current-podified |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
annotations: | ||
bind-mount-options: /etc/iscsi:z | ||
creationTimestamp: "2024-12-09T02:00:14Z" | ||
labels: | ||
app: iscsid | ||
name: iscsid | ||
spec: | ||
containers: | ||
- args: | ||
- kolla_start | ||
env: | ||
- name: KOLLA_CONFIG_STRATEGY | ||
value: COPY_ALWAYS | ||
image: quay.io/podified-antelope-centos9/openstack-iscsid@sha256:4c9b5389a2564388e7a862d5756c37dc7d9739472b8d822dd6faae868a483a2d | ||
name: iscsid | ||
securityContext: | ||
privileged: true | ||
procMount: Unmasked | ||
volumeMounts: | ||
- mountPath: /etc/pki/ca-trust/source/anchors | ||
name: etc-pki-ca-trust-source-anchors-host-0 | ||
readOnly: true | ||
- mountPath: /etc/target | ||
name: etc-target-host-1 | ||
- mountPath: /etc/pki/tls/cert.pem | ||
name: etc-pki-tls-cert.pem-host-2 | ||
readOnly: true | ||
- mountPath: /sys | ||
name: sys-host-3 | ||
- mountPath: /dev/log | ||
name: dev-log-host-4 | ||
- mountPath: /lib/modules | ||
name: lib-modules-host-5 | ||
readOnly: true | ||
- mountPath: /var/lib/iscsi | ||
name: var-lib-iscsi-host-6 | ||
- mountPath: /etc/hosts | ||
name: etc-hosts-host-7 | ||
readOnly: true | ||
- mountPath: /etc/localtime | ||
name: etc-localtime-host-8 | ||
readOnly: true | ||
- mountPath: /etc/pki/tls/certs/ca-bundle.crt | ||
name: etc-pki-tls-certs-ca-bundle.crt-host-9 | ||
readOnly: true | ||
- mountPath: /etc/pki/tls/certs/ca-bundle.trust.crt | ||
name: etc-pki-tls-certs-ca-bundle.trust.crt-host-10 | ||
readOnly: true | ||
- mountPath: /etc/pki/ca-trust/extracted | ||
name: etc-pki-ca-trust-extracted-host-11 | ||
readOnly: true | ||
- mountPath: /var/lib/kolla/config_files/config.json | ||
name: var-lib-kolla-config_files-iscsid.json-host-12 | ||
readOnly: true | ||
- mountPath: /etc/iscsi | ||
name: etc-iscsi-host-13 | ||
- mountPath: /run | ||
name: run-host-14 | ||
- mountPath: /dev | ||
name: dev-host-15 | ||
- mountPath: /openstack | ||
name: var-lib-openstack-healthchecks-iscsid-host-16 | ||
readOnly: true | ||
hostNetwork: true | ||
volumes: | ||
- hostPath: | ||
path: /etc/pki/ca-trust/source/anchors | ||
type: Directory | ||
name: etc-pki-ca-trust-source-anchors-host-0 | ||
- hostPath: | ||
path: /etc/target | ||
type: Directory | ||
name: etc-target-host-1 | ||
- hostPath: | ||
path: /etc/pki/tls/cert.pem | ||
type: File | ||
name: etc-pki-tls-cert.pem-host-2 | ||
- hostPath: | ||
path: /sys | ||
type: Directory | ||
name: sys-host-3 | ||
- hostPath: | ||
path: /dev/log | ||
type: File | ||
name: dev-log-host-4 | ||
- hostPath: | ||
path: /lib/modules | ||
type: Directory | ||
name: lib-modules-host-5 | ||
- hostPath: | ||
path: /var/lib/iscsi | ||
type: Directory | ||
name: var-lib-iscsi-host-6 | ||
- hostPath: | ||
path: /etc/hosts | ||
type: File | ||
name: etc-hosts-host-7 | ||
- hostPath: | ||
path: /etc/localtime | ||
type: File | ||
name: etc-localtime-host-8 | ||
- hostPath: | ||
path: /etc/pki/tls/certs/ca-bundle.crt | ||
type: File | ||
name: etc-pki-tls-certs-ca-bundle.crt-host-9 | ||
- hostPath: | ||
path: /etc/pki/tls/certs/ca-bundle.trust.crt | ||
type: File | ||
name: etc-pki-tls-certs-ca-bundle.trust.crt-host-10 | ||
- hostPath: | ||
path: /etc/pki/ca-trust/extracted | ||
type: Directory | ||
name: etc-pki-ca-trust-extracted-host-11 | ||
- hostPath: | ||
path: /var/lib/kolla/config_files/iscsid.json | ||
type: File | ||
name: var-lib-kolla-config_files-iscsid.json-host-12 | ||
- hostPath: | ||
path: /etc/iscsi | ||
type: Directory | ||
name: etc-iscsi-host-13 | ||
- hostPath: | ||
path: /run | ||
type: Directory | ||
name: run-host-14 | ||
- hostPath: | ||
path: /dev | ||
type: Directory | ||
name: dev-host-15 | ||
- hostPath: | ||
path: /var/lib/openstack/healthchecks/iscsid | ||
type: Directory | ||
name: var-lib-openstack-healthchecks-iscsid-host-16 |
5 changes: 5 additions & 0 deletions
5
bootc/embedded-services/quadlets/logrotate_crond/logrotate_crond.image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[install] | ||
WantedBy=edpm-compute@logrotate_crond.service | ||
|
||
[Image] | ||
Image=quay.io/podified-antelope-centos9/openstack-cron:current-podified |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want each pull in its own layer? I don't know?? If we didn't then this could be reduced to a single RUN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually isn't working anymore. Complains about things not being available in the container environment. I'm actually noticing the same error with my laptop bootc image too. Maybe something changed in the base edpm centos image. For now, I'm just commenting these lines when I build the image and letting
systemd
pull the containers when the node boots.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these commands give me a lot of
cannot set user namespace
errors. sometimes it works, sometimes it doesn't.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe using
podman pull
in the Containerfile would make these images be classified as "physically bound"containers/bootc#644
AIUI, a difference between logically and physically images for bootc is that logically bound images are only referenced. And in order to reference them, the
.container
or.image
unit files should be symlinked under/usr/lib/bootc/bound-images.d
. This is explained in detail in https://containers.github.io/bootc/logically-bound-images.html#using-logically-bound-images.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it stopped working for me too. I think we can probably leave this particular part out for now and just pull the images we need during the deployment.
We'll just need to make sure we do all of the container
registries.conf
configuration before we try to pull them. Currently, in air-gapped deployments, we re-use theregistries.conf
from the OpenShift cluster when aImageContentSourcePolicy
is present:https://github.com/openstack-k8s-operators/openstack-operator/blob/main/docs/assemblies/proc_deploying-in-disconnected-environments.adoc
So we just need to make sure we maintain the ordering for bootc deployments as well.