WIP: cobald container containing and using slurm
This commit is contained in:
7
roles/slurm_dockerimage/files/entry-munge.sh
Normal file
7
roles/slurm_dockerimage/files/entry-munge.sh
Normal 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
|
8
roles/slurm_dockerimage/files/entrypoint.sh
Normal file
8
roles/slurm_dockerimage/files/entrypoint.sh
Normal 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}"
|
@@ -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" ]
|
||||
|
@@ -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:
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user