Setup Slurm-web for Slurm HPC Clusters
Satish Patel
Sr. Cloud Engineer | Openstack | Network | Data Center | Kubernetes | HPC | Ceph | Virtualization
Slurm-web provides a web interface on top of Slurm with intuitive graphical views, clear insights and advanced visualizations to track your jobs and monitor status of HPC supercomputers in your organization.
Prerequisite
You need functional slurm HPC cluster with Slurmdbd (Version >= 23.02)
Installation Steps
Install slurmrestd
$ dpkg -i slurm-smd-slurmrestd_24.05.2-1_amd64.deb
/etc/default/slurmrestd
SLURMRESTD_OPTIONS="-u slurm -g slurm"
SLURMRESTD_LISTEN="unix:/var/lib/slurm/slurmrestd.socket"
Enable/Start service
$ systemctl enable slurmrestd
$ systemctl start slurmrestd
Test API using unix socket
$ curl --unix-socket /var/lib/slurm/slurmrestd.socket https://slurm/slurm/v0.0.39/ping
{
"meta": {
"plugin": {
"type": "openapi\/v0.0.39",
"name": "Slurm OpenAPI v0.0.39",
"data_parser": "v0.0.39"
},
"client": {
"source": "\/var\/lib\/slurm\/slurmrestd.socket->socket:[12451233] (fd 8)"
},
"Slurm": {
"version": {
"major": 24,
List available API versions
$ slurmrestd -d list -u slurm
Possible data_parser plugins:
data_parser/v0.0.40
data_parser/v0.0.39
data_parser/v0.0.41
Install slurm-web
Download package singing key
$ curl -sS https://pkgs.rackslab.io/keyring.asc | gpg --dearmor | tee /usr/share/keyrings/rackslab.gpg > /dev/null
Create API Source file /etc/apt/sources.list.d/rackslab.sources
Types: deb
URIs: https://pkgs.rackslab.io/deb
Suites: ubuntu24.04
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/rackslab.gpg
Install packages
$ apt update
$ apt install slurm-web-agent slurm-web-gateway
JWT singing key
slurm-web use JWT token to authenticate between components.
$ /usr/libexec/slurm-web/slurm-web-gen-jwt-key
RacksDB
Slurm-web uses RacksDB to generate graphical representation of datacenters racks with the compute nodes.
$ apt install racksdb
$ cp -r /usr/share/doc/python3-racksdb/examples/db/* /var/lib/racksdb/
$ racksdb datacenters
$ systemctl enable racksdb
$ systemctl start racksdb
Slurm-web configuration files
/etc/slurm-web/agent.ini
[service]
cluster=myslurmcluster
interface=localhost
port=5012
[slurmrestd]
socket=/var/lib/slurm/slurmrestd.socket
version=0.0.39
/etc/slurm-web/gateway.ini
[service]
interface=localhost
port=5011
[ui]
host=https://myslurm-web.example.com:5011
[agents]
url=https://localhost:5012
version=3.1.0
racksdb_version=0.4.0
Notes: host=https://<HOSTNAME_OR_IP>:5011
Start services
$ systemctl restart slurm-web-agent.service
$ systemctl restart slurm-web-gateway.service
Access Web UI from your browser https://<hostname_or_ip>:5011
Slurm-web only support LDAP authentication (Default Authentication is disabled)
Enjoy!