From 8e92ae5f4676624f4449c8190d231c30678fe3f4 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 5 May 2021 13:24:38 +0200 Subject: [PATCH 01/13] Add OpenNebula v5.12.0.4 docker images --- dockerfiles/build.sh | 8 -- dockerfiles/opennebula-exporter/Dockerfile | 111 ++----------------- dockerfiles/opennebula-flow/Dockerfile | 112 ++----------------- dockerfiles/opennebula-gate/Dockerfile | 112 ++----------------- dockerfiles/opennebula-node/Dockerfile | 107 +----------------- dockerfiles/opennebula-node/Dockerfile.new | 93 ---------------- dockerfiles/opennebula-packages/Dockerfile | 121 +++++++++++++++++++++ dockerfiles/opennebula-sunstone/Dockerfile | 112 ++----------------- dockerfiles/opennebula/Dockerfile | 112 ++----------------- dockerfiles/push.sh | 8 -- 10 files changed, 173 insertions(+), 723 deletions(-) delete mode 100755 dockerfiles/build.sh delete mode 100644 dockerfiles/opennebula-node/Dockerfile.new create mode 100644 dockerfiles/opennebula-packages/Dockerfile delete mode 100755 dockerfiles/push.sh diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh deleted file mode 100755 index f6cf17f..0000000 --- a/dockerfiles/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -cd $(dirname $0) - -for image in $(find . -maxdepth 2 -name Dockerfile | awk -F/ '{print $2}'); do - (set -x; docker build -t ${CI_REGISTRY_IMAGE:-kvaps}/$image:${CI_COMMIT_REF_NAME:-latest} $image) -done diff --git a/dockerfiles/opennebula-exporter/Dockerfile b/dockerfiles/opennebula-exporter/Dockerfile index d81bb11..0028cdc 100644 --- a/dockerfiles/opennebula-exporter/Dockerfile +++ b/dockerfiles/opennebula-exporter/Dockerfile @@ -1,119 +1,28 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-common and rubygems -COPY --from=builder /opennebula-common_*.deb /ruby-opennebula_*_all.deb /opennebula-tools_*.deb /opennebula-rubygem*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/ruby-opennebula_*_all.deb /packages/opennebula-tools_*.deb /packages/opennebula-rubygems_*.deb /packages/opennebula-common-onescape_*.deb /packages/ RUN apt-get update \ + && ln -s /bin/true /usr/bin/systemd-tmpfiles \ && apt-get -y install /packages/*.deb \ && mkdir -p /var/log/one /var/lock/one /var/run/one \ && apt-get -y clean \ - && chown oneadmin: /var/log/one /var/lock/one /var/run/one /var/run/one + && rm -rf /var/lib/apt/lists/ \ + && chown oneadmin: /var/log/one /var/lock/one /var/run/one # Logging to stdout RUN for i in oned.log sched.log onehem.log sunstone.log novnc.log onegate.log oneflow.log; do ln -sf "/proc/1/fd/1" "/var/log/one/$i"; done -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ - +# Install opennebula-exporter dependencies RUN apt-get update \ && apt-get -y install xmlstarlet \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ COPY --from=prom/node-exporter:v0.18.1 /bin/node_exporter /bin/node_exporter -ADD https://raw.githubusercontent.com/kvaps/opennebula-exporter/7b4c10ec07377d1b4b9094020c856b0b6c0b5c73/opennebula_exporter /bin/opennebula_exporter +ADD https://raw.githubusercontent.com/kvaps/opennebula-exporter/7b4c10ec07377d1b4b9094020c856b0b6c0b5c73/opennebula_exporter /usr/bin/opennebula_exporter RUN chmod 755 /bin/opennebula_exporter \ && mkdir -p /metrics \ && chown oneadmin:oneadmin /metrics diff --git a/dockerfiles/opennebula-flow/Dockerfile b/dockerfiles/opennebula-flow/Dockerfile index 86c0218..cb9f4b6 100644 --- a/dockerfiles/opennebula-flow/Dockerfile +++ b/dockerfiles/opennebula-flow/Dockerfile @@ -1,121 +1,27 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-common and rubygems -COPY --from=builder /opennebula-common_*.deb /ruby-opennebula_*_all.deb /opennebula-tools_*.deb /opennebula-rubygem*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/ruby-opennebula_*_all.deb /packages/opennebula-tools_*.deb /packages/opennebula-rubygems_*.deb /packages/opennebula-common-onescape_*.deb /packages/ RUN apt-get update \ + && ln -s /bin/true /usr/bin/systemd-tmpfiles \ && apt-get -y install /packages/*.deb \ && mkdir -p /var/log/one /var/lock/one /var/run/one \ && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ \ && chown oneadmin: /var/log/one /var/lock/one /var/run/one # Logging to stdout RUN for i in oned.log sched.log onehem.log sunstone.log novnc.log onegate.log oneflow.log; do ln -sf "/proc/1/fd/1" "/var/log/one/$i"; done -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ - # Install opennebula-flow -COPY --from=builder /opennebula-flow_*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-flow_*.deb /packages/opennebula_*.deb /packages/ RUN apt-get -y update \ - && ln -s /bin/true /usr/bin/systemd-tmpfiles \ - && dpkg -i packages/opennebula-flow_*.deb || true \ - && apt-get -yf install \ + && apt-get -y install /packages/opennebula-flow_*.deb /packages/opennebula_*.deb \ && rm -f /usr/bin/systemd-tmpfiles \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ # Fix permissions RUN chown -R oneadmin:oneadmin /etc/one diff --git a/dockerfiles/opennebula-gate/Dockerfile b/dockerfiles/opennebula-gate/Dockerfile index a66f250..cd0f39d 100644 --- a/dockerfiles/opennebula-gate/Dockerfile +++ b/dockerfiles/opennebula-gate/Dockerfile @@ -1,121 +1,27 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-common and rubygems -COPY --from=builder /opennebula-common_*.deb /ruby-opennebula_*_all.deb /opennebula-tools_*.deb /opennebula-rubygem*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/ruby-opennebula_*_all.deb /packages/opennebula-tools_*.deb /packages/opennebula-rubygems_*.deb /packages/opennebula-common-onescape_*.deb /packages/ RUN apt-get update \ + && ln -s /bin/true /usr/bin/systemd-tmpfiles \ && apt-get -y install /packages/*.deb \ && mkdir -p /var/log/one /var/lock/one /var/run/one \ && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ \ && chown oneadmin: /var/log/one /var/lock/one /var/run/one # Logging to stdout RUN for i in oned.log sched.log onehem.log sunstone.log novnc.log onegate.log oneflow.log; do ln -sf "/proc/1/fd/1" "/var/log/one/$i"; done -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ - # Install opennebula -COPY --from=builder /opennebula-gate_*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-gate_*.deb /packages/ RUN apt-get -y update \ - && ln -s /bin/true /usr/bin/systemd-tmpfiles \ - && dpkg -i packages/opennebula-gate_*.deb || true \ - && apt-get -yf install \ + && apt-get -y install /packages/opennebula-gate_*.deb \ && rm -f /usr/bin/systemd-tmpfiles \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ # Fix permissions RUN chown -R oneadmin:oneadmin /etc/one diff --git a/dockerfiles/opennebula-node/Dockerfile b/dockerfiles/opennebula-node/Dockerfile index 0b7bb02..db92720 100644 --- a/dockerfiles/opennebula-node/Dockerfile +++ b/dockerfiles/opennebula-node/Dockerfile @@ -1,108 +1,13 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 - -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-node -COPY --from=builder /opennebula-node_*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/opennebula-common-onescape_*.deb /packages/opennebula-node_*.deb /packages/ RUN apt-get -y update \ && ln -s /bin/true /usr/local/bin/systemctl \ - && dpkg -i packages/opennebula-node_*.deb || true \ - && apt-get -yf install \ + && apt-get -y install /packages/*.deb \ && rm -f /usr/local/bin/systemctl \ && rm -f /etc/libvirt/qemu/networks/autostart/default.xml \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ diff --git a/dockerfiles/opennebula-node/Dockerfile.new b/dockerfiles/opennebula-node/Dockerfile.new deleted file mode 100644 index 6944e1c..0000000 --- a/dockerfiles/opennebula-node/Dockerfile.new +++ /dev/null @@ -1,93 +0,0 @@ -FROM ubuntu:18.04 as builder - -ARG QEMU_VERSION=4.0.0 -ARG LIBVIRT_VERSION=5.3.0 - -RUN apt-get -y update \ - && apt-get -y install \ - curl \ - xz-utils \ - && echo "deb-src http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse" \ - > /etc/apt/sources.list.d/bionic-udates-src.list \ - && apt-get -y update \ - && apt-get -y build-dep qemu libvirt - -# Compile libvirt -RUN curl https://libvirt.org/sources/libvirt-${LIBVIRT_VERSION}.tar.xz | tar xJf - \ - && cd libvirt-${LIBVIRT_VERSION} \ - && ./configure \ - --enable-static \ - --prefix=/opt \ - --sysconfdir=/opt/etc \ - --localstatedir=/opt/var \ - --with-qemu=yes \ - --without-xenapi \ - --without-esx \ - --without-lxc \ - --without-uml \ - --without-libxl \ - --without-openvz \ - --without-vmware \ - --without-bhyve \ - --without-hyperv \ - --without-polkit \ - --without-glusterfs \ - --without-numad \ - --without-avahi \ - --without-secdriver-apparmor \ - --with-qemu-user=oneadmin \ - --with-qemu-group=oneadmin \ - && make - -# Make binary -RUN cd libvirt-${LIBVIRT_VERSION} \ - && make install DESTDIR=/tmp/libvirt-${LIBVIRT_VERSION} \ - && tar cpzf /libvirt.tar.gz -C /tmp/libvirt-${LIBVIRT_VERSION} . \ - && rm -rf /libvirt-${LIBVIRT_VERSION} /tmp/libvirt-${LIBVIRT_VERSION} - -# Compile qemu -RUN curl https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz | tar xJf - \ - && cd qemu-${QEMU_VERSION} \ - && ./configure \ - --static \ - --disable-system \ - --enable-linux-user \ - --prefix=/opt \ - --sysconfdir=/opt/etc \ - --localstatedir=/opt/var \ - && make - -# Make binary -RUN cd qemu-${QEMU_VERSION} \ - && make install DESTDIR=/tmp/qemu-${QEMU_VERSION} \ - && tar cpzf /qemu.tar.gz -C /tmp/qemu-${QEMU_VERSION} . \ - && rm -rf /qemu-${QEMU_VERSION} /tmp/qemu-${QEMU_VERSION} - - - -## Configure dpkg -#RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \ -# && apt-get -y update \ -# && apt-get -y install wget apt-transport-https gnupg \ -# && apt-get -y clean -# -# -# -# -## Backport qemu-kvm from xenial (https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1710960) -#RUN echo "deb http://archive.ubuntu.com/ubuntu/ xenial main\ndeb http://archive.ubuntu.com/ubuntu/ xenial-updates main" >> /etc/apt/sources.list \ -# && apt-get -y update \ -# && apt-get -y install qemu-utils/xenial-updates qemu-block-extra/xenial-updates qemu-kvm/xenial-updates qemu-system-x86/xenial-updates qemu-system-common/xenial-updates ipxe-qemu/xenial-updates acl libacl1 \ -# && apt-get -y clean \ -# && apt-mark hold qemu-utils qemu-block-extra qemu-kvm qemu-system-x86 qemu-system-common ipxe-qemu -# -## Install opennebula-node -#RUN wget -q -O- https://downloads.opennebula.org/repo/repo.key | apt-key add - \ -# && echo "deb https://downloads.opennebula.org/repo/5.8/Ubuntu/18.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list \ -# && apt-get -y update \ -# && ln -s /bin/true /usr/local/bin/systemctl \ -# && apt-get -y install opennebula-node \ -# && mkdir -p /var/run/sshd \ -# && rm -f /etc/libvirt/qemu/networks/autostart/default.xml \ -# && rm -f /usr/local/bin/systemctl \ -# && apt-get -y clean diff --git a/dockerfiles/opennebula-packages/Dockerfile b/dockerfiles/opennebula-packages/Dockerfile new file mode 100644 index 0000000..9df00b2 --- /dev/null +++ b/dockerfiles/opennebula-packages/Dockerfile @@ -0,0 +1,121 @@ +FROM ubuntu:20.04 as builder + +# Setup environment variables +ENV VERSION=5.12.0.4 \ + PACKAGES_VERSION=5.12.6 \ + PKG_VERSION=1 \ + CONTACT="Unsupported Community Build" \ + GIT_VERSION="not known" \ + DISTRO=ubuntu2004 \ + DEBIAN_FRONTEND=noninteractive + +# Install build dependencies (https://docs.opennebula.io/5.12/integration/references/build_deps.html) +RUN apt-get update \ + && apt-get install -y \ + ubuntu-dev-tools \ + bash-completion \ + bison \ + debhelper \ + default-jdk \ + flex \ + javahelper \ + libmysql++-dev \ + libsqlite3-dev \ + libssl-dev \ + libsystemd-dev \ + libws-commons-util-java \ + libxml2-dev \ + libxslt1-dev \ + libcurl4-openssl-dev \ + libcurl4 \ + libvncserver-dev \ + postgresql-server-dev-all \ + python3-setuptools \ + ruby \ + scons \ + npm \ + ronn \ + rename \ + jq + +# Download sources +RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ + && mv /one-release-$VERSION /opennebula-$VERSION \ + && wget -q -O - https://github.com/kvaps/packages/archive/release-$PACKAGES_VERSION.tar.gz | tar xzf - \ + && mv /packages-release-$PACKAGES_VERSION /packages-$VERSION + +WORKDIR /opennebula-$VERSION + +# Apply patches +RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 + +# Build docs +RUN cd share/man \ + && ./build.sh + +# Build Sunstone +RUN cd src/sunstone/public \ + && ./build.sh -d \ + && export PATH=$PATH:$PWD/node_modules/.bin \ + && ./build.sh \ + && rm -rf node_modules/ + +# Build Java OCA +#RUN cd src/oca/java \ +# && ./build.sh -d + +# Prepare sources +RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ + && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ + && wget -q https://downloads.opennebula.io/extra/xmlrpc-c.tar.gz \ + && wget -q https://downloads.opennebula.io/packages/opennebula-$VERSION/java-oca-$VERSION.tar.gz \ + && sed -i '/new_xmlrpc=yes/a\ context=yes \\' /packages-$VERSION/sources/build_opennebula.sh \ + && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch + +# Download Ruby gems +RUN bash -x /packages-$VERSION/rubygems/download.sh /opennebula_$VERSION.orig.tar.gz Ubuntu2004 opennebula-rubygems-$VERSION.tar + +# Build Ruby gems +RUN "/packages-$VERSION/rubygems/build.sh" \ + "/opennebula_$VERSION.orig.tar.gz" \ + "/" \ + "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ + "${VERSION}-${PKG_VERSION}" \ + "${CONTACT}" + +# Generate requirements for all Ruby gem packages and process control template +RUN for F in /opennebula-rubygem-*.deb; do \ + _NAME=$(dpkg-deb -f "${F}" Package); \ + _VERS=$(dpkg-deb -f "${F}" Version); \ + RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ + done \ + && m4 -D_VERSION_="${VERSION}" \ + -D_PKG_VERSION_="${PKG_VERSION}" \ + -D_CONTACT_="${CONTACT}" \ + -D_DATE_="${DATE}" \ + -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ + -D_WITH_RUBYGEMS_ \ + debian/control.m4 > debian/control + +# Generate changelog +RUN printf '%s\n\n' \ + "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ + " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ + " -- ${CONTACT} $(date -R)" \ + > debian/changelog + +# Generate gitversion +RUN echo "${GIT_VERSION}" > debian/gitversion + +# Build source package +RUN dpkg-source --include-binaries -b . + +# Install dependencies +RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed -e 's/.*Unmet build dependencies: //' -e 's/[\(][^)]*[\)]//g') + +# Build binary package +RUN dpkg-buildpackage -us -uc + +# Preserve only packages +FROM ubuntu:20.04 +COPY --from=builder /*.tar.xz /*.deb /packages/ diff --git a/dockerfiles/opennebula-sunstone/Dockerfile b/dockerfiles/opennebula-sunstone/Dockerfile index 95291dc..092fedc 100644 --- a/dockerfiles/opennebula-sunstone/Dockerfile +++ b/dockerfiles/opennebula-sunstone/Dockerfile @@ -1,122 +1,28 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-common and rubygems -COPY --from=builder /opennebula-common_*.deb /ruby-opennebula_*_all.deb /opennebula-tools_*.deb /opennebula-rubygem*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/ruby-opennebula_*_all.deb /packages/opennebula-tools_*.deb /packages/opennebula-rubygems_*.deb /packages/opennebula-common-onescape_*.deb /packages/ RUN apt-get update \ + && ln -s /bin/true /usr/bin/systemd-tmpfiles \ && apt-get -y install /packages/*.deb \ && mkdir -p /var/log/one /var/lock/one /var/run/one \ && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ \ && chown oneadmin: /var/log/one /var/lock/one /var/run/one # Logging to stdout RUN for i in oned.log sched.log onehem.log sunstone.log novnc.log onegate.log oneflow.log; do ln -sf "/proc/1/fd/1" "/var/log/one/$i"; done -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ - # Install opennebula-sunstone -COPY --from=builder /opennebula-sunstone_*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-sunstone_*.deb /packages/ RUN apt-get -y update \ - && ln -s /bin/true /usr/local/bin/systemd-tmpfiles \ - && dpkg -i packages/opennebula-sunstone_*.deb || true \ - && apt-get -yf install \ + && apt-get -y install /packages/opennebula-sunstone_*.deb \ && apt-get -y install libcurl4 \ && rm -f /usr/local/bin/systemd-tmpfiles \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ # Fix permissions RUN chown -R oneadmin:oneadmin /etc/one diff --git a/dockerfiles/opennebula/Dockerfile b/dockerfiles/opennebula/Dockerfile index 557b38c..b2649bc 100644 --- a/dockerfiles/opennebula/Dockerfile +++ b/dockerfiles/opennebula/Dockerfile @@ -1,122 +1,28 @@ -# ------------------------------------------------------------------------------ -# Common part -# ------------------------------------------------------------------------------ +FROM ubuntu:20.04 -# === Stage 1 === - -FROM ubuntu:18.04 as builder - -# Setup environment variables -ENV VERSION=5.10.5 \ - PKG_VERSION=1 \ - CONTACT="Unsupported Community Build" \ - GIT_VERSION="not known" \ - DISTRO=ubuntu1804 - -# Install build dependencies -RUN apt-get update \ - && apt-get install -y debhelper ubuntu-dev-tools bash-completion \ - bison default-jdk flex javahelper libxmlrpc3-client-java \ - libxmlrpc3-common-java libxml2-dev ruby scons dh-systemd \ - npm ruby-ronn rename - -# Download sources -RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /one-release-$VERSION /opennebula-$VERSION \ - && wget -q -O - https://github.com/kvaps/packages/archive/release-$VERSION.tar.gz | tar xzf - \ - && mv /packages-release-$VERSION /packages-$VERSION - -WORKDIR /opennebula-$VERSION - -# Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 - -# Build docs -RUN cd share/man \ - && ./build.sh - -# Build Sunstone -RUN cd src/sunstone/public \ - && ./build.sh -d \ - && export PATH=$PATH:$PWD/node_modules/.bin \ - && ./build.sh \ - && rm -rf node_modules/ - -# Prepare sources -RUN tar -czf /opennebula_$VERSION.orig.tar.gz . \ - && cp -r /packages-$VERSION/templates/$DISTRO/ debian \ - && wget -q http://downloads.opennebula.org/extra/xmlrpc-c.tar.gz \ - && tar -czf build_opennebula.tar.gz -C /packages-$VERSION/sources build_opennebula.sh xml_parse_huge.patch - -# Build Ruby gems -RUN "/packages-$VERSION/rubygems/build.sh" \ - "/opennebula_$VERSION.orig.tar.gz" \ - "/" \ - "$(echo ${DISTRO} | sed 's/\b./\u\0/g')" \ - "${VERSION}-${PKG_VERSION}" \ - "${CONTACT}" - -# Generate requirements for all Ruby gem packages and process control template -RUN for F in /opennebula-rubygem-*.deb; do \ - _NAME=$(dpkg-deb -f "${F}" Package); \ - _VERS=$(dpkg-deb -f "${F}" Version); \ - RUBYGEMS_REQ="${RUBYGEMS_REQ}${_NAME} (= ${_VERS}), "; \ - done \ - && m4 -D_VERSION_="${VERSION}" \ - -D_PKG_VERSION_="${PKG_VERSION}" \ - -D_CONTACT_="${CONTACT}" \ - -D_DATE_="${DATE}" \ - -D_RUBYGEMS_REQ_="${RUBYGEMS_REQ}" \ - -D_WITH_RUBYGEMS_ \ - debian/control.m4 > debian/control - -# Generate changelog -RUN printf '%s\n\n' \ - "opennebula (${VERSION}-${PKG_VERSION}) unstable; urgency=low" \ - " * Build for ${VERSION}-${PKG_VERSION} (Git revision ${GIT_VERSION})" \ - " -- ${CONTACT} $(date -R)" \ - > debian/changelog - -# Generate gitversion -RUN echo "${GIT_VERSION}" > debian/gitversion - -# Build source package -RUN dpkg-source --include-binaries -b . - -# Install dependencies -RUN apt-get install -y $(dpkg-checkbuilddeps 2>&1 | sed 's/.*Unmet build dependencies: //') - -# Build binary package -RUN dpkg-buildpackage -us -uc - -# === Stage 2 === - -FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND=noninteractive # Install opennebula-common and rubygems -COPY --from=builder /opennebula-common_*.deb /ruby-opennebula_*_all.deb /opennebula-tools_*.deb /opennebula-rubygem*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula-common_*.deb /packages/ruby-opennebula_*_all.deb /packages/opennebula-tools_*.deb /packages/opennebula-rubygems_*.deb /packages/opennebula-common-onescape_*.deb /packages/ RUN apt-get update \ + && ln -s /bin/true /usr/bin/systemd-tmpfiles \ && apt-get -y install /packages/*.deb \ && mkdir -p /var/log/one /var/lock/one /var/run/one \ && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ \ && chown oneadmin: /var/log/one /var/lock/one /var/run/one # Logging to stdout RUN for i in oned.log sched.log onehem.log sunstone.log novnc.log onegate.log oneflow.log; do ln -sf "/proc/1/fd/1" "/var/log/one/$i"; done -# ------------------------------------------------------------------------------ -# Specific part -# ------------------------------------------------------------------------------ - # Install opennebula -COPY --from=builder /opennebula_*.deb /packages/ +COPY --from=ghcr.io/kvaps/opennebula-packages:v5.12.0.4 /packages/opennebula_*.deb /packages/ RUN apt-get -y update \ && apt-get -y install mysql-client \ - && ln -s /bin/true /usr/bin/systemd-tmpfiles \ - && dpkg -i packages/opennebula_*.deb || true \ - && apt-get -yf install \ + && apt-get -y install /packages/opennebula_*.deb \ && rm -f /usr/bin/systemd-tmpfiles \ - && apt-get -y clean + && apt-get -y clean \ + && rm -rf /var/lib/apt/lists/ # Fix permissions RUN chown -R oneadmin:oneadmin /etc/one diff --git a/dockerfiles/push.sh b/dockerfiles/push.sh deleted file mode 100755 index 8f1469a..0000000 --- a/dockerfiles/push.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -cd $(dirname $0) - -for image in $(find . -maxdepth 2 -name Dockerfile | awk -F/ '{print $2}'); do - (set -x; docker push ${CI_REGISTRY_IMAGE:-kvaps}/$image:${CI_COMMIT_REF_NAME:-latest}) -done From 2b3af3251c3c801dfa0b5ee5150db323d6bb7ed6 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 6 May 2021 17:01:56 +0200 Subject: [PATCH 02/13] update configs and templates --- helm/opennebula/config/monitord.conf | 39 ++++++++++++ helm/opennebula/config/oned.conf | 61 ++++++++++++------- helm/opennebula/config/oneflow-server.conf | 4 +- helm/opennebula/config/sunstone-server.conf | 23 ++++++- helm/opennebula/scripts/init.sh | 2 +- helm/opennebula/templates/oned-configmap.yaml | 5 ++ helm/opennebula/templates/oned-service.yaml | 13 ++-- .../templates/oned-statefulset.yaml | 10 +-- .../templates/sunstone-deployment.yaml | 3 + helm/opennebula/values.yaml | 45 +++++++------- 10 files changed, 148 insertions(+), 57 deletions(-) create mode 100644 helm/opennebula/config/monitord.conf diff --git a/helm/opennebula/config/monitord.conf b/helm/opennebula/config/monitord.conf new file mode 100644 index 0000000..5938b16 --- /dev/null +++ b/helm/opennebula/config/monitord.conf @@ -0,0 +1,39 @@ +LOG: + SYSTEM: "file" + DEBUG_LEVEL: 3 +DB: + CONNECTIONS: 15 +NETWORK: + ADDRESS: "0.0.0.0" + MONITOR_ADDRESS: "auto" + PORT: {{ .Values.oned.monitord.port }} + THREADS: 8 + PUBKEY: "" + PRIKEY: "" +PROBES_PERIOD: + BEACON_HOST: 30 + SYSTEM_HOST: 600 + MONITOR_HOST: 120 + STATE_VM: 5 + MONITOR_VM: 30 + SYNC_STATE_VM: 180 +IM_MAD: +- NAME: "kvm" + SUNSTONE_NAME: "KVM" + EXECUTABLE: "one_im_ssh" + ARGUMENTS: "-r 3 -t 15 -w 90 kvm" + THREADS: 0 +- NAME: "lxd" + SUNSTONE_NAME: "LXD" + EXECUTABLE: "one_im_ssh" + ARGUMENTS: "-r 3 -t 15 -w 90 lxd" + THREADS: 0 +- NAME: "firecracker" + SUNSTONE_NAME: "Firecracker" + EXECUTABLE: "one_im_ssh" + ARGUMENTS: "-r 3 -t 15 -w 90 firecracker" + THREADS: 0 +- NAME: "vcenter" + SUNSTONE_NAME: "VMWare vCenter" + EXECUTABLE: "one_im_sh" + ARGUMENTS: "-c -t 15 -r 0 vcenter" diff --git a/helm/opennebula/config/oned.conf b/helm/opennebula/config/oned.conf index 73af588..15e694a 100644 --- a/helm/opennebula/config/oned.conf +++ b/helm/opennebula/config/oned.conf @@ -1,19 +1,18 @@ LOG: SYSTEM: "file" DEBUG_LEVEL: 3 -MONITORING_INTERVAL_HOST: 180 -MONITORING_INTERVAL_VM: 180 MONITORING_INTERVAL_DATASTORE: 300 MONITORING_INTERVAL_MARKET: 600 MONITORING_INTERVAL_DB_UPDATE: 0 -MONITORING_THREADS: 50 SCRIPTS_REMOTE_DIR: /var/tmp/one PORT: {{ .Values.oned.port }} LISTEN_ADDRESS: "0.0.0.0" DB: BACKEND: "sqlite" + TIMEOUT: 2500 VNC_PORTS: START: 5900 + RESERVED: "32768:65536" FEDERATION: MODE: "STANDALONE" ZONE_ID: 0 @@ -42,22 +41,17 @@ DEFAULT_DEVICE_PREFIX: "sd" DEFAULT_CDROM_DEVICE_PREFIX: "hd" DEFAULT_IMAGE_TYPE: "OS" IM_MAD: -- NAME: "collectd" - EXECUTABLE: "collectd" - ARGUMENTS: "-p {{ .Values.oned.collectd.port }} -f 5 -t 50 -i 60" -- NAME: "kvm" - SUNSTONE_NAME: "KVM" - EXECUTABLE: "one_im_ssh" - ARGUMENTS: "-r 3 -t 15 -w 90 kvm" -- NAME: "lxd" - SUNSTONE_NAME: "LXD" - EXECUTABLE: "one_im_ssh" - ARGUMENTS: "-r 3 -t 15 -w 90 lxd" -- NAME: "vcenter" - SUNSTONE_NAME: "VMWare vCenter" - EXECUTABLE: "one_im_sh" - ARGUMENTS: "-c -t 15 -r 0 vcenter" +- NAME: "monitord" + EXECUTABLE: "onemonitord" + ARGUMENTS: "-c monitord.conf" + THREADS: 8 VM_MAD: +- NAME: "firecracker" + SUNSTONE_NAME: "Firecracker" + EXECUTABLE: "one_vmm_exec" + ARGUMENTS: "-t 15 -r 0 firecracker" + TYPE: "xml" + KEEP_SNAPSHOTS: "no" - NAME: "kvm" SUNSTONE_NAME: "KVM" EXECUTABLE: "one_vmm_exec" @@ -82,6 +76,7 @@ VM_MAD: TYPE: "xml" KEEP_SNAPSHOTS: "yes" DS_LIVE_MIGRATION: "yes" + COLD_NIC_ATTACH: "yes" IMPORTED_VMS_ACTIONS: "terminate, terminate-hard, hold, release, suspend, resume, delete, reboot, reboot-hard, resched, unresched, poweroff, poweroff-hard, disk-attach, disk-detach, nic-attach, nic-detach, snapshot-create, snapshot-delete, migrate, live-migrate" TM_MAD: EXECUTABLE: "one_tm" @@ -91,7 +86,7 @@ DATASTORE_MAD: ARGUMENTS: "-t 15 -d dummy,fs,lvm,ceph,dev,iscsi_libvirt,vcenter -s shared,ssh,ceph,fs_lvm,qcow2,vcenter" MARKET_MAD: EXECUTABLE: "one_market" - ARGUMENTS: "-t 15 -m http,s3,one,linuxcontainers" + ARGUMENTS: "-t 15 -m http,s3,one,linuxcontainers,turnkeylinux,dockerhub" IPAM_MAD: EXECUTABLE: "one_ipam" ARGUMENTS: "-t 1 -i dummy" @@ -173,6 +168,7 @@ VM_RESTRICTED_ATTR: - "DISK/VCENTER_INSTANCE_ID" - "DISK/ORIGINAL_SIZE" - "DISK/SIZE_PREV" +- "DEPLOY_ID" - "CPU_COST" - "MEMORY_COST" - "DISK_COST" @@ -185,6 +181,8 @@ VM_RESTRICTED_ATTR: - "USER_INPUTS/VCPU" - "VCENTER_VM_FOLDER" - "VCENTER_ESX_HOST" +- "TOPOLOGY/PIN_POLICY" +- "TOPOLOGY/HUGEPAGE_SIZE" IMAGE_RESTRICTED_ATTR: - "SOURCE" - "VCENTER_IMPORTED" @@ -220,8 +218,10 @@ GROUP_RESTRICTED_ATTR: HOST_ENCRYPTED_ATTR: - "EC2_ACCESS" - "EC2_SECRET" -- "AZ_ID" -- "AZ_CERT" +- "AZ_SUB" +- "AZ_CLIENT" +- "AZ_SECRET" +- "AZ_TENANT" - "VCENTER_PASSWORD" - "NSX_PASSWORD" - "ONE_PASSWORD" @@ -229,6 +229,8 @@ HOST_ENCRYPTED_ATTR: - "PROVISION/PACKET_TOKEN" - "PROVISION/EC2_ACCESS" - "PROVISION/EC2_SECRET" +VM_ENCRYPTED_ATTR: +- "CONTEXT/PASSWORD" VNET_ENCRYPTED_ATTR: - "AR/PACKET_TOKEN" DATASTORE_ENCRYPTED_ATTR: @@ -270,6 +272,7 @@ INHERIT_VNET_ATTR: - "FILTER_IP_SPOOFING" - "FILTER_MAC_SPOOFING" - "MTU" +- "METRIC" - "INBOUND_AVG_BW" - "INBOUND_PEAK_BW" - "INBOUND_PEAK_KB" @@ -349,6 +352,12 @@ TM_MAD_CONF: LN_TARGET: "NONE" CLONE_TARGET: "NONE" SHARED: "YES" + LN_TARGET_SSH: "SYSTEM" + LN_TARGET_SHARED: "NONE" + DISK_TYPE_SSH: "FILE" + DISK_TYPE_SHARED: "FILE" + CLONE_TARGET_SSH: "SYSTEM" + CLONE_TARGET_SHARED: "SELF" - NAME: "vcenter" LN_TARGET: "NONE" CLONE_TARGET: "SYSTEM" @@ -397,6 +406,16 @@ MARKET_MAD_CONF: REQUIRED_ATTRS: "" APP_ACTIONS: "monitor" PUBLIC: "yes" +- NAME: "turnkeylinux" + SUNSTONE_NAME: "TurnkeyLinux" + REQUIRED_ATTRS: "" + APP_ACTIONS: "monitor" + PUBLIC: "yes" +- NAME: "dockerhub" + SUNSTONE_NAME: "DockerHub" + REQUIRED_ATTRS: "" + APP_ACTIONS: "monitor" + PUBLIC: "yes" AUTH_MAD_CONF: - NAME: "core" PASSWORD_CHANGE: "YES" diff --git a/helm/opennebula/config/oneflow-server.conf b/helm/opennebula/config/oneflow-server.conf index ee20773..7ba3d30 100644 --- a/helm/opennebula/config/oneflow-server.conf +++ b/helm/opennebula/config/oneflow-server.conf @@ -1,9 +1,11 @@ :one_xmlrpc: http://{{ template "opennebula.fullname" . }}-oned:{{ .Values.oned.service.port }}/RPC2 -:lcm_interval: 30 +:autoscaler_interval: 30 :host: 0.0.0.0 :port: {{ .Values.flow.port }} :force_deletion: false :default_cooldown: 300 +:wait_timeout: 30 +:concurrency: 10 :shutdown_action: 'terminate' :action_number: 1 :action_period: 60 diff --git a/helm/opennebula/config/sunstone-server.conf b/helm/opennebula/config/sunstone-server.conf index 5787958..4ca3af5 100644 --- a/helm/opennebula/config/sunstone-server.conf +++ b/helm/opennebula/config/sunstone-server.conf @@ -13,6 +13,9 @@ :core_auth: cipher :remote_version: http://downloads.opennebula.org/latest :two_factor_auth_issuer: opennebula +:webauthn_origin: http://localhost:9869 +:webauthn_rpname: 'OpenNebula Cloud' +:webauthn_timeout: 60000 :vnc_proxy_port: {{ .Values.novnc.port }} :vnc_proxy_support_wss: no :vnc_proxy_cert: @@ -23,8 +26,26 @@ :lang: en_US :table_order: desc :mode: 'mixed' -:marketplace_url: http://marketplace.opennebula.systems/ +:get_extended_vm_info: false +:marketplace_url: http://marketplace.opennebula.io/ :oneflow_server: http://{{ template "opennebula.fullname" . }}-flow:{{ .Values.flow.service.port }}/ :routes: - oneflow - support +:paginate: "[[6, 12, 36, 72], [6, 12, 36, 72]]" +:leases: + suspense: + time: "+1209600" + color: "#000000" + warning: + time: "-86400" + color: "#085aef" + terminate: + time: "+1209600" + color: "#e1ef08" + warning: + time: "-86400" + color: "#ef2808" +:threshold_min: 0 +:threshold_low: 33 +:threshold_high: 66 diff --git a/helm/opennebula/scripts/init.sh b/helm/opennebula/scripts/init.sh index f1f35eb..a90c016 100755 --- a/helm/opennebula/scripts/init.sh +++ b/helm/opennebula/scripts/init.sh @@ -174,7 +174,7 @@ perform_upgrade() { return 0 ;; mysql) - onedb upgrade -s /var/lib/one/one.db -p "$DB_PASSWD" -u "$DB_USER" -S "$DB_SERVER" -P "$DB_PORT" -d "$DB_NAME" + onedb upgrade -p "$DB_PASSWD" -u "$DB_USER" -S "$DB_SERVER" -P "$DB_PORT" -d "$DB_NAME" if [ $? -ne 0 ]; then fatal "failed upgrade database" fi diff --git a/helm/opennebula/templates/oned-configmap.yaml b/helm/opennebula/templates/oned-configmap.yaml index 621871e..95ba20a 100644 --- a/helm/opennebula/templates/oned-configmap.yaml +++ b/helm/opennebula/templates/oned-configmap.yaml @@ -13,4 +13,9 @@ data: {{- $mergedConfig | nindent 4 }} {{- $appendConfig := include "opennebula.config" .Values.oned.configAppends | nindent 4 -}} {{- $appendConfig }} + monitord.conf: |+ + {{- $mergedConfig := include "opennebula.config" (mergeOverwrite (fromYaml (tpl (.Files.Get "config/monitord.conf") .)) .Values.oned.monitord.configOverrides) -}} + {{- $mergedConfig | nindent 4 }} + {{- $appendConfig := include "opennebula.config" .Values.oned.monitord.configAppends | nindent 4 -}} + {{- $appendConfig }} {{- end }} diff --git a/helm/opennebula/templates/oned-service.yaml b/helm/opennebula/templates/oned-service.yaml index ee92257..3295170 100644 --- a/helm/opennebula/templates/oned-service.yaml +++ b/helm/opennebula/templates/oned-service.yaml @@ -87,11 +87,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ $fullName }}-oned-collectd + name: {{ $fullName }}-oned-monitord labels: app: {{ $fullName }}-oned - {{- if .Values.oned.collectd.service.labels }} - {{- toYaml .Values.oned.collectd.service.labels | nindent 4 }} + {{- if .Values.oned.monitord.service.labels }} + {{- toYaml .Values.oned.monitord.service.labels | nindent 4 }} {{- end }} {{- with .Values.oned.service.annotations }} annotations: @@ -99,10 +99,9 @@ metadata: {{- end }} spec: ports: - - name: collectd - port: {{ .Values.oned.collectd.port }} - nodePort: {{ .Values.oned.collectd.service.nodePort }} - protocol: UDP + - name: monitord + port: {{ .Values.oned.monitord.port }} + nodePort: {{ .Values.oned.monitord.service.nodePort }} selector: app: {{ $fullName }}-oned type: NodePort diff --git a/helm/opennebula/templates/oned-statefulset.yaml b/helm/opennebula/templates/oned-statefulset.yaml index 9356c70..993efd4 100644 --- a/helm/opennebula/templates/oned-statefulset.yaml +++ b/helm/opennebula/templates/oned-statefulset.yaml @@ -10,10 +10,11 @@ metadata: {{- if .Values.oned.labels }} {{- toYaml .Values.oned.labels | nindent 4 }} {{- end }} - {{- with .Values.oned.annotations }} annotations: + kubectl.kubernetes.io/default-exec-container: oned + {{- with .Values.oned.annotations }} {{- toYaml . | nindent 4 }} - {{- end }} + {{- end }} spec: replicas: {{ .Values.oned.replicas }} @@ -87,9 +88,8 @@ spec: containerPort: {{ .Values.oned.one_hm.subscriberPort }} - name: hm-replier containerPort: {{ .Values.oned.one_hm.replierPort }} - - name: collectd - containerPort: {{ .Values.oned.collectd.port }} - protocol: UDP + - name: monitord + containerPort: {{ .Values.oned.monitord.port }} env: {{- with .Values.oned.createCluster }} - name: CREATE_CLUSTER diff --git a/helm/opennebula/templates/sunstone-deployment.yaml b/helm/opennebula/templates/sunstone-deployment.yaml index 3cb5409..0071d07 100644 --- a/helm/opennebula/templates/sunstone-deployment.yaml +++ b/helm/opennebula/templates/sunstone-deployment.yaml @@ -61,6 +61,9 @@ spec: - name: one-keys mountPath: /var/lib/one/.one/sunstone_auth subPath: sunstone_auth + - name: one-keys + mountPath: /var/lib/one/.one/one_auth + subPath: one_auth - name: shared mountPath: /var/tmp subPath: tmp diff --git a/helm/opennebula/values.yaml b/helm/opennebula/values.yaml index 8792aa7..82a1fb3 100644 --- a/helm/opennebula/values.yaml +++ b/helm/opennebula/values.yaml @@ -65,8 +65,8 @@ oned: leaderId: -1 image: - repository: docker.io/kvaps/opennebula - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -113,14 +113,16 @@ oned: tag: 8.0.19 pullPolicy: IfNotPresent - # Specify nodePort for collectd service (30000-32767) + # Specify nodePort for monitord service (30000-32767) # port and nodePort should be the same - collectd: - port: 32155 + monitord: + port: 32156 # TODO service: labels: {} annotations: {} - nodePort: 32155 + nodePort: 32156 # TODO + configOverrides: {} + configAppends: {} # Specify nodePort for one_hm service one_hm: @@ -146,6 +148,7 @@ oned: - opennebula.example.org configOverrides: + HOSTNAME: localhost #TODO LOG: SYSTEM: file DEBUG_LEVEL: 3 @@ -179,8 +182,8 @@ sched: replicas: 1 image: - repository: docker.io/kvaps/opennebula - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -202,7 +205,7 @@ hem: # If true, the Hem-server be started on same place with oned by the leader-election hook # (workaround for https://github.com/OpenNebula/one/issues/4357) - integrated: true + integrated: false labels: {} annotations: {} @@ -216,8 +219,8 @@ hem: replicas: 1 image: - repository: docker.io/kvaps/opennebula - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -246,8 +249,8 @@ sunstone: replicas: 3 image: - repository: docker.io/kvaps/opennebula-sunstone - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula-sunstone + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -295,8 +298,8 @@ novnc: replicas: 1 image: - repository: docker.io/kvaps/opennebula-sunstone - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula-sunstone + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -374,8 +377,8 @@ gate: replicas: 1 image: - repository: docker.io/kvaps/opennebula-gate - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula-gate + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -424,8 +427,8 @@ flow: replicas: 1 image: - repository: docker.io/kvaps/opennebula-flow - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula-flow + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret @@ -460,8 +463,8 @@ exporter: replicas: 1 image: - repository: docker.io/kvaps/opennebula-exporter - tag: v5.10.5 + repository: ghcr.io/kvaps/opennebula-exporter + tag: v5.12.0.4 pullPolicy: IfNotPresent pullSecrets: - name: regsecret From 7d8acdd04142873de26f0058b1d8bf2f8d8a44cf Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 6 May 2021 18:22:49 +0200 Subject: [PATCH 03/13] Add missing migration packages and cleanup --- dockerfiles/opennebula/Dockerfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dockerfiles/opennebula/Dockerfile b/dockerfiles/opennebula/Dockerfile index b2649bc..3771298 100644 --- a/dockerfiles/opennebula/Dockerfile +++ b/dockerfiles/opennebula/Dockerfile @@ -24,8 +24,20 @@ RUN apt-get -y update \ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/ -# Fix permissions -RUN chown -R oneadmin:oneadmin /etc/one +# Add missing migration packages +RUN VERSION=5.12.0.4 \ + && wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar.gz | \ + tar -xzf - -C /usr/lib/one/ruby/onedb \ + --strip-components 3 \ + one-release-$VERSION/src/onedb/local \ + one-release-$VERSION/src/onedb/shared + +# Fix permissions and cleanup +RUN chown -R oneadmin:oneadmin /etc/one \ + && rm -f /var/lib/one/.one/one_auth \ + /var/lib/one/.ssh/authorized_keys \ + /var/lib/one/.ssh/id_rsa \ + /var/lib/one/.ssh/id_rsa.pub USER oneadmin ENTRYPOINT [ "/usr/bin/oned", "-f" ] From 17b7eb568581113b0c68bb19e5f4c389e0c5b849 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 May 2021 10:00:41 +0200 Subject: [PATCH 04/13] add sched logging fix https://github.com/OpenNebula/one/issues/4359 --- dockerfiles/opennebula-packages/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockerfiles/opennebula-packages/Dockerfile b/dockerfiles/opennebula-packages/Dockerfile index 9df00b2..08ba1bc 100644 --- a/dockerfiles/opennebula-packages/Dockerfile +++ b/dockerfiles/opennebula-packages/Dockerfile @@ -47,7 +47,8 @@ RUN wget -q -O - https://github.com/OpenNebula/one/archive/release-$VERSION.tar. WORKDIR /opennebula-$VERSION # Apply patches -RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 +RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 \ + && wget -q -O - https://github.com/OpenNebula/one/commit/c97f54281dc89a4164df9de98a8d9aa18bfd885d.diff | patch -p1 # Build docs RUN cd share/man \ From ee58b29e0e61f8a1c04e24949108b1db550e31aa Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 May 2021 11:17:58 +0200 Subject: [PATCH 05/13] disable readinessProbe on debug --- helm/opennebula/templates/oned-statefulset.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/opennebula/templates/oned-statefulset.yaml b/helm/opennebula/templates/oned-statefulset.yaml index 993efd4..c281aaf 100644 --- a/helm/opennebula/templates/oned-statefulset.yaml +++ b/helm/opennebula/templates/oned-statefulset.yaml @@ -23,6 +23,8 @@ spec: app: {{ $fullName }}-oned serviceName: {{ $fullName }}-oned-servers podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate template: metadata: labels: @@ -167,6 +169,7 @@ spec: {{- with .Values.oned.extraVolumeMounts }} {{- toYaml . | nindent 8 }} {{- end }} + {{ if not .Values.oned.debug }} readinessProbe: exec: command: @@ -175,6 +178,7 @@ spec: initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 15 + {{ end }} {{- with .Values.oned.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} From dd32d577a6f6fc4925d3640d89fcbdcbf166a975 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 May 2021 11:33:37 +0200 Subject: [PATCH 06/13] add backup/restore information --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 40cbe5f..12ee6c0 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,27 @@ OpenNebula requires one ReadWriteOnce persistent volume per each oned-instance w Example production configuration can be found [here](examples/prod/deploy) +## Backups and restore + +Find current leader: + +``` +kubectl get pod -n opennebula -l role=leader +``` + +Perform backup: +``` +kubectl exec -n opennebula -c oned -- sh -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWD $DB_NAME | gzip -9' > opennebula-db.sql.gz +``` + +**To restore**, redeploy release with `--set oned.debug=true` and: +``` +kubectl exec -n opennebula -i -c oned -- sh -c 'zcat | mysql -h$DB_SERVER -u$DB_USER -p$DB_PASSWD -D$DB_NAME' < opennebula-db.sql.gz +``` + +then disable debug + + ## Upgrade notes The minor upgrades can be performed by standard way using rolling update, however major updates should be performed by fully chart reinstallation. From ba23e0a46d504a935c02e20a655622949c780cb8 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 May 2021 16:23:10 +0200 Subject: [PATCH 07/13] fix Sunstone doesn't work with remote oned https://github.com/OpenNebula/one/issues/5019 --- dockerfiles/opennebula-packages/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockerfiles/opennebula-packages/Dockerfile b/dockerfiles/opennebula-packages/Dockerfile index 08ba1bc..0924fea 100644 --- a/dockerfiles/opennebula-packages/Dockerfile +++ b/dockerfiles/opennebula-packages/Dockerfile @@ -48,7 +48,8 @@ WORKDIR /opennebula-$VERSION # Apply patches RUN wget -q -O - https://github.com/OpenNebula/one/pull/4585.diff | patch -p1 \ - && wget -q -O - https://github.com/OpenNebula/one/commit/c97f54281dc89a4164df9de98a8d9aa18bfd885d.diff | patch -p1 + && wget -q -O - https://github.com/OpenNebula/one/commit/c97f54281dc89a4164df9de98a8d9aa18bfd885d.diff | patch -p1 \ + && wget -q -O - https://github.com/OpenNebula/one/commit/c5dcfd5a974e538b5254c0bfe50eec6da42618ba.diff | patch -p1 # Build docs RUN cd share/man \ From 8b0fc57dfeaff24bef3d5bb195a1281ee51fe576 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 12 May 2021 14:18:47 +0200 Subject: [PATCH 08/13] Describe updgrade procedure --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 12ee6c0..9cbce30 100644 --- a/README.md +++ b/README.md @@ -90,16 +90,10 @@ then disable debug ## Upgrade notes -The minor upgrades can be performed by standard way using rolling update, however major updates should be performed by fully chart reinstallation. -You have to remove the old chart, and install new one, however your data should be saved on persistent volumes, thus new images will perform database migration on their first start. +The minor upgrades can be performed by standard way using rolling update, however major updates must be performed by fully chart reinstallation. +You have to remove the old chart, and install new one. No worry as your data should be saved on persistent volumes, thus new images will perform database migration on their first start. -Perform backup: -```bash -# Find the leader pod -kubectl get pod -l role=leader -# Perform the backup -kubectl exec -c oned -- bash -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWORD $DB_NAME | gzip -9' > backup.sql.gz -``` +> **Warning:** Don't forget to make backup before the upgrade! Minor upgrade: ```bash From d41bbf467bc8eb04e92328f3bb06fc92c32e7490 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 7 Jul 2021 18:29:51 +0200 Subject: [PATCH 09/13] fix monitord.conf mount --- helm/opennebula/templates/oned-statefulset.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm/opennebula/templates/oned-statefulset.yaml b/helm/opennebula/templates/oned-statefulset.yaml index c281aaf..85b9cf2 100644 --- a/helm/opennebula/templates/oned-statefulset.yaml +++ b/helm/opennebula/templates/oned-statefulset.yaml @@ -135,6 +135,9 @@ spec: {{- end }} - name: config mountPath: /config + - name: config + mountPath: /etc/one/monitord.conf + subPath: monitord.conf {{- with .Values.oned.authConfig }} {{- range $key, $value := . }} - name: auth-config From 4a71c49b5341b3f51eb97a340ce1c14c5717de4c Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 22 Jul 2021 17:35:16 +0200 Subject: [PATCH 10/13] add: podAntiAffinity --- .../templates/exporter-deployment.yaml | 23 ++++++++++++ .../opennebula/templates/flow-deployment.yaml | 23 ++++++++++++ .../opennebula/templates/gate-deployment.yaml | 23 ++++++++++++ helm/opennebula/templates/hem-deployment.yaml | 23 ++++++++++++ .../templates/memcached-deployment.yaml | 23 ++++++++++++ .../templates/novnc-deployment.yaml | 35 +++++++++++++++---- .../templates/oned-statefulset.yaml | 24 ++++++++++++- .../templates/sched-deployment.yaml | 23 ++++++++++++ .../templates/sunstone-deployment.yaml | 23 ++++++++++++ helm/opennebula/values.yaml | 28 +++++++++++++++ 10 files changed, 241 insertions(+), 7 deletions(-) diff --git a/helm/opennebula/templates/exporter-deployment.yaml b/helm/opennebula/templates/exporter-deployment.yaml index cf2a372..5316089 100644 --- a/helm/opennebula/templates/exporter-deployment.yaml +++ b/helm/opennebula/templates/exporter-deployment.yaml @@ -72,6 +72,29 @@ spec: {{- with .Values.exporter.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.exporter.affinity .Values.exporter.podAntiAffinity }} + affinity: + {{- with .Values.exporter.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.exporter.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.exporter.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-exporter + {{- else if eq .Values.exporter.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.exporter.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-exporter + {{- end }} + {{- end }} {{- with .Values.exporter.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/flow-deployment.yaml b/helm/opennebula/templates/flow-deployment.yaml index 20ebdbb..dece4c2 100644 --- a/helm/opennebula/templates/flow-deployment.yaml +++ b/helm/opennebula/templates/flow-deployment.yaml @@ -63,6 +63,29 @@ spec: {{- with .Values.flow.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.flow.affinity .Values.flow.podAntiAffinity }} + affinity: + {{- with .Values.flow.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.flow.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.flow.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-flow + {{- else if eq .Values.flow.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.flow.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-flow + {{- end }} + {{- end }} {{- with .Values.flow.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/gate-deployment.yaml b/helm/opennebula/templates/gate-deployment.yaml index 8896acc..26d517f 100644 --- a/helm/opennebula/templates/gate-deployment.yaml +++ b/helm/opennebula/templates/gate-deployment.yaml @@ -63,6 +63,29 @@ spec: {{- with .Values.gate.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.gate.affinity .Values.gate.podAntiAffinity }} + affinity: + {{- with .Values.gate.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.gate.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.gate.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-gate + {{- else if eq .Values.gate.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.gate.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-gate + {{- end }} + {{- end }} {{- with .Values.gate.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/hem-deployment.yaml b/helm/opennebula/templates/hem-deployment.yaml index 6dcb98a..35cb196 100644 --- a/helm/opennebula/templates/hem-deployment.yaml +++ b/helm/opennebula/templates/hem-deployment.yaml @@ -65,6 +65,29 @@ spec: {{- with .Values.hem.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.hem.affinity .Values.hem.podAntiAffinity }} + affinity: + {{- with .Values.hem.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.hem.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.hem.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-hem + {{- else if eq .Values.hem.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.hem.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-hem + {{- end }} + {{- end }} {{- with .Values.hem.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/memcached-deployment.yaml b/helm/opennebula/templates/memcached-deployment.yaml index 66d987e..0b9d153 100644 --- a/helm/opennebula/templates/memcached-deployment.yaml +++ b/helm/opennebula/templates/memcached-deployment.yaml @@ -59,6 +59,29 @@ spec: {{- with .Values.memcached.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.memcached.affinity .Values.memcached.podAntiAffinity }} + affinity: + {{- with .Values.memcached.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.memcached.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.memcached.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-memcached + {{- else if eq .Values.memcached.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.memcached.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-memcached + {{- end }} + {{- end }} {{- with .Values.memcached.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/novnc-deployment.yaml b/helm/opennebula/templates/novnc-deployment.yaml index 648bbb1..c5da006 100644 --- a/helm/opennebula/templates/novnc-deployment.yaml +++ b/helm/opennebula/templates/novnc-deployment.yaml @@ -1,4 +1,4 @@ -{{- if .Values.sunstone.enabled }} +{{- if .Values.novnc.enabled }} {{- $fullName := include "opennebula.fullname" . -}} --- apiVersion: apps/v1 @@ -35,8 +35,8 @@ spec: spec: containers: - name: novnc - image: {{ .Values.sunstone.image.repository }}:{{ .Values.sunstone.image.tag }} - imagePullPolicy: {{ .Values.sunstone.image.pullPolicy }} + image: {{ .Values.novnc.image.repository }}:{{ .Values.novnc.image.tag }} + imagePullPolicy: {{ .Values.novnc.image.pullPolicy }} command: [ '/usr/bin/ruby', '/usr/bin/novnc-server', 'start' ] ports: - name: websocket @@ -63,15 +63,38 @@ spec: {{- with .Values.novnc.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} - {{- with .Values.sunstone.image.pullSecrets }} + {{- if or .Values.novnc.affinity .Values.novnc.podAntiAffinity }} + affinity: + {{- with .Values.novnc.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.novnc.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.novnc.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-novnc + {{- else if eq .Values.novnc.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.novnc.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-novnc + {{- end }} + {{- end }} + {{- with .Values.novnc.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} {{- end }} - {{- with .Values.sunstone.nodeSelector }} + {{- with .Values.novnc.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.sunstone.tolerations }} + {{- with .Values.novnc.tolerations }} tolerations: {{- toYaml . | nindent 6 }} {{- end }} diff --git a/helm/opennebula/templates/oned-statefulset.yaml b/helm/opennebula/templates/oned-statefulset.yaml index 85b9cf2..d269f58 100644 --- a/helm/opennebula/templates/oned-statefulset.yaml +++ b/helm/opennebula/templates/oned-statefulset.yaml @@ -185,8 +185,30 @@ spec: {{- with .Values.oned.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} - terminationGracePeriodSeconds: 30 + {{- if or .Values.oned.affinity .Values.oned.podAntiAffinity }} + affinity: + {{- with .Values.oned.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.oned.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.oned.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-oned + {{- else if eq .Values.oned.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.oned.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-oned + {{- end }} + {{- end }} {{- with .Values.oned.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/sched-deployment.yaml b/helm/opennebula/templates/sched-deployment.yaml index 074a99f..c12536f 100644 --- a/helm/opennebula/templates/sched-deployment.yaml +++ b/helm/opennebula/templates/sched-deployment.yaml @@ -60,6 +60,29 @@ spec: {{- with .Values.sched.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.sched.affinity .Values.sched.podAntiAffinity }} + affinity: + {{- with .Values.sched.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.sched.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.sched.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-sched + {{- else if eq .Values.sched.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.sched.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-sched + {{- end }} + {{- end }} {{- with .Values.sched.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/sunstone-deployment.yaml b/helm/opennebula/templates/sunstone-deployment.yaml index 0071d07..04b1e5a 100644 --- a/helm/opennebula/templates/sunstone-deployment.yaml +++ b/helm/opennebula/templates/sunstone-deployment.yaml @@ -85,6 +85,29 @@ spec: {{- with .Values.flow.sidecars }} {{- toYaml . | nindent 6 }} {{- end }} + {{- if or .Values.sunstone.affinity .Values.sunstone.podAntiAffinity }} + affinity: + {{- with .Values.sunstone.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if eq .Values.sunstone.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "{{ .Values.sunstone.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-sunstone + {{- else if eq .Values.sunstone.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: "{{ .Values.sunstone.podAntiAffinityTopologyKey }}" + labelSelector: + matchLabels: + app: {{ $fullName }}-sunstone + {{- end }} + {{- end }} {{- with .Values.sunstone.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/values.yaml b/helm/opennebula/values.yaml index 82a1fb3..cb50c07 100644 --- a/helm/opennebula/values.yaml +++ b/helm/opennebula/values.yaml @@ -73,6 +73,9 @@ oned: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} # Specify passwords for default accounts oneadminPasswd: @@ -190,6 +193,9 @@ sched: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} configOverrides: LOG: @@ -227,6 +233,9 @@ hem: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} configOverrides: :debug_level: 3 @@ -304,6 +313,13 @@ novnc: pullSecrets: - name: regsecret + nodeSelector: {} + tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} + + port: 29876 service: labels: {} @@ -352,6 +368,9 @@ memcached: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} port: 11211 service: @@ -385,6 +404,9 @@ gate: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} port: 5030 service: @@ -435,6 +457,9 @@ flow: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} port: 2474 service: @@ -471,6 +496,9 @@ exporter: nodeSelector: {} tolerations: [] + podAntiAffinity: soft + podAntiAffinityTopologyKey: kubernetes.io/hostname + affinity: {} port: 9100 telemetryPath: /metrics From 7aaad9054cb3425498828cef10d84c6a5c99890d Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 22 Jul 2021 17:35:42 +0200 Subject: [PATCH 11/13] Enable integrated Hem server, see https://github.com/OpenNebula/one/issues/4357 --- helm/opennebula/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/opennebula/values.yaml b/helm/opennebula/values.yaml index cb50c07..fb3cb3c 100644 --- a/helm/opennebula/values.yaml +++ b/helm/opennebula/values.yaml @@ -211,7 +211,7 @@ hem: # If true, the Hem-server be started on same place with oned by the leader-election hook # (workaround for https://github.com/OpenNebula/one/issues/4357) - integrated: false + integrated: true labels: {} annotations: {} From a83955bba0e403e279b38ec7088f527b63b6754f Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 10 May 2021 11:33:37 +0200 Subject: [PATCH 12/13] add backup/restore information --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 9cbce30..146c3cb 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,25 @@ kubectl exec -n opennebula -i -c oned -- sh -c 'zcat | mysql -h$ then disable debug +## Upgrade notes + +``` +kubectl get pod -n opennebula -l role=leader +``` + +Perform backup: +``` +kubectl exec -n opennebula -c oned -- sh -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWD $DB_NAME | gzip -9' > opennebula-db.sql.gz +``` + +**To restore**, redeploy release with `--set oned.debug=true` and: +``` +kubectl exec -n opennebula -i -c oned -- sh -c 'zcat | mysql -h$DB_SERVER -u$DB_USER -p$DB_PASSWD -D$DB_NAME' < opennebula-db.sql.gz +``` + +then disable debug + + ## Upgrade notes The minor upgrades can be performed by standard way using rolling update, however major updates must be performed by fully chart reinstallation. From 41fd649c3c50efbfb68a6ff4296fe6933e9f857a Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 22 Jul 2021 23:20:33 +0200 Subject: [PATCH 13/13] fix onehem.pid + emptydirs --- helm/opennebula/templates/hem-deployment.yaml | 4 ++++ helm/opennebula/templates/novnc-deployment.yaml | 2 +- helm/opennebula/templates/oned-statefulset.yaml | 8 ++++++-- helm/opennebula/templates/sunstone-deployment.yaml | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helm/opennebula/templates/hem-deployment.yaml b/helm/opennebula/templates/hem-deployment.yaml index 35cb196..a1c342b 100644 --- a/helm/opennebula/templates/hem-deployment.yaml +++ b/helm/opennebula/templates/hem-deployment.yaml @@ -54,6 +54,8 @@ spec: - mountPath: /etc/one/onehem-server.conf name: config subPath: onehem-server.conf + - name: one-run + mountPath: /run/one - name: one-keys mountPath: /var/lib/one/.one/one_auth subPath: one_auth @@ -113,6 +115,8 @@ spec: - name: config configMap: name: {{ $fullName }}-hem + - name: one-run + emptyDir: {} - name: ssh-keys secret: secretName: {{ $fullName }}-ssh-keys diff --git a/helm/opennebula/templates/novnc-deployment.yaml b/helm/opennebula/templates/novnc-deployment.yaml index c5da006..8c16153 100644 --- a/helm/opennebula/templates/novnc-deployment.yaml +++ b/helm/opennebula/templates/novnc-deployment.yaml @@ -120,7 +120,7 @@ spec: claimName: {{ $fullName }}-shared {{- end }} {{- else }} - emptyDir: + emptyDir: {} {{- end }} {{- with .Values.novnc.extraVolumes }} {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/oned-statefulset.yaml b/helm/opennebula/templates/oned-statefulset.yaml index d269f58..5e3dbeb 100644 --- a/helm/opennebula/templates/oned-statefulset.yaml +++ b/helm/opennebula/templates/oned-statefulset.yaml @@ -152,6 +152,8 @@ spec: {{- end }}{{- end }} - name: scripts mountPath: /scripts + - name: one-run + mountPath: /run/one - name: one-keys mountPath: /secrets - name: ssh-keys @@ -255,6 +257,8 @@ spec: - name: one-keys secret: secretName: {{ $fullName }}-one-keys + - name: one-run + emptyDir: {} - name: data {{- if .Values.persistence.data.enabled }} persistentVolumeClaim: @@ -264,7 +268,7 @@ spec: claimName: {{ $fullName }}-data {{- end }} {{- else }} - emptyDir: + emptyDir: {} {{- end }} - name: shared {{- if .Values.persistence.shared.enabled }} @@ -275,7 +279,7 @@ spec: claimName: {{ $fullName }}-shared {{- end }} {{- else }} - emptyDir: + emptyDir: {} {{- end }} {{- with .Values.oned.extraVolumes }} {{- toYaml . | nindent 6 }} diff --git a/helm/opennebula/templates/sunstone-deployment.yaml b/helm/opennebula/templates/sunstone-deployment.yaml index 04b1e5a..b0126f0 100644 --- a/helm/opennebula/templates/sunstone-deployment.yaml +++ b/helm/opennebula/templates/sunstone-deployment.yaml @@ -145,7 +145,7 @@ spec: claimName: {{ $fullName }}-shared {{- end }} {{- else }} - emptyDir: + emptyDir: {} {{- end }} {{- with .Values.sunstone.extraVolumes }} {{- toYaml . | nindent 6 }}