Host RPMs on Apache Server¶
Set up an Apache HTTP server to host the Slurm RPM repository so that the OIM can download packages during cluster deployment.
Overview¶
After building Slurm RPMs (see
Build Slurm Repository), you need to host them on
an HTTP server accessible from the OIM. This guide uses Apache (httpd)
to serve the RPMs as a YUM/DNF repository.
Prerequisites¶
- Slurm RPMs are built and verified (see Build Slurm Repository).
- The server on which you want to host the repository is accessible from the OIM.
Procedure¶
-
Update system packages:
Run on: repo serverdnf update -y -
Install Apache:
Run on: repo serverdnf install -y httpd -
Install createrepo:
Run on: repo serverdnf install -y createrepo -
Start and enable Apache:
Run on: repo serversystemctl start httpd systemctl enable httpd -
Verify the HTTP service status:
Run on: repo serversystemctl status httpdThe status should be Active.
-
Create a directory, copy the RPMs, and generate repository metadata:
Run on: repo servermkdir -p /var/www/html/slurm_custom cp /root/rpmbuild/RPMS/x86_64/slurm-*.rpm /var/www/html/slurm_custom/ cd /var/www/html/slurm_custom createrepo .Note
For aarch64 RPMs, create a separate directory:
Run on: repo servermkdir -p /var/www/html/slurm_custom_aarch64 cp /root/rpmbuild/RPMS/aarch64/slurm-*.rpm /var/www/html/slurm_custom_aarch64/ cd /var/www/html/slurm_custom_aarch64 createrepo .
Custom Port (Optional)¶
If you want to host the repository on a custom port instead of the default port 80:
-
Edit the Apache configuration:
Run on: repo servervi /etc/httpd/conf/httpd.confFind the
Listenparameter and update the port:File: /etc/httpd/conf/httpd.conf#Listen 12.34.56.78:80 Listen 8080 -
Restart Apache:
Run on: repo serversystemctl restart httpd systemctl status httpd
Verification¶
-
Verify the repository is accessible from the OIM:
Run on: OIM hostcurl -s http://<repo-server-ip>/slurm_custom/repodata/repomd.xml | headIf using a custom port:
Run on: OIM hostcurl -s http://<repo-server-ip>:8080/slurm_custom/repodata/repomd.xml | head
Configure in Omnia¶
After hosting the repository, add the URL to local_repo_config.yml:
user_repo_url_x86_64:
- { url: "http://<repo-server-ip>/slurm_custom/", gpgkey: "", name: "slurm_custom" }
For aarch64:
user_repo_url_aarch64:
- { url: "http://<repo-server-ip>/slurm_custom_aarch64/", gpgkey: "", name: "slurm_custom" }
Important
The repository name must be slurm_custom to match the
software_config.json entry.
Next Steps¶
- Set Up Slurm -- Deploy Slurm using the hosted RPMs