-
Notifications
You must be signed in to change notification settings - Fork 35
Add filesystems docs #710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add filesystems docs #710
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d5d0a71
Add filesystems docs
MoteHue 858ae01
Apply suggestions from code review
MoteHue d36f9f5
Update Ceph instructions for Manila integrations
MoteHue 0351f67
Update overview
MoteHue fa4303e
Update docs/filesystems.md
MoteHue f568327
Update image build instructions for Manila
MoteHue f118e20
Merge branch 'main' into filesystems-docs
sjpb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Overview | ||
|
||
The Slurm appliance supports multiple ways of configuring shared filesystems, including: | ||
|
||
- Configuring the control node as an NFS server. (Default) | ||
|
||
- CephFS via Manila | ||
|
||
- Lustre | ||
|
||
# Manila | ||
|
||
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: | ||
|
||
- How to create the shares in OpenStack Manila. | ||
|
||
- How to configure the Slurm Appliance to mount these Manila shares. | ||
|
||
- How to switch to a Manila share for a shared home directory. | ||
|
||
## Creating shares in OpenStack | ||
|
||
The Slurm appliance requires that the Manila shares already exist on the system. Follow the instructions below to do this. | ||
|
||
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. | ||
|
||
```bash | ||
openstack share type create cephfs-type false --extra-specs storage_protocol=CEPHFS vendor_name=Ceph | ||
``` | ||
|
||
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". | ||
|
||
```bash | ||
openstack share create CephFS 300 --description 'Scratch dir for Slurm prod' --name slurm-production-scratch --share-type cephfs-type --wait | ||
openstack share access create slurm-production-scratch cephx slurm-production | ||
``` | ||
|
||
## Configuring the Slurm Appliance for Manila | ||
|
||
To mount shares onto hosts in a group, add them to the `manila` group. | ||
|
||
```ini | ||
# environments/site/inventory/groups: | ||
[manila:children]: | ||
login | ||
compute | ||
``` | ||
|
||
If you are running a different version of Ceph from the defaults in the i[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 the following. | ||
|
||
```yaml | ||
# environments/site/inventory/group_vars/manila.yml: | ||
os_manila_mount_ceph_version: "18.2.4" | ||
MoteHue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
This will need to be included in the `builder` group to be installed in the host image. | ||
|
||
```ini | ||
# environments/site/inventory/groups: | ||
[manila:children]: | ||
login | ||
compute | ||
builder | ||
MoteHue marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
``` | ||
|
||
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. | ||
|
||
```yaml | ||
# environments/site/inventory/group_vars/manila.yml: | ||
os_manila_mount_shares: | ||
MoteHue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- share_name: "slurm-{{ appliances_environment_name }}-scratch" | ||
mount_path: /scratch | ||
``` | ||
|
||
### Shared home directory | ||
|
||
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`. | ||
|
||
Some `basic_users_homedir_*` parameters need overriding as the provided defaults are only satisfactory for the default root-squashed NFS share: | ||
|
||
```yaml | ||
# environments/site/inventory/group_vars/all/basic_users.yml: | ||
basic_users_homedir_server: "{{ groups['login'] | first }}" # if not mounting /home on control node | ||
MoteHue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
basic_users_homedir_server_path: /home | ||
``` | ||
|
||
Finally, add the home directory to the list of shares (the share should be already created in OpenStack). | ||
|
||
```yaml | ||
# environments/site/inventory/group_vars/all/manila.yml: | ||
os_manila_mount_shares: | ||
MoteHue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- share_name: "slurm-{{ appliances_environment_name }}-scratch" | ||
mount_path: /scratch | ||
- share_name: "slurm-{{ appliances_environment_name }}-home" | ||
mount_path: /home | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
environments/common/inventory/group_vars/all/os-manila-mount.yml
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.