Skip to content

B2-1: Add HPC environment modules (Lmod and TCL) #145

Closed

Description

@scttfrdmn

Summary

Create Lmod (.lua) and TCL environment module files for ObjectFS so that HPC sites using Environment Modules or Lmod can install ObjectFS the same way they install any other HPC software: module load objectfs.

Background

Research computing sites (NCAR, NERSC, university HPC centers) almost universally use Lmod or TCL Modules to manage software. Without a modulefile, ObjectFS requires manual PATH configuration for every user, which is a significant barrier to adoption at HPC sites.

Files to Create

configs/modules/objectfs.lua (Lmod):

-- ObjectFS: POSIX-compliant FUSE filesystem for AWS S3
-- https://github.com/scttfrdmn/objectfs

local version = myModuleVersion()
local base    = pathJoin("/usr/lib/objectfs", version)

whatis("Name:        ObjectFS")
whatis("Version:     " .. version)
whatis("Description: POSIX FUSE filesystem for AWS S3, optimized for HPC/research computing")
whatis("URL:         https://github.com/scttfrdmn/objectfs")

help([[
ObjectFS mounts AWS S3 buckets as POSIX-compliant filesystems.

  Basic usage:
    objectfs mount s3://my-bucket /mnt/data
    objectfs unmount /mnt/data

  With config file:
    objectfs mount --config /etc/objectfs/site.yaml --mount-point /mnt/data s3://my-bucket /mnt/data

  Documentation:
    https://github.com/scttfrdmn/objectfs/blob/main/docs/
]])

prepend_path("PATH", "/usr/bin")
setenv("OBJECTFS_VERSION", version)

configs/modules/objectfs.tcl (TCL Modules):

#%Module1.0
## ObjectFS modulefile

proc ModulesHelp {} {
    puts stderr "ObjectFS: POSIX FUSE filesystem for AWS S3"
    puts stderr "https://github.com/scttfrdmn/objectfs"
}

module-whatis "ObjectFS: POSIX FUSE filesystem for AWS S3 (HPC/research computing)"

set version [file tail [file dirname $ModulesCurrentModulefile]]
setenv OBJECTFS_VERSION $version
prepend-path PATH /usr/bin

Goreleaser / Package Changes

Add to .goreleaser.yaml archive and package steps:

  • Include configs/modules/objectfs.lua → usr/share/modulefiles/objectfs/{{ .Version }}/objectfs.lua in DEB/RPM
  • Include configs/modules/objectfs.tcl → usr/share/modulefiles/objectfs/{{ .Version }}/objectfs.tcl in DEB/RPM

Acceptance Criteria

  • module load objectfs && objectfs version works in CI container with Lmod installed
  • Both .lua and .tcl files included in DEB and RPM packages at correct path
  • Admin guide section documents: module use /usr/share/modulefiles && module load objectfs
  • module help objectfs shows meaningful output

Dependencies

  • Requires B1-1 (objectfs version subcommand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configeffort: mediumpriority: hightype: enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions