Commit aac6e67f authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Adding user slurm. Executing slurmctld and slurmd as user slurm.

parent 7c8e779d
Pipeline #20040 passed with stage
in 9 minutes and 59 seconds
......@@ -20,6 +20,13 @@ RUN dnf install -y slurm*.rpm
WORKDIR /
RUN rm -rf slurm*.rpm /root/rpmbuild
RUN groupadd slurm && \
useradd -c "Slurm Workload Manager" -s /sbin/nologin -g slurm slurm && \
mkdir -p /var/spool/slurm{,ctl}d && chown slurm:slurm /var/spool/slurm{,ctl}d && \
mkdir -p /var/run/slurm && chown slurm:slurm /var/run/slurm && \
mkdir -p /var/log/slurm && chown slurm:slurm /var/log/slurm
#imkdir -p /var/log/slurm{,ctl}d.log && chown slurm:slurm /var/log/slurm{,ctl}d.log
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
......
......@@ -15,19 +15,21 @@ _slurm_setup() {
# See the slurm.conf man page for more information.
#
SlurmUser=slurm
SlurmdUser=slurm
SlurmctldHost=$(hostname -s)(localhost)
SlurmctldPidFile=/var/run/slurm/slurmctld.pid
SlurmctldPort=6817
SlurmdPidFile=/var/run/slurm/slurmd.pid
SlurmctldPort=6817
SlurmdPort=6818
SlurmdSpoolDir=/var/spool/slurm/d
AuthType=auth/munge # auth_none.so not available on Fedora
EnforcePartLimits=NO
MpiDefault=none
ProctrackType=proctrack/pgid # setup with cgroups possible in container?
ReturnToService=0
StateSaveLocation=/var/spool/slurmctld
SwitchType=switch/none
TaskPlugin=task/none
......@@ -48,6 +50,8 @@ SelectType=select/linear
# TODO: Cleanup needed when setting up slurmdbd.
# LOGGING AND ACCOUNTING
SlurmctldLogFile=/var/log/slurm/slurmctld.log
SlurmdLogFile=/var/log/slurm/slurmd.log
AccountingStorageType=accounting_storage/none
ClusterName=sid # sid = Slurm in Docker
JobCompType=jobcomp/none
......@@ -64,8 +68,8 @@ NodeName=sidc[1-4] NodeHostName=localhost
PartitionName=sidp Nodes=sidc[1-4] Default=YES MaxTime=1:00:00 State=UP
EOF
slurmctld
slurmd
sudo -u slurm slurmctld
sudo -u slurm slurmd
}
_main() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment