{"id":20019234,"url":"https://github.com/jbris/slurm-rest-api-docker","last_synced_at":"2025-09-20T04:31:57.342Z","repository":{"id":226249390,"uuid":"768151906","full_name":"JBris/slurm-rest-api-docker","owner":"JBris","description":"A test Docker build for SLURM with the SLURM REST API configured.","archived":false,"fork":false,"pushed_at":"2025-03-01T12:55:58.000Z","size":563,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T01:33:55.047Z","etag":null,"topics":["docker","docker-compose","hpc","hpc-applications","rest","rest-api","slurm","slurm-cluster","slurm-rest","slurm-rest-api","slurm-workload-manager"],"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/JBris.png","metadata":{"files":{"readme":"README.base.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":"2024-03-06T15:06:24.000Z","updated_at":"2025-03-01T12:56:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"45ed8e2c-6c91-4944-8c5c-4d720b596d72","html_url":"https://github.com/JBris/slurm-rest-api-docker","commit_stats":null,"previous_names":["jbris/slurm-rest-api-docker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JBris/slurm-rest-api-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Fslurm-rest-api-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Fslurm-rest-api-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Fslurm-rest-api-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Fslurm-rest-api-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JBris","download_url":"https://codeload.github.com/JBris/slurm-rest-api-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JBris%2Fslurm-rest-api-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276046871,"owners_count":25575876,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","docker-compose","hpc","hpc-applications","rest","rest-api","slurm","slurm-cluster","slurm-rest","slurm-rest-api","slurm-workload-manager"],"created_at":"2024-11-13T08:26:33.799Z","updated_at":"2025-09-20T04:31:57.057Z","avatar_url":"https://github.com/JBris.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slurm Docker Cluster\n\nThis is a multi-container Slurm cluster using docker-compose.  The compose file\ncreates named volumes for persistent storage of MySQL data files as well as\nSlurm state and log directories.\n\n## Containers and Volumes\n\nThe compose file will run the following containers:\n\n* mysql\n* slurmdbd\n* slurmctld\n* c1 (slurmd)\n* c2 (slurmd)\n\nThe compose file will create the following named volumes:\n\n* etc_munge         ( -\u003e /etc/munge     )\n* etc_slurm         ( -\u003e /etc/slurm     )\n* slurm_jobdir      ( -\u003e /data          )\n* var_lib_mysql     ( -\u003e /var/lib/mysql )\n* var_log_slurm     ( -\u003e /var/log/slurm )\n\n## Building the Docker Image\n\nBuild the image locally:\n\n```console\ndocker build -t slurm-docker-cluster:21.08.6 .\n```\n\nBuild a different version of Slurm using Docker build args and the Slurm Git\ntag:\n\n```console\ndocker build --build-arg SLURM_TAG=\"slurm-19-05-2-1\" -t slurm-docker-cluster:19.05.2 .\n```\n\nOr equivalently using `docker-compose`:\n\n```console\nSLURM_TAG=slurm-19-05-2-1 IMAGE_TAG=19.05.2 docker-compose build\n```\n\n\n## Starting the Cluster\n\nRun `docker-compose` to instantiate the cluster:\n\n```console\nIMAGE_TAG=19.05.2 docker-compose up -d\n```\n\n## Register the Cluster with SlurmDBD\n\nTo register the cluster to the slurmdbd daemon, run the `register_cluster.sh`\nscript:\n\n```console\n./register_cluster.sh\n```\n\n\u003e Note: You may have to wait a few seconds for the cluster daemons to become\n\u003e ready before registering the cluster.  Otherwise, you may get an error such\n\u003e as **sacctmgr: error: Problem talking to the database: Connection refused**.\n\u003e\n\u003e You can check the status of the cluster by viewing the logs: `docker-compose\n\u003e logs -f`\n\n## Accessing the Cluster\n\nUse `docker exec` to run a bash shell on the controller container:\n\n```console\ndocker exec -it slurmctld bash\n```\n\nFrom the shell, execute slurm commands, for example:\n\n```console\n[root@slurmctld /]# sinfo\nPARTITION AVAIL  TIMELIMIT  NODES  STATE NODELIST\nnormal*      up 5-00:00:00      2   idle c[1-2]\n```\n\n## Submitting Jobs\n\nThe `slurm_jobdir` named volume is mounted on each Slurm container as `/data`.\nTherefore, in order to see job output files while on the controller, change to\nthe `/data` directory when on the **slurmctld** container and then submit a job:\n\n```console\n[root@slurmctld /]# cd /data/\n[root@slurmctld data]# sbatch --wrap=\"hostname\"\nSubmitted batch job 2\n[root@slurmctld data]# ls\nslurm-2.out\n[root@slurmctld data]# cat slurm-2.out\nc1\n```\n\n## Stopping and Restarting the Cluster\n\n```console\ndocker-compose stop\ndocker-compose start\n```\n\n## Deleting the Cluster\n\nTo remove all containers and volumes, run:\n\n```console\ndocker-compose stop\ndocker-compose rm -f\ndocker volume rm slurm-docker-cluster_etc_munge slurm-docker-cluster_etc_slurm slurm-docker-cluster_slurm_jobdir slurm-docker-cluster_var_lib_mysql slurm-docker-cluster_var_log_slurm\n```\n## Updating the Cluster\n\nIf you want to change the `slurm.conf` or `slurmdbd.conf` file without a rebuilding you can do so by calling\n```console\n./update_slurmfiles.sh slurm.conf slurmdbd.conf\n```\n(or just one of the files).\nThe Cluster will automatically be restarted afterwards with\n```console\ndocker-compose restart\n```\nThis might come in handy if you add or remove a node to your cluster or want to test a new setting.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbris%2Fslurm-rest-api-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbris%2Fslurm-rest-api-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbris%2Fslurm-rest-api-docker/lists"}