Created
November 1, 2015 18:26
-
-
Save mastbaum/2538bdea1ffe242beeac to your computer and use it in GitHub Desktop.
Docker SLURM node Resume and Suspend scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "`date` Resume invoked $0 $*" >> /var/log/slurm-llnl/power_save.log | |
hosts=`scontrol show hostnames $1` | |
for host in $hosts | |
do | |
docker run --rm \ | |
--name $host \ | |
-h $host \ | |
-v /home:/home \ | |
-v /etc/slurm-llnl/slurm.conf:/etc/slurm-llnl/slurm.conf \ | |
-v /etc/munge/munge.key:/etc/munge/munge.key \ | |
slurm-ubuntu | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "`date` Suspend invoked $0 $*" >> /var/log/slurm-llnl/power_save.log | |
hosts=`scontrol show hostnames $1` | |
for host in $hosts | |
do | |
docker stop $host | |
docker rm $host | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment