[opennebula-docker] allow skip running libvirtd
This commit is contained in:
parent
0db50d637d
commit
f8d7800a5f
4 changed files with 50 additions and 6 deletions
16
opennebula-docker/Dockerfile_0.2.0
Normal file
16
opennebula-docker/Dockerfile_0.2.0
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM debian:trixie
|
||||
|
||||
COPY opennebula-virsh /etc/sudoers.d
|
||||
COPY entrypoint.sh /
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y gnupg2 openssh-server strace sudo wget ceph-common
|
||||
RUN wget -q -O- https://downloads.opennebula.io/repo/repo2.key | gpg --dearmor --yes --output /etc/apt/keyrings/opennebula.gpg
|
||||
RUN echo "deb [signed-by=/etc/apt/keyrings/opennebula.gpg] https://downloads.opennebula.io/repo/7.1/Debian/13 stable opennebula" > /etc/apt/sources.list.d/opennebula.list
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends opennebula-node-kvm
|
||||
|
||||
RUN mv /usr/bin/virsh /usr/bin/virsh.orig
|
||||
COPY virsh /usr/bin/virsh
|
||||
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
16
opennebula-docker/Dockerfile_0.2.1
Normal file
16
opennebula-docker/Dockerfile_0.2.1
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM debian:trixie
|
||||
|
||||
COPY opennebula-virsh /etc/sudoers.d
|
||||
COPY entrypoint.sh /
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y gnupg2 openssh-server strace sudo wget ceph-common
|
||||
RUN wget -q -O- https://downloads.opennebula.io/repo/repo2.key | gpg --dearmor --yes --output /etc/apt/keyrings/opennebula.gpg
|
||||
RUN echo "deb [signed-by=/etc/apt/keyrings/opennebula.gpg] https://downloads.opennebula.io/repo/7.1/Debian/13 stable opennebula" > /etc/apt/sources.list.d/opennebula.list
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends opennebula-node-kvm
|
||||
|
||||
RUN mv /usr/bin/virsh /usr/bin/virsh.orig
|
||||
COPY virsh /usr/bin/virsh
|
||||
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
7
opennebula-docker/README.org
Normal file
7
opennebula-docker/README.org
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
* 0.2.1, 2026-04-04
|
||||
- Allow disabling running libvirtd
|
||||
* 0.2.0, 2026-04-03
|
||||
- Try to switch to trixie instead of bookworm
|
||||
- Use opennebula 7.1 repo
|
||||
* 0.1.0, 2026-04-03
|
||||
- Update entrypoint for ceph/rook
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
#!/bin/sh
|
||||
# 2026-04-04, Nico Schottelius, Lachen SZ
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# Add SSH key & start sshd
|
||||
su - oneadmin -c "umask 077; mkdir -p ~/.ssh; echo ${ONEADMIN_SSH_KEY} > ~/.ssh/authorized_keys"
|
||||
|
||||
/etc/init.d/ssh start
|
||||
|
||||
|
||||
while true; do
|
||||
######################################################################
|
||||
# /etc/hosts logic
|
||||
|
|
@ -36,12 +39,14 @@ EOF
|
|||
|
||||
######################################################################
|
||||
# libvirtd logic
|
||||
if [ -f "$pidfile" ]; then
|
||||
libvirtd_pid=$(cat $pidfile)
|
||||
kill -9 $libvirtd_pid
|
||||
fi
|
||||
if [ -z "$SKIP_LIBVIRTD" ]; then
|
||||
if [ -f "$pidfile" ]; then
|
||||
libvirtd_pid=$(cat $pidfile)
|
||||
kill -9 $libvirtd_pid
|
||||
fi
|
||||
|
||||
/usr/sbin/libvirtd --daemon --pid-file $pidfile
|
||||
/usr/sbin/libvirtd --daemon --pid-file $pidfile
|
||||
fi
|
||||
|
||||
sleep 3600
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue