How To Set Up MUNGE on Linux
What is MUNGE?
MUNGE (MUNGE Uid 'N' Gid Emporium) is an authentication service used in HPC clusters. It allows nodes to securely verify each other using shared cryptographic credentials.
1. Master Node Configuration
1.1 Install MUNGE
sudo pacman -S munge
1.2 Create the MUNGE Key
The key must be identical on all nodes. Create it only on the master.
sudo mungekey
1.3 Set Permissions
Munge service will only run for munge user. Other user like root or anyone can not run munge. So, ownership is cruicial here.
sudo chown munge:munge /etc/munge/munge.key
sudo chmod 400 /etc/munge/munge.key
Time sync is mandatory. Use NTP/Chrony on the cluster otherwise MUNGE will fail.
1.4 Enable and Start MUNGE
sudo systemctl enable munge
sudo systemctl start munge
1.5 Test MUNGE (Local)
munge -n | unmunge
2. Compute Node Configuration
2.1 Copy MUNGE Key
sudo cp /etc/munge/munge.key /srv/nfsroot/etc/munge/munge.key
2.2 Test MUNGE Over SSH
munge -n | ssh node1 unmunge