{"id":50385056,"url":"https://github.com/stackhpc/leafcloud-lab-slurm-appliance","last_synced_at":"2026-05-30T14:30:56.147Z","repository":{"id":289829856,"uuid":"947247951","full_name":"stackhpc/leafcloud-lab-slurm-appliance","owner":"stackhpc","description":"Slurm appliance fork for training on Leafcloud","archived":false,"fork":false,"pushed_at":"2026-03-30T09:19:14.000Z","size":3946,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"training/leafcloud","last_synced_at":"2026-03-30T11:29:49.472Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackhpc.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-12T11:42:24.000Z","updated_at":"2026-03-30T09:19:13.000Z","dependencies_parsed_at":"2025-04-25T09:54:25.416Z","dependency_job_id":null,"html_url":"https://github.com/stackhpc/leafcloud-lab-slurm-appliance","commit_stats":null,"previous_names":["stackhpc/leafcloud-lab-slurm-appliance"],"tags_count":121,"template":false,"template_full_name":null,"purl":"pkg:github/stackhpc/leafcloud-lab-slurm-appliance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fleafcloud-lab-slurm-appliance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fleafcloud-lab-slurm-appliance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fleafcloud-lab-slurm-appliance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fleafcloud-lab-slurm-appliance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhpc","download_url":"https://codeload.github.com/stackhpc/leafcloud-lab-slurm-appliance/tar.gz/refs/heads/training/leafcloud","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fleafcloud-lab-slurm-appliance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33696681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":[],"created_at":"2026-05-30T14:30:55.943Z","updated_at":"2026-05-30T14:30:56.115Z","avatar_url":"https://github.com/stackhpc.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StackHPC Slurm Appliance\n\n[![Test deployment and image build on OpenStack](https://github.com/stackhpc/ansible-slurm-appliance/actions/workflows/stackhpc.yml/badge.svg)](https://github.com/stackhpc/ansible-slurm-appliance/actions/workflows/stackhpc.yml)\n\nThis repository contains playbooks and configuration to define a Slurm-based HPC environment. This includes:\n\n- [Rocky Linux](https://rockylinux.org/)-based hosts.\n- [OpenTofu](https://opentofu.org/) configurations to define the cluster's infrastructure-as-code.\n- Packages for Slurm and MPI software stacks from [OpenHPC](https://openhpc.community/).\n- Shared fileystem(s) using NFS (with in-cluster or external servers) or [CephFS](https://docs.ceph.com/en/latest/cephfs/) via [OpenStack Manila](https://wiki.openstack.org/wiki/Manila).\n- Slurm accounting using a MySQL database.\n- Monitoring integrated with Slurm jobs using Prometheus, Elasticsearch and Grafana.\n- A web-based portal from [Open OnDemand](https://openondemand.org/).\n- Production-ready default Slurm configurations for access and memory limits.\n- [Packer](https://developer.hashicorp.com/packer)-based image build configurations for node images.\n\nThe repository is expected to be forked for a specific HPC site but can contain multiple environments for e.g. development, staging and production clusters\nsharing a common configuration. It has been designed to be modular and extensible, so if you add features for your HPC site please feel free to submit PRs\nback upstream to us!\n\nWhile it is tested on OpenStack it should work on any cloud with appropriate OpenTofu configuration files.\n\n## Demonstration Deployment\n\nThe default configuration in this repository may be used to create a cluster to explore use of the appliance. It provides:\n\n- Persistent state backed by an OpenStack volume.\n- NFS-based shared file system backed by another OpenStack volume.\n\nIt requires an OpenStack cloud, and an Ansible \"deploy host\" with access to that cloud.\n\nBefore starting ensure that:\n\n- You have root access on the deploy host.\n- You can create instances from the [latest Slurm appliance image](https://github.com/stackhpc/ansible-slurm-appliance/releases), which already contains the required packages. This is built and tested in StackHPC's CI.\n- You have an SSH keypair defined in OpenStack, with the private key available on the deploy host.\n- Created instances have access to internet (note proxies can be setup through the appliance if necessary).\n- Created instances have accurate/synchronised time (for VM instances this is usually provided by the hypervisor; if not or for bare metal instances it may be necessary to configure a time service via the appliance).\n- Three security groups are present: `default` allowing intra-cluster communication, `SSH` allowing external access via SSH and `HTTPS` allowing access for Open OnDemand.\n\n### Setup deploy host\n\nThe following operating systems are supported for the deploy host:\n\n- Rocky Linux 9\n- Rocky Linux 8\n\nThese instructions assume the deployment host is running Rocky Linux 8:\n\n```shell\nsudo yum install -y git python38\ngit clone https://github.com/stackhpc/ansible-slurm-appliance\ncd ansible-slurm-appliance\ngit checkout ${latest-release-tag}\n./dev/setup-env.sh\n```\n\nYou will also need to install [OpenTofu](https://opentofu.org/docs/intro/install/rpm/).\n\n### Create a new environment\n\nRun the following from the repository root to activate the venv:\n\n```shell\n. venv/bin/activate\n```\n\nUse the `cookiecutter` template to create a new environment to hold your configuration:\n\n```shell\ncd environments\ncookiecutter ../cookiecutter\n```\n\nand follow the prompts to complete the environment name and description.\n\n**NB:** In subsequent sections this new environment is referred to as `$ENV`.\n\nGo back to the root folder and activate the new environment:\n\n```shell\ncd ..\n. environments/$ENV/activate\n```\n\nAnd generate secrets for it:\n\n```shell\nansible-playbook ansible/adhoc/generate-passwords.yml\n```\n\n### Define and deploy infrastructure\n\nCreate an OpenTofu variables file to define the required infrastructure, e.g.:\n\n```text\n# environments/$ENV/tofu/terraform.tfvars:\ncluster_name = \"mycluster\"\ncluster_networks = [\n  {\n    network = \"some_network\" # *\n    subnet = \"some_subnet\" # *\n  }\n]\nkey_pair = \"my_key\" # *\ncontrol_node_flavor = \"some_flavor_name\"\nlogin = {\n    # Arbitrary group name for these login nodes\n    interactive = {\n        nodes: [\"login-0\"]\n        flavor: \"login_flavor_name\" # *\n    }\n}\ncluster_image_id = \"rocky_linux_9_image_uuid\"\ncompute = {\n    # Group name used for compute node partition definition\n    general = {\n        nodes: [\"compute-0\", \"compute-1\"]\n        flavor: \"compute_flavor_name\" # *\n    }\n}\n```\n\nVariables marked `*` refer to OpenStack resources which must already exist. The above is a minimal configuration - for all variables and descriptions see `environments/$ENV/tofu/variables.tf`.\n\nTo deploy this infrastructure, ensure the venv and the environment are [activated](#create-a-new-environment) and run:\n\n```shell\nexport OS_CLOUD=openstack\ncd environments/$ENV/tofu/\ntofu init\ntofu apply\n```\n\nand follow the prompts. Note the OS_CLOUD environment variable assumes that OpenStack credentials are defined using a [clouds.yaml](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#clouds-yaml) file in a default location with the default cloud name of `openstack`.\n\n### Configure appliance\n\nTo configure the appliance, ensure the venv and the environment are [activated](#create-a-new-environment) and run:\n\n```shell\nansible-playbook ansible/site.yml\n```\n\nOnce it completes you can log in to the cluster using:\n\n```shell\nssh rocky@$login_ip\n```\n\nwhere the IP of the login node is given in `environments/$ENV/inventory/hosts.yml`\n\n## Overview of directory structure\n\n- `environments/`: See [docs/environments.md](docs/environments.md).\n- `ansible/`: Contains the Ansible playbooks to configure the infrastructure.\n- `packer/`: Contains automation to use Packer to build machine images for an environment - see the readme in this directory for further information.\n- `dev/`: Contains development tools.\n\nFor further information see the [docs](docs/) directory.\n\n## Developing locally\n\nTo run the GitHub Actions linters locally, use:\n\n```shell\ndocker run --rm \\\n    -e RUN_LOCAL=true \\\n    --env-file \"super-linter.env\" \\\n    -v \"$(pwd)\":/tmp/lint \\\n    ghcr.io/super-linter/super-linter:v8.3.2\n```\n\n```shell\nANSIBLE_COLLECTIONS_PATH=.ansible/collections \\\n    ansible-lint -c .ansible-lint.yml\n```\n\nSpecifying `ANSIBLE_COLLECTIONS_PATH` ensures `ansible-lint` downloads collections and roles under the `.ansible` directory, separating them from our own roles under the `ansible` directory.\nWe exclude these downloaded files from linting by listing `.ansible` under `exclude_paths` in `.ansible-lint.yml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fleafcloud-lab-slurm-appliance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhpc%2Fleafcloud-lab-slurm-appliance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fleafcloud-lab-slurm-appliance/lists"}