WIP: cobald container containing and using slurm

This commit is contained in:
2021-06-21 19:19:19 +02:00
parent 02e87d7c40
commit e78e184375
17 changed files with 167 additions and 74 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
if [ -f "/etc/munge/munge.key" ] ; then
chown munge:munge /etc/munge/munge.key
chmod 600 /etc/munge/munge.key
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
for i in /usr/local/lib/entrypoints.d/* ; do
[ -f $i ] && /bin/sh $i || break
done
exec "${@:-/bin/bash}"

View File

@@ -7,10 +7,12 @@ RUN yum install -y epel-release && \
RUN yum install -y less iproute bind-utils nmap-ncat net-tools && \
yum clean all && rm -rf /var/cache/yum
# FIXME
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
RUN mkdir -p /usr/local/lib/entrypoints.d/
RUN chown root:root /usr/local/sbin/entrypoint.sh && \
COPY --chown=root:root entry-munge.sh /usr/local/lib/entrypoints.d/10-munge.sh
COPY --chown=root:root entrypoint.sh /usr/local/sbin/entrypoint.sh
RUN chmod 755 /usr/local/lib/entrypoints.d/10-munge.sh && \
chmod 755 /usr/local/sbin/entrypoint.sh
ENTRYPOINT [ "/usr/local/sbin/entrypoint.sh" ]

View File

@@ -23,6 +23,8 @@
group: root
mode: u=rwx,g=rx,o=rx
loop: "{{ image.files | default([]) }}"
loop_control:
label: "{{ item.dest }}"
register: slurm_cp_files
- docker_image:

View File

@@ -16,6 +16,7 @@
- file: slurm-base.Dockerfile
perms: u=rw,g=r,o=r
- file: entrypoint.sh
- file: entry-munge.sh
- file: docker-init
- file: start-scripts/10-munge
when: not (slurm_baseimg_build_chg | default(False))