{"id":50385163,"url":"https://github.com/stackhpc/slurm_image_builder","last_synced_at":"2026-05-30T14:31:04.889Z","repository":{"id":39746400,"uuid":"478614927","full_name":"stackhpc/slurm_image_builder","owner":"stackhpc","description":"Build images for slurm appliance","archived":false,"fork":false,"pushed_at":"2023-02-17T16:49:20.000Z","size":96,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T22:50:22.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-06T15:17:18.000Z","updated_at":"2022-04-06T15:17:34.000Z","dependencies_parsed_at":"2023-02-14T17:40:53.822Z","dependency_job_id":null,"html_url":"https://github.com/stackhpc/slurm_image_builder","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/stackhpc/slurm_image_builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fslurm_image_builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fslurm_image_builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fslurm_image_builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fslurm_image_builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackhpc","download_url":"https://codeload.github.com/stackhpc/slurm_image_builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackhpc%2Fslurm_image_builder/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:31:04.401Z","updated_at":"2026-05-30T14:31:04.884Z","avatar_url":"https://github.com/stackhpc.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection - stackhpc.slurm_image_builder\n\nAn image builder for the StackHPC [Slurm appliance](https://github.com/stackhpc/ansible-slurm-appliance/).\n\nThe Slurm appliance normally uses a Rocky Linux Generic Cloud image 8.5. It can build its own images from this.\n\nHowever downloading all the packages and other binaries required can be quite slow, especially on a slow network. The tools here create an OpenStack image which contain the packages and binaries for all cluster nodes, which can be used as an alternative starting point for the Slurm appliance. They contain no configuration and the normal Slurm appliance playbooks must still be run once instance have been deployed with these images.\n\nImages contain the git description of this repo state used to build them in `/var/lib/misc/build.txt`.\n\n# Creating Images\n\nFor CI, simply trigger the workflow. Built images will be uploaded to Arcus `s3://openhpc-images-prerelease`.\n\nCurrent manual steps, assuming a Rocky Linux 8.5 host on Arcus:\n\n1. Create an appropriate collections path, e.g:\n\n    mkdir -p collections/ansible_collections/stackhpc/slurm_image_builder\n\n1. Clone the repo\n1. Install environment: `./setup.sh`\n1. Activate venv if necessary: `. venv/bin/activate`\n1. Build image: `PACKER_LOG=1 packer build --on-error=ask openstack.pkr.hcl`\n\n# Usage of Images\n\n- Upload an image built by this repo to your OpenStack.\n- Configure the provisioner to use an image built by this repo for all nodes (control, compute and login) - [smslabs example](https://github.com/stackhpc/ansible-slurm-appliance/commit/cc362e573f07829bcd6eb6475667cbf4ba26b58d).\n- Ensure the appliance repo includes [PR#166](https://github.com/stackhpc/ansible-slurm-appliance/pull/166). This modifies the dependencies in `requirements.yml`.\n- If the `ansible-galaxy {role,collection} install ...` [installation commands](https://github.com/stackhpc/ansible-slurm-appliance/#installation-on-deployment-host) have already been run, rerun them to update dependencies.\n- Set `prometheus_skip_install: true` in your environment, e.g. see here. This avoids prometheus binaries being downloaded to localhost and then propagated to the relevant node(s).\n- Continue Slurm appliance setup/deploy/configuration as normal.\n\n# What this does\nThis uses Ansible from Packer to:\n- Create a VM using a Rocky Linux 8.5 generic cloud image.\n- Update all packages and reboot if necessary.\n- Install appropriate packages, at latest version where possible.\n- Install binaries for Grafana, Prometheus and node-exporter.\n\nSections below give details and non-obvious features.\n\n## DNF packages\n\nThe role adds rpm keys and adds/enables various repos as used by the appliance and dependencies. It then uses `ansible.builtin.dnf` commands to install packages.\n\nUnfortunately the obvious approach of using an (unversioned) list of packages from an existing cluster runs into dependency solve problems with dependencies for Open Ondemand. See `roles/builder/tasks/dnf_packages.yml` for the approach which worked. Note package lists are manually collated from the appliance and dependencies. The update step is done first to try to ensure that any kernel-dependent packages get the correct version.\n\n## Monitoring binaries\nIn the Slurm appliance the monitoring stack is installed using `cloudalchemy` roles. The appropriate playbooks in `roles/builder/tasks/` use plays extracted/modified from these roles to install the necessary binaries.\n\n### [cloudalchemy.grafana](https://github.com/cloudalchemy/ansible-grafana)\n\nThis role behaves ok and simply no-ops the install if the correct binaries already exist in the image. The default `grafana_version` is `latest` so the appliance may still download packages if the built image is outdated when the appliance is configured. Note that without the grafana repo file (templated by this tooling), an old version of grafana is installed (from some other repo) which does not appear to read all the config, so the appliance does not set the admin username/password correctly.\n\n### [cloudalchemy.node_exporter](https://github.com/cloudalchemy/ansible-node-exporter)\n\nIn the upstream version of this role:\n- `preflight.yml` detects whether binaries already exist.\n- If they don't, the `install.yml` playbook downloads binaries to localhost and then propagates them to hosts. There is no way to avoid this approach.\n- If they do, `install.yml` is skipped.\n\nHowever the `install.yml` playbook also creates the group/user, which means startup fails if the binaries exist but the users have not been ceated.\n\nA fork of the role `feature/no-install` ([here](https://github.com/stackhpc/ansible-node-exporter/tree/feature/no-install)) has therefore been created. This moves user creation into `configure.yml`, along with systemd unit file creation which actually requires the user/group.\n\n### [cloudalchemy.prometheus](https://github.com/cloudalchemy/ansible-prometheus)\n\nThis role also uses the \"download to localhost and propagate\" approach. It does not check for pre-existing binaries, but provides a role variable `prometheus_skip_install: true` which means it will not try to manage the binaries. This variable should therefore be set when using images built using this tooling, as shown above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fslurm_image_builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackhpc%2Fslurm_image_builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackhpc%2Fslurm_image_builder/lists"}