Basic Setup
How to install and configure the HPC Dashboard for your SLURM cluster
Setting up the HPC Dashboard requires Node.js and access to a SLURM cluster with API capabilities. Follow these steps to get your dashboard up and running quickly.
Prerequisites
Before installation, ensure you have:
- Node.js (v20.9 or later)
- npm or Yarn
- PM2 (for production deployment)
- SLURM cluster with REST API enabled
- SLURM API user credentials
- SLURM API token
- Root permissions on the installation system
- Optional: PostgreSQL 13+ for Rewind, node history, GPU history and job metrics
Quick Installation
Step 1: Clone the Repository
Begin by installing the dashboard. You will be required to select a branch. Normally the main branch is recommended.
npx create-slurm-dashboard slurm-node-dashboard
Once complete, change in to the directory.
cd slurm-node-dashboard
Step 2: Install Dependencies
Install all required dependencies:
npm install
Step 3: Configure Environment
Set up your production environment by moving the template env file to .env:
mv infra/.env.production .env
Update the file for your environment. Every setting is read when the server starts, so changing one later needs a restart, not a rebuild. The exception is NEXT_PUBLIC_BASE_PATH, which is fixed when the app is built (see Nginx Configuration).
# GENERAL SETTINGS
NODE_ENV="production"
REACT_EDITOR="code"
# Cluster branding
COMPANY_NAME="Acme Corp"
CLUSTER_NAME="My Cluster"
CLUSTER_LOGO="/logo.png"
# Support URL (optional)
NEXT_PUBLIC_SUPPORT_URL="https://support.example.com"
# Node view configuration file path
NODEVIEW_CONFIG_PATH="infra/node.cfg"
# SLURM REST API CONNECTION
SLURM_PROTOCOL="http"
SLURM_SERVER="192.168.1.5"
SLURM_API_TOKEN=""
SLURM_API_ACCOUNT=""
# Optional: leave unset to use the newest version your slurmrestd serves
# SLURM_API_VERSION="v0.0.42"
# PROMETHEUS MONITORING (Optional)
PROMETHEUS_URL="http://prometheus:9090"
GPU_METRICS_CLUSTER=""
GPU_METRICS_LABEL_FILTER=""
GPU_METRICS_CAPTURE_LABEL_FILTER=""
GPU_METRICS_CAPTURE_TOKEN=""
# SLACK NOTIFICATIONS (Optional)
SLACK_WEBHOOK_URL=""
SLURM_TOKEN_EXPIRY_WARNING_DAYS="30"
# AI ASSISTANT (Optional)
OPENAI_API_KEY=""
OPENAI_API_URL="https://api.openai.com/v1"
OPENAI_API_MODEL="gpt-4o-mini"
OPENAI_API_MODEL_SUGGESTION="gpt-4o-mini"
LLM_CONFIG_PATH="infra/llm-assistant.yaml"
# ADMIN AUTHENTICATION
ADMIN_USERNAME="admin"
ADMIN_PASSWORD="password"
BETTER_AUTH_SECRET="replace-with-a-long-random-string"
# OPTIONAL FEATURES
# Features turn on when what they need is configured. Set a flag to "false"
# to turn its feature off. GPU utilization and the AI assistant also need
# their flag set to "true".
NEXT_PUBLIC_ENABLE_GPU_UTILIZATION="false"
NEXT_PUBLIC_ENABLE_OPENAI_PLUGIN="false"
# Lmod spider JSON for the Modules page (default: public/modules.json)
# MODULES_FILE="/etc/slurm-dashboard/modules.json"
# DATABASE (Optional: Rewind, node history, GPU history, job metrics)
# The dashboard creates its tables on startup.
DATABASE_URL="postgresql://slurmdash:password@localhost:5432/slurmdash"
# Background collection (0 turns one off)
# NODE_HISTORY_INTERVAL_SECONDS="60"
# NODE_HISTORY_RETENTION_DAYS="30"
# SNAPSHOT_INTERVAL_MINUTES="60"
# SNAPSHOT_RETENTION_DAYS="30"
# GPU_CAPTURE_INTERVAL_SECONDS="60"
# METRICS_ROLLUP_INTERVAL_SECONDS="60"
# Hierarchy labels
NEXT_PUBLIC_HIERARCHY_LEVEL_1_LABEL="College"
NEXT_PUBLIC_HIERARCHY_LEVEL_2_LABEL="Department"
Configuration Required:
Make sure to update the SLURM_SERVER, SLURM_API_TOKEN, and SLURM_API_ACCOUNT
fields with your specific values. infra/.env.production lists every
setting with a comment explaining it.
Which Features Are On:
You don't need a flag for each feature. See Features and the Database for what each feature needs, and check Admin → Plugins after starting the dashboard to see what's on and why.
Step 4: Start Development Server
Launch the development server to test your installation:
npm run dev
Visit http://localhost:3020 in your browser to view the dashboard.
For production, build and run it with PM2 or Docker.
Running with Docker
Build the image from the repository and run it with your .env:
docker build -f infra/Dockerfile -t slurm-node-dashboard .
docker run -p 3000:3000 --env-file .env slurm-node-dashboard
Quotes in Docker Env Files:
Docker's --env-file keeps quotes as part of the value, so write
CLUSTER_NAME=Sol, not CLUSTER_NAME="Sol" as in infra/.env.production.
Settings are read when the container starts, so one image works for several clusters: set them with docker run -e, an env file, or your Kubernetes manifest. NEXT_PUBLIC_BASE_PATH is the exception, since Next.js needs it when the app is built.
Images built from main are published as ghcr.io/thediymaker/slurm-node-dashboard:main, and releases as :<version> and :latest. To serve under a sub-path, build your own image with --build-arg NEXT_PUBLIC_BASE_PATH=....
What's Next?
After installation, you can:
- Configure advanced features like OpenAI integration or Prometheus metrics
- Add a PostgreSQL database for Rewind, node history, GPU history and job metrics
- Integrate with Open OnDemand
Documentation:
See Features and the Database for what each optional feature needs.