NearNodeFlash / NearNodeFlash.github.io

View this document https://nearnodeflash.github.io/
Apache License 2.0
3 stars 3 forks source link

containers: Global Lustre Support #84

Closed bdevcich closed 11 months ago

bdevcich commented 1 year ago

To get global lustre mounted in user containers, nnf-sos will need to add the default namespace (or whichever namespace the workflow is using) to the Lustrefilesystem resource that represents the global lustre. Then, a PVC should be created in the default namespace. This can then be added to the volumes/volumeMounts for the containers.

containers:
  ...
  volumeMounts:
    - mountPath: /lus/global
      name: blake-lustre-global
volumes:
  - name: blake-lustre-global
    persistentVolumeClaim:
      claimName: blake-lustre-global-default-readwritemany-pvc

NnfContainerProfiles will need to be updated to specify a new storage type for global lustre. Additional fields such as namespace and mode may need to be added to support this.

This can also be done manually. First, the Lustrefilesystem's spec: can be updated by adding a new entry for the default namespace. Then, by adding in the volumes and volumeMounts to the NnfContainerProfile.

bdevcich commented 11 months ago

From the Pull Request:

This adds DW_GLOBAL_* storage support to container workflows/profiles, which are backed by the LustreFilesystem resource. This allows users to mount global lustre fileystems into user containers.

An administrator must first edit the LustreFilesystem resource to add the workflow's namespace (e.g. default) to the list of namespaces along with a mode. The mode defaults to ReadWriteMany if not set. Doing so will create a PVC that can be used to mount the fileystem.

A DW_GLOBAL_* storage must also be added to the NnfContainer Profile. See config/examples and config/samples for more detail.

The value for the DW_GLOBAL_* parameter is the path of the lustre filesystem, e.g.:

#DW jobdw type=gfs2 name=my-local-storage capacity=100GB
#DW container name=my-container-workflow profile=example-mpi \
    DW_JOB_foo_local_storage=my-local-storage \
    DW_GLOBAL_foo_global_lustre=/lus/sawbill