Skip to content

Commit e3af680

Browse files
committed
tests(cluster): add README
1 parent a14c6e5 commit e3af680

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

cluster/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Cluster tests
2+
3+
This folder contains scripts to setup an ephemeral SLURM cluster to test cats
4+
in a more realistic setting than the current integration tests that use
5+
macking. The setup builds upon work from upstream
6+
https://github.com/giovtorres/slurm-docker-cluster with a patched
7+
[Dockerfile](Dockerfile) that installs the latest release of CATS and makes it
8+
available in the cluster.
9+
10+
## Setup
11+
12+
Clone this repository (GreenScheduler/cats) and then run
13+
14+
```shell
15+
./cats/clone.sh
16+
./cats/build.sh
17+
```
18+
to clone the slurm-docker-cluster repo, patch the Dockerfile to install CATS,
19+
build and start the cluster. Note that this requires `docker` and `docker
20+
compose` to be present. Currently this compiles a specific SLURM version, so
21+
this may take a while on older computers. When developing locally, you should
22+
only need to do this once, unless you update the Dockerfile.
23+
24+
Once the cluster is built and running, then you can run the following to get
25+
access to the control node:
26+
27+
```shell
28+
docker exec -it slurmctld bash
29+
```
30+
31+
For more information about slurm-docker-cluster, consult the upstream
32+
repository.
33+
34+
## Tests
35+
36+
An automated testing script is supplied which shows programmatic interaction
37+
with the slurm cluster. Currently cats schedules a short job, and the slurm
38+
`scontrol` output is checked to see that the job was scheduled correctly. To
39+
run the test:
40+
41+
```shell
42+
./cluster/tests.sh
43+
```

0 commit comments

Comments
 (0)