|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[Linux container creation on infra node]]
| |
|
| |
|
| = LXD Container Setup for Slurm Controller =
| |
|
| |
| This section covers the steps to configure LXD containers for different roles in the Slurm cluster — including the Slurm controller, LDAP server, and login node.
| |
|
| |
| All these Linux containers will be created on top of the '''infra node''', which acts as the NFS server and central point of control for the cluster.
| |
|
| |
| * Create a storage pool
| |
|
| |
| * Create and customize a profile with bridged networking and custom storage
| |
|
| |
| * Create and launch a container using the above profile
| |
|
| |
| '''Note:'''
| |
| Before performing the above step, make sure to create the '''Linux bridge''' on the '''infra node''' using '''Netplan'''.
| |
| For detailed instructions, please refer to the link below:
| |
| https://fabianlee.org/2022/09/20/kvm-creating-a-bridged-network-with-netplan-on-ubuntu-22-04/
| |
|
| |
| == 1. Create Storage Pool ==
| |
|
| |
| : First, create a storage pool to hold container data.
| |
| <pre>
| |
| $ lxc storage list
| |
| $ lxc storage create hpc-store dir
| |
| $ lxc storage list
| |
| </pre>
| |
|
| |
| : hpc-store is the name of the new storage pool using the dir backend.
| |
|
| |
| == 2. Create and Configure a Profile ==
| |
|
| |
| : Clone the default profile to a new one called hpc-profile:
| |
| <pre>
| |
| $ lxc profile list
| |
| $ lxc profile copy default hpc-profile
| |
| </pre>
| |
|
| |
| : Attach the storage pool to the new profile:
| |
| <pre>
| |
| $ lxc profile device add hpc-profile root disk path=/ pool=hpc-store
| |
| </pre>
| |
|
| |
| : Add bridged network interfaces (eno1 and eno2) to the profile:
| |
| <pre>
| |
| $ lxc profile device add hpc-profile eno1 nic nictype=bridged parent=br–eno1 name=eno1
| |
| $ lxc profile device add hpc-profile eno2 nic nictype=bridged parent=br–eno2 name=eno2 </pre>
| |
|
| |
| : Replace br–eno1 and br–eno2 with the actual Linux bridge names on your system.
| |
|
| |
| == 3. Create and Start the Container ==
| |
|
| |
| : Create a new container named slurm-login using Ubuntu 22.04 and the custom hpc-profile:
| |
| <pre>
| |
| $ lxc init -p hpc-profile ubuntu:22.04 slurm-login
| |
| </pre>
| |
|
| |
| : List and start the container:
| |
| <pre>
| |
| $ lxc list
| |
| $ lxc start slurm-login
| |
| </pre>
| |
|
| |
| == Note ==
| |
|
| |
| In the above steps, we are creating only the login node. Similarly, we need to create three other containers, each with a specific role:
| |
|
| |
| * slurm-master – for configuring the Slurm controller (master node)
| |
|
| |
| * slurm-db – for configuring the Slurm accounting database (slurmdbd)
| |
|
| |
| * slurm-ldap – for configuring the LDAP server used for user synchronization across the cluster
| |
|
| |
| All of these containers will be hosted on the infra node (which also acts as the NFS server).
| |
|
| |
| == User Access Model ==
| |
|
| |
| * All cluster users will have access only to the '''login node'''.
| |
|
| |
| * They will not have access to other nodes (e.g., slurm-master, slurm-db, or slurm-ldap).
| |
|
| |
| * Only administrators will have access to manage those service containers.
| |
|
| |
| This access model ensures that users cannot introduce misconfigurations or create package conflicts on critical nodes. It helps maintain a stable, centralized, and secure cluster environment.
| |
|
| |
| [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu HPC setup with slurm and linux containers]] > [[Linux container creation on infra node]]
| |