|
| 1 | +# Overview |
| 2 | + |
| 3 | +The Slurm appliance supports multiple ways of configuring shared filesystems, including: |
| 4 | + |
| 5 | +- Configuring the control node as an NFS server. (Default) |
| 6 | + |
| 7 | +- CephFS via Manila |
| 8 | + |
| 9 | +- Lustre |
| 10 | + |
| 11 | +# Manila |
| 12 | + |
| 13 | +The Slurm appliance supports mounting shared filesystems using [CephFS](https://docs.ceph.com/en/latest/cephfs/) via [OpenStack Manila](https://docs.openstack.org/manila/latest/). This section explains: |
| 14 | + |
| 15 | +- How to create the shares in OpenStack Manila. |
| 16 | + |
| 17 | +- How to configure the Slurm Appliance to mount these Manila shares. |
| 18 | + |
| 19 | +- How to switch to a Manila share for a shared home directory. |
| 20 | + |
| 21 | +## Creating shares in OpenStack |
| 22 | + |
| 23 | +The Slurm appliance requires that the Manila shares already exist on the system. Follow the instructions below to do this. |
| 24 | + |
| 25 | +If this is the first time Manila is being used on the system, a CephFS share type will need to be created. You will need admin credentials to do this. |
| 26 | + |
| 27 | + ```bash |
| 28 | + openstack share type create cephfs-type false --extra-specs storage_protocol=CEPHFS vendor_name=Ceph |
| 29 | + ``` |
| 30 | + |
| 31 | +Once this exists, create a share using credentials for the Slurm project. An access rule also needs to be created, where the `access_to` argument (`openstack share access create <share> <access_type> <access_to>`) is a user that will be created in Ceph. This needs to be globally unique in Ceph, so needs to be different for each OpenStack project. Ideally, this share should include your environment name. In this example, the name is "production". |
| 32 | + |
| 33 | + ```bash |
| 34 | + openstack share create CephFS 300 --description 'Scratch dir for Slurm prod' --name slurm-production-scratch --share-type cephfs-type --wait |
| 35 | + openstack share access create slurm-production-scratch cephx slurm-production |
| 36 | + ``` |
| 37 | + |
| 38 | +## Configuring the Slurm Appliance for Manila |
| 39 | + |
| 40 | +To mount shares onto hosts in a group, add them to the `manila` group. |
| 41 | + |
| 42 | + ```ini |
| 43 | + # environments/site/inventory/groups: |
| 44 | + [manila:children]: |
| 45 | + login |
| 46 | + compute |
| 47 | + ``` |
| 48 | + |
| 49 | +If you are running a different version of Ceph from the defaults in the [os-manila-mount role](https://github.com/stackhpc/ansible-role-os-manila-mount/blob/master/defaults/main.yml), you will need to update the package version by setting: |
| 50 | + |
| 51 | + ```yaml |
| 52 | + # environments/site/inventory/group_vars/manila.yml: |
| 53 | + os_manila_mount_ceph_version: "18.2.4" |
| 54 | + ``` |
| 55 | +
|
| 56 | +A [site-specific image](image-build.md) should be built which includes this package; add ``manila`` to the Packer ``inventory_groups`` variable. |
| 57 | +
|
| 58 | +Define the list of shares to be mounted, and the paths to mount them to. The example below parameterises the share name using the environment name. See the [stackhpc.os-manila-mount role](https://github.com/stackhpc/ansible-role-os-manila-mount) for further configuration options. |
| 59 | +
|
| 60 | + ```yaml |
| 61 | + # environments/site/inventory/group_vars/manila.yml: |
| 62 | + os_manila_mount_shares: |
| 63 | + - share_name: "slurm-{{ appliances_environment_name }}-scratch" |
| 64 | + mount_path: /scratch |
| 65 | + ``` |
| 66 | +
|
| 67 | +### Shared home directory |
| 68 | +
|
| 69 | +By default, the Slurm appliance configures the control node as an NFS server and exports a directory which is mounted on the other cluster nodes as `/home`. When using Manila + CephFS for the home directory instead, this will need to be disabled. To do this, set the tf var `home_volume_provisioning` to `None`. |
| 70 | + |
| 71 | +Some `basic_users_homedir_*` parameters need overriding as the provided defaults are only satisfactory for the default root-squashed NFS share: |
| 72 | + |
| 73 | + ```yaml |
| 74 | + # environments/site/inventory/group_vars/all/basic_users.yml: |
| 75 | + basic_users_homedir_server: "{{ groups['login'] | first }}" # if not mounting /home on control node |
| 76 | + basic_users_homedir_server_path: /home |
| 77 | + ``` |
| 78 | + |
| 79 | +Finally, add the home directory to the list of shares (the share should be already created in OpenStack). |
| 80 | + |
| 81 | + ```yaml |
| 82 | + # environments/site/inventory/group_vars/all/manila.yml: |
| 83 | + os_manila_mount_shares: |
| 84 | + - share_name: "slurm-{{ appliances_environment_name }}-scratch" |
| 85 | + mount_path: /scratch |
| 86 | + - share_name: "slurm-{{ appliances_environment_name }}-home" |
| 87 | + mount_path: /home |
| 88 | + ``` |
0 commit comments