alces-software / gridware

tool for compilation and installation of applications and libraries from the Alces Gridware software library
0 stars 0 forks source link

Userspace Gridware #16

Closed jamesremuscat closed 7 years ago

jamesremuscat commented 7 years ago

This PR adds support for userspace operations to Gridware - that is, using Gridware as a non-root user.

All Gridware operations are supported:

On login, configuration files and a user depot are created under ~/gridware. By default, packages installed to user depots take priority over system depots. This can be managed via $MODULEPATH / module use / module unuse to reorder the depots' modules directories.

Additional packages from Perl CPAN, Python PyPI etc are installed to a user's home directory, allowing cluster-wide use.

In order to deal with installation of distro package dependencies for non-root users, a new whitelisting system has been created. Administrators can edit /opt/gridware/etc/whitelist.yml, containing the following three lists:

If a user tries to install a Gridware package that has distro dependencies not meeting these criteria, then a request is created to the system administrator(s). These can be viewed with the new alces gridware requests list command, and approved or rejected with alces gridware requests install. The latter supports the --yes option to automatically approve all pending requests; otherwise the admin is prompted for each request. Approved packages are added to the whitelist so that they can be automatically installed on compute nodes when required.

If an admin has configured an email address $cw_GRIDWARE_admin_email in $cw_ROOT/etc/gridware.rc, then they receive an email notification when a new request is generated.

If a user has configured an email address :user_email in ~/gridware/etc/gridware.yml, then they receive an email notification when a request is approved.

Both of these actions can be customised by editing the distro-deps-notify and the package-install-notify scripts installed to /opt/clusterware/libexec/share. (See clusterware-services PR.)

In order to ensure that existing Gridware binary packages use the new distro dependency management system, we detect old-style dependency scripts within the packages and automatically replace them with newly-generated ones that defer to alces gridware dependencies.

Related PRs: