Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 8.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-singularity', '5.5.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-singularity
Table of Contents
Overview
This module manages the singularity installation and configuration of singularity.conf.
RedHat based systems will by default install from EPEL package
Debian based systems will by default install from source
Usage
singularity
Install and configure singularity.
include singularity
The following Hiera example of building from source (default for Debian based systems) with several additional options passed.
singularity::install_method: source
singularity::build_flags:
without-suid: true
mandir: /some/other/path
singularity::build_env:
GOPATH=/some/other/path
singularity::prefix: /opt/singularity
singularity::sysconfdir: /opt/singularity/etc
singularity::localstatedir: /opt/singularity/var
Compile and install a Singularity plugin from the Singularity source:
singularity::plugins:
github.com/sylabs/singularity/log-plugin:
source_dir: examples/plugins/log-plugin
Reference
Reference
Table of Contents
Classes
Public Classes
singularity
: Manage Singularity
Private Classes
singularity::config
: Private classsingularity::install::package
: Private classsingularity::install::source
: Private class
Defined types
singularity::plugin
: Manage Singularity plugin
Classes
singularity
Manage Singularity
Examples
include ::singularity
Parameters
The following parameters are available in the singularity
class:
install_method
package_ensure
package_name
manage_epel
version
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_net_users
allow_net_groups
allow_net_networks
always_use_nv
always_use_rocm
root_default_capabilities
memory_fs_type
cni_configuration_path
cni_plugin_path
mksquashfs_path
mksquashfs_procs
mksquashfs_mem
cryptsetup_path
shared_loop_devices
image_driver
namespace_users
namespace_begin_id
namespace_id_range
subid_template
install_method
Data type: Enum['package','source']
Sets how Singularity will be installed
Default value: 'package'
package_ensure
Data type: String
Package ensure property Only used when install_method=package
Default value: 'present'
package_name
Data type: String
Singularity package name Only used when install_method=package
Default value: 'singularity'
manage_epel
Data type: Boolean
Determines if EPEL repo should be managed Only used when install_method=package on RedHat based systems
Default value: true
version
Data type: String
Version of Singularity to install Only used when install_method=source
Default value: '3.7.4'
source_dependencies
Data type: Array
Packages needed to build from source Only used when install_method=source
Default value: []
manage_go
Data type: Boolean
Sets if golang module should be included Only used when install_method=source
Default value: true
rebuild_on_go
Data type: Boolean
Sets if Singularity should be rebuilt on updates to Go via golang module Only used when install_method=source and manage_go=true
Default value: true
source_base_dir
Data type: Stdlib::Absolutepath
Base directory of where Singularity source will be extracted Only used when install_method=source
Default value: '/opt'
source_mconfig_path
Data type: Stdlib::Absolutepath
Path to source install mconfig script
Default value: '/usr/local/sbin/singularity-mconfig.sh'
build_flags
Data type: Hash
Build flags to pass to mconfig when building Singularity Only used when install_method=source
Default value: {}
build_env
Data type: Hash
Environment variables to use when building from source Only used when install_method=source
Default value: {}
prefix
Data type: Stdlib::Absolutepath
The --prefix value when building from source Only used when install_method=source
Default value: '/usr'
localstatedir
Data type: Stdlib::Absolutepath
The --localstatedir value when building from source Only used when install_method=source
Default value: '/var'
sysconfdir
Data type: Stdlib::Absolutepath
The --sysconfdir value when building from source Only used when install_method=source
Default value: '/etc'
source_exec_path
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'
plugins
Data type: Hash
Hash to define singularity::plugin resources
Default value: {}
config_path
Data type: Stdlib::Absolutepath
Path to singularity.conf
Default value: '/etc/singularity/singularity.conf'
config_template
Data type: String
Template used for singularity.conf
Default value: 'singularity/singularity.conf.erb'
allow_setuid
Data type: Enum['yes','no']
See singularity.conf: allow setuid
Default value: 'yes'
max_loop_devices
Data type: Integer
See singularity.conf: max loop devices
Default value: 256
allow_pid_ns
Data type: Enum['yes','no']
See singularity.conf: allow pid ns
Default value: 'yes'
config_passwd
Data type: Enum['yes','no']
See singularity.conf: config passwd
Default value: 'yes'
config_group
Data type: Enum['yes','no']
See singularity.conf: config group
Default value: 'yes'
config_resolv_conf
Data type: Enum['yes','no']
See singularity.conf: config resolv conf
Default value: 'yes'
mount_proc
Data type: Enum['yes','no']
See singularity.conf: mount proc
Default value: 'yes'
mount_sys
Data type: Enum['yes','no']
See singularity.conf: mount sys
Default value: 'yes'
mount_dev
Data type: Enum['yes','no']
See singularity.conf: mount dev
Default value: 'yes'
mount_devpts
Data type: Enum['yes','no']
See singularity.conf: mount devpts
Default value: 'yes'
mount_home
Data type: Enum['yes','no']
See singularity.conf: mount home
Default value: 'yes'
mount_tmp
Data type: Enum['yes','no']
See singularity.conf: mount tmp
Default value: 'yes'
mount_hostfs
Data type: Enum['yes','no']
See singularity.conf: mount hostfs
Default value: 'no'
bind_paths
Data type: Array[Stdlib::Absolutepath]
See singularity.conf: bind paths
Default value: ['/etc/localtime', '/etc/hosts']
user_bind_control
Data type: Enum['yes','no']
See singularity.conf: user bind control
Default value: 'yes'
enable_fusemount
Data type: Enum['yes','no']
See singularity.conf: enable fusemount
Default value: 'yes'
enable_overlay
Data type: Enum['yes','no','try']
See singularity.conf: enable overlay
Default value: 'try'
enable_underlay
Data type: Enum['yes','no','try','driver']
See singularity.conf: enable underlay
Default value: 'yes'
mount_slave
Data type: Enum['yes','no']
See singularity.conf: mount slave
Default value: 'yes'
sessiondir_max_size
Data type: Integer
See singularity.conf: sessiondir max size
Default value: 16
limit_container_owners
Data type: Optional[Array]
See singularity.conf: limit container owners
Default value: undef
limit_container_groups
Data type: Optional[Array]
See singularity.conf: limit container groups
Default value: undef
limit_container_paths
Data type: Optional[Array]
See singularity.conf: limit container paths
Default value: undef
allow_containers
Data type: Hash[String,Enum['yes','no']]
See singularity.conf: allow containers
Default value: { 'squashfs' => 'yes', 'extfs' => 'yes', 'dir' => 'yes', 'encrypted' => 'yes', }
allow_net_users
Data type: Array
See singularity.conf: allow net users
Default value: []
allow_net_groups
Data type: Array
See singularity.conf: allow net groups
Default value: []
allow_net_networks
Data type: Array
See singularity.conf: allow net networks
Default value: []
always_use_nv
Data type: Enum['yes','no']
See singularity.conf: always use nv
Default value: 'no'
always_use_rocm
Data type: Enum['yes','no']
See singularity.conf: always use rocm
Default value: 'no'
root_default_capabilities
Data type: Enum['full','file','default','no']
See singularity.conf: root default capabilities
Default value: 'full'
memory_fs_type
Data type: Enum['tmpfs','ramfs']
See singularity.conf: memory fs type
Default value: 'tmpfs'
cni_configuration_path
Data type: Optional[Stdlib::Absolutepath]
See singularity.conf: cni configuration path
Default value: undef
cni_plugin_path
Data type: Optional[Stdlib::Absolutepath]
See singularity.conf: cni plugin path
Default value: undef
mksquashfs_path
Data type: Optional[Stdlib::Absolutepath]
See singularity.conf: mksquashfs path
Default value: undef
mksquashfs_procs
Data type: Integer[0,default]
See singularity.conf: mksquashfs procs
Default value: 0
mksquashfs_mem
Data type: Optional[String[1]]
See singularity.conf: mksquashfs mem
Default value: undef
cryptsetup_path
Data type: Optional[Stdlib::Absolutepath]
See singularity.conf: cryptsetup path
Default value: undef
shared_loop_devices
Data type: Enum['yes','no']
See singularity.conf: shared loop devices
Default value: 'no'
image_driver
Data type: Optional[String]
See singularity.conf: image driver
Default value: undef
namespace_users
Data type: Array
List of uses to add to /etc/subuid and /etc/subgid to support user namespaces
Default value: []
namespace_begin_id
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
namespace_id_range
Data type: Integer
The range of UIDs/GIDs usable by a user in namespaces
Default value: 65536
subid_template
Data type: String
The template to use for /etc/subuid and /etc/subgid
Default value: 'singularity/subid.erb'
Defined types
singularity::plugin
Manage Singularity plugin
Examples
install log plugin
singularity::plugin { 'github.com/sylabs/singularity/log-plugin':
source_dir => 'examples/plugins/log-plugin',
}
Parameters
The following parameters are available in the singularity::plugin
defined type:
source_dir
Data type: Optional[String]
The plugin source directory
This path must be relative to Singularity source directory $singularity::install::source::source_dir
Default value: undef
ensure
Data type: Enum['present', 'absent']
Whether to install (present) or uninstall (absent) the plugin
Default value: 'present'
sif_name
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
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v5.5.0 (2022-03-28)
Added
v5.4.1 (2021-12-17)
Fixed
v5.4.0 (2021-09-22)
Added
v5.3.1 (2021-06-30)
Fixed
v5.3.0 (2021-06-17)
Added
v5.2.1 (2021-06-17)
Fixed
v5.2.0 (2021-06-17)
Added
v5.1.0 (2021-06-14)
Added
- Improve source install method to support better upgrade/downgrade #26 (treydock)
- Support Singularity plugin compile and install #25 (treydock)
- Update module dependency ranges #24 (treydock)
v5.0.0 (2021-03-19)
Changed
Added
v4.0.0 (2020-10-28)
Changed
v3.5.0 (2019-12-18)
Added
v3.4.0 (2019-11-14)
Added
v3.3.0 (2019-10-11)
Added
v3.2.0 (2019-10-10)
Added
v3.1.0 (2019-05-09)
Added
3.0.0 (2019-03-20)
Added
- README updates and use puppet strings for docs #12 (treydock)
- BREAKING: Update singularity.conf to support Singularity 3.1.0 #11 (treydock)
2.0.1 (2018-10-16)
Fixed
2.0.0 (2018-10-15)
Added
- Add support for Puppet 6 and drop support for Puppet 4 #9 (treydock)
- Update singularity.conf to match 3.0.0 #8 (treydock)
1.2.0 (2018-09-14)
Added
1.1.0 (2018-05-01)
Added
1.0.1 (2018-05-01)
Fixed
1.0.0 (2018-03-19)
Added
- BREAKING: Drop Puppet 3 support #3 (treydock)
- BREAKING: Change default for enable_overlay to 'try' #2 (treydock)
0.1.0 (2017-10-12)
Added
0.0.2 (2017-08-15)
0.0.1 (2017-08-07)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.13.1 <9.0.0)
- puppetlabs/yumrepo_core (>= 1.0.0 <2.0.0)
- puppet/epel (>= 3.0.0 <5.0.0)
- treydock/golang (>= 1.0.0 <3.0.0)
Copyright (C) 2017 Trey Dockendorf <treydock@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.