Skip to content
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

New infra image start #1292

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use container-ipa.target from freeipa-container container project
This reduces the number of started services in the container. The
fixipaip.service needed to be adapted to ensure that the service is
started properly.

The dockerfiles have been adapted for this change also.
  • Loading branch information
t-woerner committed Sep 16, 2024
commit 02fb822d95bd6f66112732d2ce772095c7759c3c
13 changes: 13 additions & 0 deletions infra/image/dockerfile/c10s
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ dnf --assumeyes install \
iproute; \
rm -rf /var/cache/dnf/;

RUN (cd /lib/systemd/system/; \
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
ln -s dbus-broker.service dbus.service; \
fi \
)
COPY system-service/container-ipa.target /lib/systemd/system/
RUN systemctl set-default container-ipa.target
RUN (cd /etc/systemd/system/; \
rm -rf multi-user.target.wants \
&& mkdir container-ipa.target.wants \
&& ln -s container-ipa.target.wants multi-user.target.wants \
)

COPY system-service/fixnet.sh /root/
COPY system-service/fixipaip.sh /root/
COPY system-service/fixnet.service /etc/systemd/system/
Expand Down
13 changes: 13 additions & 0 deletions infra/image/dockerfile/c8s
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ dnf --assumeyes install \
dnf clean all; \
rm -rf /var/cache/dnf/;

RUN (cd /lib/systemd/system/; \
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
ln -s dbus-broker.service dbus.service; \
fi \
)
COPY system-service/container-ipa.target /lib/systemd/system/
RUN systemctl set-default container-ipa.target
RUN (cd /etc/systemd/system/; \
rm -rf multi-user.target.wants \
&& mkdir container-ipa.target.wants \
&& ln -s container-ipa.target.wants multi-user.target.wants \
)

COPY system-service/fixnet.sh /root/
COPY system-service/fixipaip.sh /root/
COPY system-service/fixnet.service /etc/systemd/system/
Expand Down
13 changes: 13 additions & 0 deletions infra/image/dockerfile/c9s
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ dnf --assumeyes install \
iproute; \
rm -rf /var/cache/dnf/;

RUN (cd /lib/systemd/system/; \
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
ln -s dbus-broker.service dbus.service; \
fi \
)
COPY system-service/container-ipa.target /lib/systemd/system/
RUN systemctl set-default container-ipa.target
RUN (cd /etc/systemd/system/; \
rm -rf multi-user.target.wants \
&& mkdir container-ipa.target.wants \
&& ln -s container-ipa.target.wants multi-user.target.wants \
)

COPY system-service/fixnet.sh /root/
COPY system-service/fixipaip.sh /root/
COPY system-service/fixnet.service /etc/systemd/system/
Expand Down
13 changes: 13 additions & 0 deletions infra/image/dockerfile/fedora-latest
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ dnf --assumeyes install \
dnf clean all; \
rm -rf /var/cache/dnf/;

RUN (cd /lib/systemd/system/; \
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
ln -s dbus-broker.service dbus.service; \
fi \
)
COPY system-service/container-ipa.target /lib/systemd/system/
RUN systemctl set-default container-ipa.target
RUN (cd /etc/systemd/system/; \
rm -rf multi-user.target.wants \
&& mkdir container-ipa.target.wants \
&& ln -s container-ipa.target.wants multi-user.target.wants \
)

COPY system-service/fixnet.sh /root/
COPY system-service/fixipaip.sh /root/
COPY system-service/fixnet.service /etc/systemd/system/
Expand Down
13 changes: 13 additions & 0 deletions infra/image/dockerfile/fedora-rawhide
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ dnf --assumeyes install \
dnf clean all; \
rm -rf /var/cache/dnf/;

RUN (cd /lib/systemd/system/; \
if [ -e dbus-broker.service ] && [ ! -e dbus.service ]; then \
ln -s dbus-broker.service dbus.service; \
fi \
)
COPY system-service/container-ipa.target /lib/systemd/system/
RUN systemctl set-default container-ipa.target
RUN (cd /etc/systemd/system/; \
rm -rf multi-user.target.wants \
&& mkdir container-ipa.target.wants \
&& ln -s container-ipa.target.wants multi-user.target.wants \
)

COPY system-service/fixnet.sh /root/
COPY system-service/fixipaip.sh /root/
COPY system-service/fixnet.service /etc/systemd/system/
Expand Down
6 changes: 6 additions & 0 deletions infra/image/system-service/container-ipa.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Unit]
Description=Minimal target for containerized FreeIPA server
DefaultDependencies=false
AllowIsolate=yes
Requires=systemd-tmpfiles-setup.service systemd-journald.service dbus.service
After=systemd-tmpfiles-setup.service systemd-journald.service dbus.service
2 changes: 1 addition & 1 deletion infra/image/system-service/fixipaip.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Fix IPA server IP in IPA Server
After=multi-user.target
After=ipa.service

[Service]
Type=oneshot
Expand Down