{"id":13533969,"url":"https://github.com/giovtorres/slurm-docker-cluster","last_synced_at":"2026-02-24T03:18:20.041Z","repository":{"id":26556781,"uuid":"103178051","full_name":"giovtorres/slurm-docker-cluster","owner":"giovtorres","description":"A Slurm cluster using docker-compose","archived":false,"fork":false,"pushed_at":"2024-09-27T18:12:50.000Z","size":41,"stargazers_count":358,"open_issues_count":7,"forks_count":198,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-31T19:09:07.961Z","etag":null,"topics":["docker-compose","hpc","slurm","slurm-cluster"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giovtorres.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-11T19:21:32.000Z","updated_at":"2025-03-29T02:03:39.000Z","dependencies_parsed_at":"2023-12-24T20:17:10.885Z","dependency_job_id":"c6e7b2d8-3c97-41e3-a862-52e3cde057f6","html_url":"https://github.com/giovtorres/slurm-docker-cluster","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovtorres%2Fslurm-docker-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovtorres%2Fslurm-docker-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovtorres%2Fslurm-docker-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovtorres%2Fslurm-docker-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giovtorres","download_url":"https://codeload.github.com/giovtorres/slurm-docker-cluster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721898,"owners_count":20985084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","hpc","slurm","slurm-cluster"],"created_at":"2024-08-01T07:01:24.895Z","updated_at":"2026-02-24T03:18:20.036Z","avatar_url":"https://github.com/giovtorres.png","language":"Dockerfile","funding_links":[],"categories":["Software","Dockerfile"],"sub_categories":["Trends"],"readme":"# Slurm Docker Cluster\n\n**Slurm Docker Cluster** is a multi-container Slurm cluster designed for rapid\ndeployment using Docker Compose. This repository simplifies the process of\nsetting up a robust Slurm environment for development, testing, or lightweight\nusage.\n\n## 🏁 Quick Start\n\n**Requirements:** [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/)\n\n```bash\ngit clone https://github.com/giovtorres/slurm-docker-cluster.git\ncd slurm-docker-cluster\n\n# Start with defaults (Slurm 25.11.x, no monitoring)\nmake up\n\n# Verify cluster is working\nmake status\nmake test\n\n# See all available commands\nmake help\n```\n\n**To customize:** Copy `.env.example` to `.env` and modify settings before running `make up`\n\n```bash\ncp .env.example .env\n# Edit .env to change SLURM_VERSION or enable ELASTICSEARCH_HOST\nmake up\n```\n\n**Supported Slurm versions:** 25.11.x, 25.05.x, 24.11.x\n\n**Supported architectures (auto-detected):** AMD64, ARM64\n\n## 📦 What's Included\n\n**Containers:**\n\n- **mysql** - Job and cluster database\n- **slurmdbd** - Database daemon for accounting\n- **slurmctld** - Controller for job scheduling\n- **slurmrestd** - REST API daemon (HTTP/JSON access)\n- **c1, c2** - Compute nodes\n- **elasticsearch** - (optional) indexing jobs\n- **kibana** - (optional) visualization for elasticsearch\n\n**Persistent volumes:**\n\n- Configuration (`etc_slurm`)\n- Logs (`var_log_slurm`)\n- Job files (`slurm_jobdir`)\n- Database (`var_lib_mysql`)\n- Authentication (`etc_munge`)\n\n## 🖥️ Using the Cluster\n\n```bash\n# Access controller\nmake shell\n\n# Inside controller:\nsinfo                          # View cluster status\nsbatch --wrap=\"hostname\"       # Submit job\nsqueue                         # View queue\nsacct                          # View accounting\n\n# Or run example jobs\nmake run-examples\n```\n\n## 📊 Monitoring\n\n### REST API\n\nQuery cluster via REST API (version auto-detected: v0.0.44 for 25.11.x, v0.0.42 for 25.05.x, v0.0.41 for 24.11.x):\n\n```bash\n# Get JWT Token\nJWT_TOKEN=$(docker exec slurmctld scontrol token 2\u003e\u00261 | grep \"SLURM_JWT=\" | cut -d'=' -f2)\n\n# Get nodes\ndocker exec slurmrestd curl -s -H \"X-SLURM-USER-TOKEN: $JWT_TOKEN\" \\\n  http://localhost:6820/slurm/v0.0.42/nodes | jq .nodes\n\n# Get partitions\ndocker exec slurmrestd curl -s -H \"X-SLURM-USER-TOKEN: $JWT_TOKEN\" \\\n  http://localhost:6820/slurm/v0.0.42/partitions | jq .partitions\n```\n\n### Elasticsearch and Kibana (Optional)\n\nEnable job completion monitoring and visualization:\n\n```bash\n# 1. Setting ELASTICSEARCH_HOST in .env enables the monitoring profile\nELASTICSEARCH_HOST=http://elasticsearch:9200\n\n# 2. Start cluster (monitoring auto-enabled)\nmake up\n\n# 3. Access Kibana at http://localhost:5601\n# After loading, click: Elasticsearch → Index Management → slurm → Discover index\n\n# 4. Query job completions directly\ndocker exec elasticsearch curl -s \"http://localhost:9200/slurm/_search?pretty\"\n\n# Test monitoring\nmake test-monitoring\n```\n\n**Indexed data:** Job ID, user, partition, state, times, nodes, exit code\n\n## 🔄 Cluster Management\n\n```bash\nmake down     # Stop cluster (keeps data)\nmake clean    # Remove all containers and volumes\nmake rebuild  # Clean, rebuild, and restart\nmake logs     # View container logs\n```\n\n\u003e **Note:** If `ELASTICSEARCH_HOST` is set in `.env`, monitoring containers are automatically managed.\n\n## ⚙️ Advanced\n\n### Version Management\n\n```bash\nmake set-version VER=24.11.6   # Switch Slurm version\nmake version                   # Show current version\nmake build-all                 # Build all supported versions\nmake test-all                  # Test all versions\n```\n\n### Configuration Updates\n\n```bash\n# Live edit (persists across restarts)\ndocker exec -it slurmctld vi /etc/slurm/slurm.conf\nmake reload-slurm\n\n# Push local changes\nvi config/25.05/slurm.conf\nmake update-slurm FILES=\"slurm.conf\"\n\n# Permanent changes\nmake rebuild\n```\n\n### Multi-Architecture Builds\n\n```bash\n# Cross-platform build (uses QEMU emulation)\ndocker buildx build --platform linux/arm64 \\\n  --build-arg SLURM_VERSION=25.05.6 \\\n  --load -t slurm-docker-cluster:25.05.6 .\n```\n\n## 📚 Documentation\n\n- **Commands:** Run `make help` for all available commands\n- **Examples:** Job scripts in `examples/` directory\n\n## 🤝 Contributing\n\nContributions are welcomed! Fork this repo, create a branch, and submit a pull request.\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiovtorres%2Fslurm-docker-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiovtorres%2Fslurm-docker-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiovtorres%2Fslurm-docker-cluster/lists"}