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

Merge branch 'feature-slurm-user' into develop

parents 7c8e779d 15d4cf4c
Pipeline #20507 passed with stage
in 10 minutes and 31 seconds
......@@ -20,8 +20,14 @@ RUN dnf install -y slurm*.rpm
WORKDIR /
RUN rm -rf slurm*.rpm /root/rpmbuild
RUN useradd --system -c "Slurm Workload Manager" -s /sbin/nologin slurm && \
mkdir -p /var/spool/slurm{,ctl}d && chown slurm /var/spool/slurm{,ctl}d && \
mkdir -p /var/{run,log}/slurm && chown slurm /var/{run,log}/slurm
RUN useradd -c "Default user" -G users -m janedoe
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["bash"]
CMD ["su", "--login", "janedoe"]
......@@ -7,11 +7,11 @@ like `srun`, `sbatch`, etc. This container can be used for testing your HPC appl
The container is set up to automatically detect your hardware on start-up. It will provide four
compute nodes that share the specification of the platform the container is running on (number of
cores, hyperthreading, ...). The *cluster* is called `sid` (Slurm in Docker) and it has one
partition, `sidp`, containing the nodes `sidc[1-4]`.
cores, hyperthreading, ...). The _cluster_ is called `sid` (Slurm in Docker) and it has one
partition, `sidp`, containing the compute nodes `sidc[1-4]`.
When you start the container, the services are already up and running. You will be greeted by a Bash
shell running as `root`.
When you start the container, the services are already up and running. The command run as default is
`su --login janedoe`. _janedoe_ is in the _janedoe_ and _users_ groups.
## Running the container
......
......@@ -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