How to deploy the workload manager¶
This how-to guide shows you how to deploy the workload manager of your Charmed HPC cluster.
Note
Slurm is currently the only supported workload manager implementation for Charmed HPC.
Prerequisites¶
To successfully deploy the workload manager of your Charmed HPC cluster, you will at least need:
A machine running a currently supported Ubuntu LTS version.
The Juju CLI client installed on your machine.
Initialize the machine cloud¶
To initialize the machine cloud that will provide the virtual machines for your cluster, bootstrap a Juju controller on your LXD instance:
juju bootstrap localhost charmed-hpc-controller
Create a model for the cluster¶
After initializing the machine cloud, create a model for your cluster:
juju add-model charmed-hpc
Now deploy the workload manager for your cluster!
Deploy the workload manager¶
Slurm can be deployed in multiple ways using Juju.
Important
The instructions below pass virt-type=virtual-machine
as a constraint to the Slurm charms
to instruct LXD to provide a virtual machine rather than a system container. Slurm does not
fully work within system containers unless some configuration modifications are applied to
the default LXD profile.
To deploy Slurm via the Juju CLI, use the following commands:
# Deploy Slurm services.
juju deploy slurmctld --constraints="virt-type=virtual-machine"
juju deploy slurmd --constraints="virt-type=virtual-machine"
juju deploy slurmdbd --constraints="virt-type=virtual-machine"
juju deploy slurmrestd --constraints="virt-type=virtual-machine"
juju deploy mysql --channel "8.0/stable"
juju deploy mysql-router slurmdbd-mysql-router --channel "dpe/beta"
# Integrate services together.
juju integrate slurmctld:slurmd slurmd:slurmctld
juju integrate slurmctld:slurmdbd slurmdbd:slurmctld
juju integrate slurmctld:slurmrestd slurmrestd:slurmctld
juju integrate slurmdbd-mysql-router:backend-database mysql:database
juju integrate slurmdbd:database slurmdbd-mysql-router:database
To deploy Slurm via the Slurm bundle published on Charmhub, use the following command:
juju deploy slurm
To deploy Slurm via a Juju bundle file, first open a file named bundle.yaml in your favorite text editor, and enter the following YAML content:
description: Deploy a ready-to-go Slurm cluster.
series: jammy
name: slurm
applications:
slurmctld:
charm: slurmctld
constraints: virt-type=virtual-machine
channel: latest/edge
num_units: 1
slurmd:
charm: slurmd
constraints: virt-type=virtual-machine
channel: latest/edge
num_units: 1
slurmdbd:
charm: slurmdbd
constraints: virt-type=virtual-machine
channel: latest/edge
num_units: 1
slurmrestd:
charm: slurmrestd
constraints: virt-type=virtual-machine
channel: latest/edge
num_units: 1
mysql:
charm: mysql
channel: 8.0/stable
num_units: 1
slurmdbd-mysql-router:
charm: mysql-router
channel: dpe/beta
relations:
- - slurmctld:slurmd
- slurmd:slurmctld
- - slurmctld:slurmdbd
- slurmdbd:slurmctld
- - slurmctld:slurmrestd
- slurmrestd:slurmctld
- - slurmdbd-mysql-router:backend-database
- mysql:database
- - slurmdbd:database
- slurmdbd-mysql-router:database
Save and close the file after entering the YAML content, and use the following command to deploy Slurm using your custom bundle.yaml file:
juju deploy ./bundle.yaml