Roles ported from scripts/: common, warewulf, node_image, warewulf_nodes, slurm and verify, driven by an inventory generated from the Terraform outputs. The comments explaining why came across deliberately - each records a failure that cost real time to find, and porting them without the reasoning would guarantee rediscovering all of it. Role order is not arbitrary: slurm runs before warewulf_nodes because the hpc overlay it creates has to exist before the final overlay build. Reversed, the nodes boot without slurm.conf or the MUNGE key and cannot join. node_image can copy an already-built image from another head node instead of building one, which turns twelve minutes of dnf into about two. The copy runs from the source host so the image never travels via the controller. Where a shared image store should really live is left open; nothing above the role depends on the answer. Terraform and Ansible now live on the control plane host at /var/lib/hpcod, alongside the portal, which reaches every Proxmox API and every tenant head node directly. Provisioning is a control plane component, not something an operator runs from a laptop. Ansible's scratch directory is pinned in ansible.cfg because the service account has no home. MAC namespace fixed. Tenants now use BC:24:11:E1:<tenant>:<index>. The hand-built cluster on this hypervisor already occupies BC:24:11:E0 with 00 and 0A in the next byte, so a tenant with id 10 would have emitted a duplicate MAC onto the same L2 segment and broken the running cluster. tenant_id is now bounded at 254 since it is a MAC byte and a subnet octet. The roles are written, lint-clean and syntax-checked, but have not yet been run against a real tenant.
26 lines
925 B
Django/Jinja
26 lines
925 B
Django/Jinja
#%Module1.0#####################################################################
|
|
# Default OpenHPC environment for this cluster ({{ compiler_module }} + {{ mpi_module }}).
|
|
# Managed by Ansible.
|
|
#############################################################################
|
|
|
|
proc ModulesHelp { } {
|
|
puts stderr "Setup default login environment ({{ compiler_module }} + {{ mpi_module }})"
|
|
}
|
|
|
|
prepend-path PATH /opt/ohpc/pub/bin
|
|
|
|
if { [ expr [module-info mode load] || [module-info mode display] ] } {
|
|
prepend-path MANPATH /usr/local/share/man:/usr/share/man/overrides:/usr/share/man/en:/usr/share/man
|
|
module try-add autotools
|
|
module try-add prun
|
|
module try-add {{ compiler_module }}
|
|
module try-add {{ mpi_module }}
|
|
}
|
|
|
|
if [ module-info mode remove ] {
|
|
module del {{ mpi_module }}
|
|
module del {{ compiler_module }}
|
|
module del prun
|
|
module del autotools
|
|
}
|