Sign inSign up

zhonger/minihpc

By zhonger

•Updated almost 2 years ago

MiniHPC: A simple way to deploy and manage slurm cluster

Image
Developer tools
0

349

zhonger/minihpc repository overview

MiniHPC logo

A simple way to deploy and manage slurm cluster.

MiniHPC Version GitHub License FOSSA Status

⁠Requirements

Slurm version Mariadb version Slurm-mail version Slurm-bank version Ubuntu version

⁠Architecture

Here is the architecture of MiniHPC as the following figure shows.

We include all requirements in the zhonger/minihpc⁠ docker image and other images provided by the community.

The architecture

Defaultly, the container as login node cannot be work node at the same time.

If you want them in the same physical node, two containers with different configurations will be necessary.

Then one container is login node and another one is work node.

⁠Quick start

⁠Preparing networks

MiniHPC can be used in single node or multiple nodes. It will be no additional physical requirements for networks.

If in multiple nodes or the cluster, please confirm that all nodes can be directly connected with routers or switches.

For example, the nodes can be accessed each other if they are set as the same local network, such as 192.168.121.0/24.

⁠Example for networks

If we have a single node or more, then two local networks can be used:

  • 192.168.120.0/24 for internal network (macvlan)
  • 192.168.121.0/24 for external network (bridge)

And sake is login node. db is database. slapd is LDAP. w1 and w2are work nodes.

ContainerIPPurpose
db192.168.121.101MariaDB
sake192.168.121.100Outside access and access database
sake192.168.120.100Connect other slurm nodes
slapd192.168.120.99OpenLDAP
w1192.168.120.101work node 1
w2192.168.120.102work node 2
⁠Preparing directories

The usage of MiniHPC requires a sharing filesystem if used for multiple nodes (or the cluster), such as NFS or others.

First of all, please create home directory in the sharing filesystem. Any name for home directory is ok.

And then create directories using the following commands:

mkdir data && cd data
mkdir db ldap slurm slurm-mail logs root users share share/db_init && cd ../
mkdir work && cd work
mkdir w1 w2 ... # create one directory for each node
DirectoryPurpose
data/dbdata files for mariadb
data/ldapdata files for LDAP
data/slurmdata files for slurm daemons
data/slurm-maildata files for slurm mail
data/logslog files for slurm and slurm mail
data/rootthe home directory for root user
data/usersthe home directories for slurm users
data/sharesharing configurations
work/w1the docker-compose.yml file
⁠Preparing configurations

The most important thing is to prepare the necessary configuration files for your environments as follows.

Source PathTarget PathPurpose
conf/db_init/01.sqldata/share/db_init/01.sqlthe initial sql for mariadb (no need to change)
conf/slurm.confdata/share/slurm.confslurmctld (login node) and slurmd (work node)
conf/slurmdb.confdata/share/slurmdb.confslurmdb (login node)
conf/slurm-mail.confdata/share/slurm-mail.confslurm-mail (login node)
conf/nslcd.confdata/share/nslcd.confLDAP connection for control
scripts/getPublicKeydata/share/getPublicKeyLDAP connection for readyonly
data/share/hostsdata/share/hostshostname mapping

Copy them from source code to created directories and change to your own settings.

Optional configuration files are as follows:

Source PathTarget PathPurpose
conf/80-minihpc-newsdata/share/80-minihpc-newswelcome message at login
conf/sshd_configdata/share/sshd_configSSH config
⁠Create MiniHPC

Copy the necessary sections in docker-compose.yml and change to your own settings.

⁠Example for MiniHPC

If you have two nodes, one is for login and work and another one is only for work.

  • For login and work node: db, sake, slapd and w1.

  • For only work node: w2.

Please be careful about the relative path in the volume section of docker-compose.yml.

⁠Manage accounts

The users and SSH public keys are managed by LDAP services, so additional LDPA manage softwares such as LDAPAccountManager/lam⁠, leenooks/phpLDAPadmin⁠ can be used to connect LDAP service and manage accounts in MiniHPC.

The project and resource limits is enabled in default. It can be managed by sbank command when accessing the login node with root user. Please use sbank -h for more details.

In future, a web UI will be provided for managing MiniHPC conveniently.

⁠TODO

⁠Web UI
  • create accounts
  • manage SSH public keys
  • change password
  • create project and resources
  • monitoring
  • resource usage statistics
⁠Features
  • GPU support
  • LDAP docker image

⁠Thanks

Thanks to @neilmunday⁠ and @jcftang⁠ providing good tools (slurm-mail⁠ and slurm-bank⁠) for enhancing the experience of Slurm.

Thanks to the Mariadb Community⁠ and @osxia⁠ providing good dockerlized images (mariadb⁠ and openldap⁠) for convienent usage.

⁠License

MiniHPC is released under MIT⁠ license.

FOSSA Status

Alt

Tag summary

Content type

Image

Digest

sha256:5c2890eb9…

Size

405.2 MB

Last updated

almost 2 years ago

docker pull zhonger/minihpc