11# Cluster tests
22
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
3+ This folder contains scripts to setup an ephemeral SLURM cluster to test
4+ cats in a more realistic setting than the current integration tests that
5+ use mocking . The setup builds upon work from upstream
66https://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.
7+ Dockerfile that installs jq and uv to make CATS installation easier. Our
8+ patches are maintained at
9+ https://github.com/GreenScheduler/slurm-docker-cluster .
10+
11+ ## Pre-requisites
12+
13+ Currently slurm-docker-cluster is only built against linux/amd64 so you
14+ will need to be on a 64-bit machine if you want to test this locally. You
15+ will also need docker installed.
916
1017## Setup
1118
1219Clone this repository (GreenScheduler/cats) and then run
1320
1421``` shell
15- ./cats/clone.sh
16- ./cats/build.sh
22+ ./cluster/start.sh
23+ ```
24+ to fetch the ` ghcr.io/greenscheduler/slurm-docker-cluster:latest ` image
25+ and start the cluster. You can now install cats locally from the current checkout:
26+ ``` shell
27+ ./cluster/install_cats.sh
1728```
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.
2329
2430Once the cluster is built and running, then you can run the following to get
2531access to the control node:
@@ -28,9 +34,6 @@ access to the control node:
2834docker exec -it slurmctld bash
2935```
3036
31- For more information about slurm-docker-cluster, consult the upstream
32- repository.
33-
3437## Tests
3538
3639An automated testing script is supplied which shows programmatic interaction
0 commit comments