apptainer
: Manage Apptainer
apptainer::config
: Private classapptainer::install::os
: Private classapptainer::install::package
: Private classapptainer::install::source
: Private classapptainer::singularity
: Private class
apptainer::plugin
: Manage Apptainer plugin
Manage Apptainer
include ::apptainer
The following parameters are available in the apptainer
class:
install_method
install_setuid
version
manage_repo
remove_singularity
package_name
source_dependencies
manage_go
rebuild_on_go
source_base_dir
source_mconfig_path
build_flags
build_env
prefix
localstatedir
sysconfdir
source_exec_path
plugins
config_path
config_template
allow_setuid
max_loop_devices
allow_pid_ns
config_passwd
config_group
config_resolv_conf
mount_proc
mount_sys
mount_dev
mount_devpts
mount_home
mount_tmp
mount_hostfs
bind_paths
user_bind_control
enable_fusemount
enable_overlay
enable_underlay
mount_slave
sessiondir_max_size
limit_container_owners
limit_container_groups
limit_container_paths
allow_containers
allow_setuid_mount_encrypted
allow_setuid_mount_squashfs
allow_setuid_mount_extfs
allow_net_users
allow_net_groups
allow_net_networks
always_use_nv
use_nvidia_container_cli
always_use_rocm
root_default_capabilities
memory_fs_type
cni_configuration_path
cni_plugin_path
binary_path
mksquashfs_procs
mksquashfs_mem
shared_loop_devices
image_driver
download_concurrency
download_part_size
download_buffer_size
systemd_cgroups
apptheus_socket_path
allow_monitoring
namespace_users
namespace_begin_id
namespace_id_range
subid_template
Data type: Enum['package','source','os']
Sets how Apptainer will be installed,
package
will install the upstream package
source
from source
os
will install from standard OS repositories for example from EPEL on RedHat family.
Default value: 'package'
Data type: Boolean
Whether to install the setuid portion of apptainer
Default value: false
Data type: String
Version of Apptainer to install
Default value: '1.3.3'
Data type: Boolean
Enable repositories for apptainer packages, e.g. EPEL on RedHat
Default value: true
Data type: Boolean
Set whether to remove Singularity before installing Apptainer
Default value: false
Data type: String
Apptainer package name Only used when install_method=package
Default value: 'apptainer'
Data type: Array
Packages needed to build from source Only used when install_method=source
Default value: []
Data type: Boolean
Sets if golang module should be included Only used when install_method=source
Default value: true
Data type: Boolean
Sets if Apptainer should be rebuilt on updates to Go via golang module Only used when install_method=source and manage_go=true
Default value: true
Data type: Stdlib::Absolutepath
Base directory of where Apptainer source will be extracted Only used when install_method=source
Default value: '/opt'
Data type: Stdlib::Absolutepath
Path to source install mconfig script
Default value: '/usr/local/sbin/apptainer-mconfig.sh'
Data type: Hash
Build flags to pass to mconfig when building Apptainer Only used when install_method=source
Default value: {}
Data type: Hash
Environment variables to use when building from source Only used when install_method=source
Default value: {}
Data type: Stdlib::Absolutepath
The --prefix value when building from source Only used when install_method=source
Default value: '/usr'
Data type: Stdlib::Absolutepath
The --localstatedir value when building from source Only used when install_method=source
Default value: '/var'
Data type: Stdlib::Absolutepath
The --sysconfdir value when building from source Only used when install_method=source
Default value: '/etc'
Data type: String
Set PATH when building from source Only used when install_method=source
Default value: '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin'
Data type: Hash
Hash to define apptainer::plugin resources
Default value: {}
Data type: Stdlib::Absolutepath
Path to apptainer.conf
Default value: '/etc/apptainer/apptainer.conf'
Data type: String
Template used for apptainer.conf
Default value: 'apptainer/apptainer.conf.erb'
Data type: Enum['yes','no']
See apptainer.conf: allow setuid
Default value: 'yes'
Data type: Integer
See apptainer.conf: max loop devices
Default value: 256
Data type: Enum['yes','no']
See apptainer.conf: allow pid ns
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: config passwd
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: config group
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: config resolv conf
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount proc
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount sys
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount dev
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount devpts
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount home
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount tmp
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount hostfs
Default value: 'no'
Data type: Array[Stdlib::Absolutepath]
See apptainer.conf: bind paths
Default value: ['/etc/localtime', '/etc/hosts']
Data type: Enum['yes','no']
See apptainer.conf: user bind control
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: enable fusemount
Default value: 'yes'
Data type: Enum['yes','no','try','driver']
See apptainer.conf: enable overlay
Default value: 'yes'
Data type: Enum['yes','no','preferred']
See apptainer.conf: enable underlay
Default value: 'yes'
Data type: Enum['yes','no']
See apptainer.conf: mount slave
Default value: 'yes'
Data type: Integer
See apptainer.conf: sessiondir max size
Default value: 64
Data type: Optional[Array]
See apptainer.conf: limit container owners
Default value: undef
Data type: Optional[Array]
See apptainer.conf: limit container groups
Default value: undef
Data type: Optional[Array]
See apptainer.conf: limit container paths
Default value: undef
Data type: Hash[String,Enum['yes','no']]
See apptainer.conf: allow containers
Default value:
{
'sif' => 'yes',
'encrypted' => 'yes',
'squashfs' => 'yes',
'extfs' => 'yes',
'dir' => 'yes',
}
Data type: Optional[Enum['yes','no']]
See apptainer.conf allow setuid-mount encrypted
Default value: undef
Data type: Optional[Enum['yes','no','iflimited']]
See apptainer.conf allow setuid-mount squashfs
Default value: undef
Data type: Optional[Enum['yes','no']]
See apptainer.conf allow setuid-mount extfs
Default value: undef
Data type: Array
See apptainer.conf: allow net users
Default value: []
Data type: Array
See apptainer.conf: allow net groups
Default value: []
Data type: Array
See apptainer.conf: allow net networks
Default value: []
Data type: Enum['yes','no']
See apptainer.conf: always use nv
Default value: 'no'
Data type: Enum['yes','no']
See apptainer.conf: use nvidia-container-cli
Default value: 'no'
Data type: Enum['yes','no']
See apptainer.conf: always use rocm
Default value: 'no'
Data type: Enum['full','file','default','no']
See apptainer.conf: root default capabilities
Default value: 'full'
Data type: Enum['tmpfs','ramfs']
See apptainer.conf: memory fs type
Default value: 'tmpfs'
Data type: Optional[Stdlib::Absolutepath]
See apptainer.conf: cni configuration path
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
See apptainer.conf: cni plugin path
Default value: undef
Data type: Optional[String[1]]
See apptainer.conf: binary path
Default value: undef
Data type: Integer[0,default]
See apptainer.conf: mksquashfs procs
Default value: 0
Data type: Optional[String[1]]
See apptainer.conf: mksquashfs mem
Default value: undef
Data type: Enum['yes','no']
See apptainer.conf: shared loop devices
Default value: 'no'
Data type: Optional[String]
See apptainer.conf: image driver
Default value: undef
Data type: Integer[0,default]
See apptainer.conf: download concurrency
Default value: 3
Data type: Integer[0,default]
See apptainer.conf: download part size
Default value: 5242880
Data type: Integer[0,default]
See apptainer.conf: download buffer size
Default value: 32768
Data type: Enum['yes','no']
See apptainer.conf: systemd cgroups
Default value: 'yes'
Data type: Stdlib::Absolutepath
See apptainer.conf apptheus socket path
Default value: '/run/apptheus/gateway.sock'
Data type: Enum['yes','no']
See apptainer.conf allow monitoring
Default value: 'no'
Data type: Array
List of uses to add to /etc/subuid and /etc/subgid to support user namespaces
Default value: []
Data type: Integer
The beginning ID for /etc/subuid and /etc/subgid. The value is incremented For each user by start + namespace_id_range + 1
Default value: 65537
Data type: Integer
The range of UIDs/GIDs usable by a user in namespaces
Default value: 65536
Data type: String
The template to use for /etc/subuid and /etc/subgid
Default value: 'apptainer/subid.erb'
Manage Apptainer plugin
apptainer::plugin { 'github.com/apptainer/apptainer/log-plugin':
source_dir => 'examples/plugins/log-plugin',
}
The following parameters are available in the apptainer::plugin
defined type:
Data type: Optional[String]
The plugin source directory
This path must be relative to Apptainer source directory $apptainer::install::source::source_dir
Default value: undef
Data type: Enum['present', 'absent']
Whether to install (present) or uninstall (absent) the plugin
Default value: 'present'
Data type: Optional[String]
The name of the SIF image to use for install after the plugin is compiled.
The default is to use part after last /
in the plugin name so
plugin examples/plugins/log-plugin
will have SIF name of log-plugin.sif
.
Default value: undef