diff --git a/elements/rocky-container-stackhpc-package-prepare/element-deps b/elements/rocky-container-stackhpc-package-prepare/element-deps new file mode 100644 index 0000000..87dc7ba --- /dev/null +++ b/elements/rocky-container-stackhpc-package-prepare/element-deps @@ -0,0 +1 @@ +rocky-container-stackhpc \ No newline at end of file diff --git a/elements/rocky-container-stackhpc-package-prepare/post-install.d/00-enable-systemd-services b/elements/rocky-container-stackhpc-package-prepare/post-install.d/00-enable-systemd-services new file mode 100755 index 0000000..e8f049a --- /dev/null +++ b/elements/rocky-container-stackhpc-package-prepare/post-install.d/00-enable-systemd-services @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +systemctl unmask \ +console-getty.service \ +dev-hugepages.mount \ +getty.target \ +sys-fs-fuse-connections.mount \ +systemd-logind.service \ +systemd-remount-fs.service \ No newline at end of file diff --git a/elements/rocky-container-stackhpc-package-prepare/post-install.d/01-systemd-machine-id b/elements/rocky-container-stackhpc-package-prepare/post-install.d/01-systemd-machine-id new file mode 100755 index 0000000..71da594 --- /dev/null +++ b/elements/rocky-container-stackhpc-package-prepare/post-install.d/01-systemd-machine-id @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# /etc/machine-id needs to be populated for /bin/kernel-install to +# correctly copy kernels into /boot. We will clear this out in the +# final image. +systemd-machine-id-setup --print diff --git a/elements/rocky-container-stackhpc-package-prepare/pre-install.d/00-distro-sync b/elements/rocky-container-stackhpc-package-prepare/pre-install.d/00-distro-sync new file mode 100755 index 0000000..d7672cf --- /dev/null +++ b/elements/rocky-container-stackhpc-package-prepare/pre-install.d/00-distro-sync @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +dnf distro-sync -y --allowerasing +dnf group install -y 'Minimal Install' --allowerasing +dnf install -y findutils \ + util-linux \ + sudo \ No newline at end of file diff --git a/elements/rocky-container-stackhpc/containerfiles/9-stackhpc b/elements/rocky-container-stackhpc/containerfiles/9-stackhpc index ed70024..0be5bf8 100644 --- a/elements/rocky-container-stackhpc/containerfiles/9-stackhpc +++ b/elements/rocky-container-stackhpc/containerfiles/9-stackhpc @@ -1,17 +1 @@ -# Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/9 - FROM docker.io/rockylinux/rockylinux:9 - -RUN dnf group install -y 'Minimal Install' --allowerasing && \ - dnf install -y findutils util-linux cloud-init - -RUN sed -i "s/renderers:.*/renderers: ['network-manager']\n activators: ['network-manager']/" /etc/cloud/cloud.cfg - -RUN systemctl unmask console-getty.service dev-hugepages.mount \ - getty.target sys-fs-fuse-connections.mount systemd-logind.service \ - systemd-remount-fs.service - -# /etc/machine-id needs to be populated for /bin/kernel-install to -# correctly copy kernels into /boot. We will clear this out in the -# final image. -RUN systemd-machine-id-setup diff --git a/elements/stackhpc-cloud-init/element-deps b/elements/stackhpc-cloud-init/element-deps new file mode 100644 index 0000000..992a1c2 --- /dev/null +++ b/elements/stackhpc-cloud-init/element-deps @@ -0,0 +1 @@ +cloud-init \ No newline at end of file diff --git a/elements/stackhpc-cloud-init/post-install.d/00-fix-cloud-cfg-format b/elements/stackhpc-cloud-init/post-install.d/00-fix-cloud-cfg-format new file mode 100755 index 0000000..25ea7de --- /dev/null +++ b/elements/stackhpc-cloud-init/post-install.d/00-fix-cloud-cfg-format @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +cat << EOF > /etc/cloud/cloud.cfg.d/10-NetworkManager.cfg +system_info: + activators: + - "network-manager" + +merge_type: 'dict(recurse_array)' +EOF