Skip to content

Commit b0d64ab

Browse files
committed
simplify slurm docker-compose by allowing dynamic node registration
- don't need network config, ports
1 parent facaf3e commit b0d64ab

File tree

3 files changed

+13
-59
lines changed

3 files changed

+13
-59
lines changed

ci/slurm/docker-compose.yaml

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ services:
2020
hostname: slurmdbd
2121
volumes:
2222
- etc_munge:/etc/munge
23-
# - $PWD/etc_slurm:/etc/slurm
2423
- var_log_slurm:/var/log/slurm
25-
expose:
26-
- "6819"
2724
depends_on:
2825
- mysql
2926

@@ -36,80 +33,31 @@ services:
3633
hostname: slurmctld
3734
volumes:
3835
- etc_munge:/etc/munge
39-
# - $PWD/etc_slurm:/etc/slurm
40-
# - $PWD/slurm.conf:/etc/slurm/slurm.conf
4136
- slurm_jobdir:/data
4237
- var_log_slurm:/var/log/slurm
4338
- ../..:/io
44-
expose:
45-
- "6817"
46-
- "6818"
4739
depends_on:
4840
- slurmdbd
49-
# networks:
50-
# common-network:
51-
# ipv4_address: 10.1.1.10
5241

53-
c1:
42+
compute:
5443
image: ipp-cluster:slurm
5544
build: .
5645
command:
5746
- slurmd
58-
hostname: c1
59-
container_name: c1
47+
deploy:
48+
replicas: 2
6049

6150
volumes:
6251
- etc_munge:/etc/munge
63-
# - $PWD/etc_slurm:/etc/slurm
64-
# - $PWD/slurm.conf:/etc/slurm/slurm.conf
6552
- slurm_jobdir:/data
6653
- var_log_slurm:/var/log/slurm
6754
- ../..:/io
68-
expose:
69-
- "6817"
70-
- "6818"
7155
depends_on:
7256
- "slurmctld"
73-
# networks:
74-
# common-network:
75-
# ipv4_address: 10.1.1.11
76-
77-
c2:
78-
image: ipp-cluster:slurm
79-
build: .
80-
command:
81-
- slurmd
82-
hostname: c2
83-
container_name: c2
84-
# need to be privileged for cgroup plugin
85-
privileged: true
86-
volumes:
87-
- etc_munge:/etc/munge
88-
# - $PWD/etc_slurm:/etc/slurm
89-
# - $PWD/slurm.conf:/etc/slurm/slurm.conf
90-
- slurm_jobdir:/data
91-
- var_log_slurm:/var/log/slurm
92-
- ../..:/io
93-
expose:
94-
- "6817"
95-
- "6818"
96-
depends_on:
97-
- "slurmctld"
98-
# networks:
99-
# common-network:
100-
# ipv4_address: 10.1.1.12
10157

10258
volumes:
10359
etc_munge:
10460
# etc_slurm:
10561
slurm_jobdir:
10662
var_lib_mysql:
10763
var_log_slurm:
108-
109-
networks:
110-
common-network:
111-
driver: bridge
112-
ipam:
113-
driver: default
114-
config:
115-
- subnet: 10.1.1.0/24

ci/slurm/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ then
5858
echo "-- slurmctld is now active ..."
5959

6060
echo "---> Starting the Slurm Node Daemon (slurmd) ..."
61-
exec /usr/sbin/slurmd -Dvvv
61+
exec /usr/sbin/slurmd -Z --conf "CPUs=2 RealMemory=1000 Feature=compute" -Dvvv
6262
fi
6363

6464
exec "$@"

ci/slurm/etc_slurm/slurm.conf

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,15 @@ AccountingStoragePort=6819
8888
#AccountingStorageUser=
8989
#
9090
# COMPUTE NODES
91-
NodeName=c1 NodeAddr=c1 CPUs=2 RealMemory=1000 State=UNKNOWN
92-
NodeName=c2 NodeAddr=c2 CPUs=2 RealMemory=1000 State=UNKNOWN
91+
#NodeName=c1 NodeAddr=slurm-compute-1 CPUs=2 RealMemory=1000 State=UNKNOWN
92+
#NodeName=c2 NodeAddr=slurm-compute-2 CPUs=2 RealMemory=1000 State=UNKNOWN
9393
#
9494
# PARTITIONS
9595
#PartitionName=normal Default=yes Nodes=c1,c2 Priority=50 DefMemPerCPU=500 Shared=NO MaxNodes=2 MaxTime=5-00:00:00 DefaultTime=5-00:00:00 State=UP
96-
PartitionName=normal Nodes=c1,c2 Default=YES MaxTime=INFINITE State=UP
96+
# PartitionName=normal Nodes=c1,c2 Default=YES MaxTime=INFINITE State=UP
97+
98+
# allow dynamic registration of compute nodes (slurmd -Z)
99+
Nodeset=ns1 Feature=compute
100+
101+
PartitionName=all Nodes=ALL Default=yes MaxNodes=100
102+
MaxNodeCount=100

0 commit comments

Comments
 (0)