Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 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, 2018.1.x
- Puppet >= 5.5.0 < 9.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'aursu-dockerinstall', '0.20.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-dockerinstall
Based on puppetlabs/docker - only installation and service startup for Fedora, CentOS 7 and Ubuntu 14.04
Usage in profile
Profile profile::docker
will install Docker daemon and Docker compose and start daemon. It is possible to define class { 'dockerinstall::config': ... }
in order to override predefined startup options.
class profile::docker {
class { 'dockerinstall': }
# class {'dockerinstall::config': }
class { 'dockerinstall::service': }
class { 'dockerinstall::compose': }
}
Predefined base profile dockerinstall::profile::daemon
This class is base profile which installs Docker and run daemon, installs Docker Compose. It has parameters to setup TLS socket for Docker daemon (listenning on standard port)
Dockerservice
custom type paths description
project
1) default value is project name from title_patterns
therefore this field will not be empty
2) if project
provided:
- it must be either project name or
- absolute path to the project directory (root of the project)
3) if absolute path provided
- it will be transformed to project name (base name of the path) and
- `basedir` parameter will be set to base directory (dirname) of project
path therefore
- catalog must include according `File` resource for this
dirname;
- but parameter `basedir` will have value of *specified* for this
parameter path
basedir
1) default value is either /run/compose or /var/run/compose 2) must be absolute path if provided 3) catalog must include according File resource
path
1) default to docker-compose.yml
2) if provided and it is absolute path:
- `project` parameter must not be absolute path as well
- catalog must contain File resource of directory for specified file path
3) if provided and it is relative path
- it will be transformed to <basedir>/<project>/<path>
Reference
Table of Contents
Classes
dockerinstall
: Docker installationdockerinstall::compose
: Docker Compose installationdockerinstall::config
: Docker config setup (daemon.json)dockerinstall::install
: Docker daemon installation from package repository.dockerinstall::params
: Module parametersdockerinstall::profile::daemon
: Docker configuration setup and daemon startdockerinstall::profile::decomission
: Docker daemon decomissiondockerinstall::profile::install
: Docker installationdockerinstall::profile::registry
: Docker registry installation profiledockerinstall::profile::registry::clientauth
: Base profile for Docker registry client auth setupdockerinstall::registry::auth_token
: Enable integration of Registry into GitLab authentication mechanismdockerinstall::registry::base
: Run registry containerdockerinstall::registry::gitlab
: Export GitLab certificate and tokens map for Registry authenticationdockerinstall::registry::nginx
: Registry Nginx setupdockerinstall::registry::params
: Registry parametersdockerinstall::registry::setup::token
: Registry token authentication basic setupdockerinstall::repos
: Docker repository managemenntdockerinstall::service
: Docker service managemenntdockerinstall::setup
: Docker basic setupdockerinstall::swarm::manager
: A short summary of the purpose of this classdockerinstall::swarm::worker
: A short summary of the purpose of this classdockerinstall::tls
: Protect the Docker daemon socket with TLS certificate
Defined types
dockerinstall::composeservice
: Run compose servicedockerinstall::registry::clientauth
: Setup client cert auth for registrydockerinstall::swarm::node
: A short summary of the purpose of this defined type.dockerinstall::swarm::promote
: A short summary of the purpose of this defined type.dockerinstall::webservice
: Start compose service based on auto-generated compose file
Resource types
dockerimage
: Local docker imagedockerservice
: Docker Compose service
Functions
Data types
Dockerinstall::CgroupDriver
Dockerinstall::DmFS
Dockerinstall::Ensure
Dockerinstall::Log::JSONFile
: https://docs.docker.com/config/containers/logging/json-file/Dockerinstall::LogDriver
Dockerinstall::LogLevel
Dockerinstall::Multiple
Dockerinstall::Numerical
Dockerinstall::PackageName
Dockerinstall::RLimit
Dockerinstall::Repo
Dockerinstall::RepoOS
Dockerinstall::StorageDriver
Dockerinstall::StorageOptions
Dockerinstall::UserList
Dockerinstall::Version
Classes
dockerinstall
Docker installation
Parameters
The following parameters are available in the dockerinstall
class.
package_name
Data type: Dockerinstall::PackageName
version
Data type: Dockerinstall::Version
containerd_package_name
Data type: String
containerd_version
Data type: String
manage_package
Data type: Boolean
repo
Data type: Dockerinstall::Repo
repo_location
Data type: String
repo_os
Data type: Dockerinstall::RepoOS
repo_gpgcheck
Data type: Boolean
repo_sslverify
Data type: Boolean
prerequired_packages
Data type: Array[String]
manage_os_users
Data type: Boolean
docker_users
Data type: Dockerinstall::UserList
docker_group
Data type: String
manage_service
Data type: Boolean
service_ensure
Data type: Dockerinstall::Ensure
service_name
Data type: String
service_enable
Data type: Boolean
service_hasstatus
Data type: Boolean
service_hasrestart
Data type: Boolean
service_overrides_config
Data type: Optional[String]
service_overrides_template
Data type: Optional[String]
service_config
Data type: Optional[String]
service_config_template
Data type: Optional[String]
storage_config
Data type: Optional[String]
storage_config_template
Data type: Optional[String]
root_dir
Data type: Optional[String]
tcp_bind
Data type: Optional[Dockerinstall::Multiple]
tls_enable
Data type: Boolean
tls_verify
Data type: Boolean
tls_cacert
Data type: String
tls_cert
Data type: String
tls_key
Data type: String
socket_bind
Data type: Optional[Dockerinstall::Multiple]
ip_forward
Data type: Boolean
iptables
Data type: Boolean
ip_masq
Data type: Boolean
icc
Data type: Boolean
registry_mirror
Data type: Optional[String]
fixed_cidr
Data type: Optional[String]
default_gateway
Data type: Optional[String]
bridge
Data type: Optional[String]
bip
Data type: Optional[String]
log_level
Data type: Optional[Dockerinstall::LogLevel]
log_driver
Data type: Optional[Dockerinstall::LogDriver]
log_opt
Data type: Optional[Dockerinstall::Multiple]
selinux_enabled
Data type: Boolean
socket_group
Data type: Optional[String]
dns
Data type: Optional[Dockerinstall::Multiple]
dns_search
Data type: Optional[Dockerinstall::Multiple]
mtu
Data type: Optional[Integer]
labels
Data type: Optional[Dockerinstall::Multiple]
extra_parameters
Data type: Optional[Dockerinstall::Multiple]
proxy
Data type: Optional[String]
no_proxy
Data type: Optional[String]
tmp_dir
Data type: Optional[String]
storage_driver
Data type: Optional[Dockerinstall::StorageDriver]
dm_basesize
Data type: Optional[String]
dm_fs
Data type: Optional[Dockerinstall::DmFS]
dm_mkfsarg
Data type: Optional[String]
dm_mountopt
Data type: Optional[String]
dm_blocksize
Data type: Optional[String]
dm_loopdatasize
Data type: Optional[String]
dm_loopmetadatasize
Data type: Optional[String]
dm_datadev
Data type: Optional[String]
dm_metadatadev
Data type: Optional[String]
dm_thinpooldev
Data type: Optional[String]
dm_use_deferred_removal
Data type: Boolean
dm_use_deferred_deletion
Data type: Boolean
dm_blkdiscard
Data type: Boolean
dm_override_udev_sync_check
Data type: Boolean
overlay2_override_kernel_check
Data type: Boolean
compose_version
Data type: Optional[String]
manage_docker_certdir
Data type: Boolean
manage_docker_tlsdir
Data type: Boolean
docker_dir_ensure
Data type: String
dockerinstall::compose
Docker Compose installation
Examples
include dockerinstall::compose
Parameters
The following parameters are available in the dockerinstall::compose
class.
version
Data type: Optional[String]
Default value: $dockerinstall::compose_version
download_source
Data type: String
Default value: $dockerinstall::params::compose_download_source
download_name
Data type: String
Default value: $dockerinstall::params::compose_download_name
checksum_name
Data type: String
Default value: $dockerinstall::params::compose_checksum_name
checksum_command
Data type: String
Default value: $dockerinstall::params::compose_checksum_command
tmpdir
Data type: Stdlib::Absolutepath
Default value: $dockerinstall::params::download_tmpdir
binary_path
Data type: Stdlib::Absolutepath
Default value: $dockerinstall::params::compose_binary_path
rundir
Data type: Stdlib::Absolutepath
Default value: $dockerinstall::params::compose_rundir
libdir
Data type: Stdlib::Absolutepath
Default value: $dockerinstall::params::compose_libdir
binary_ensure
Data type: String
Default value: 'file'
dockerinstall::config
Docker config setup (daemon.json)
Examples
include dockerinstall::config
Parameters
The following parameters are available in the dockerinstall::config
class.
manage_users
Data type: Boolean
Default value: $dockerinstall::manage_os_users
docker_users
Data type: Dockerinstall::UserList
Default value: $dockerinstall::docker_users
group
Data type: String
Default value: $dockerinstall::docker_group
manage_package
Data type: Boolean
Default value: $dockerinstall::manage_package
bip
Data type: Optional[Stdlib::IP::Address::V4::CIDR]
Default value: undef
mtu
Data type: Optional[Integer]
Default value: undef
storage_driver
Data type: Optional[Dockerinstall::StorageDriver]
Default value: undef
storage_opts
Data type: Optional[ Array[Dockerinstall::StorageOptions] ]
Default value: undef
cgroup_driver
Data type: Optional[Dockerinstall::CgroupDriver]
Default value: undef
log_driver
Data type: Optional[Dockerinstall::LogDriver]
Default value: undef
log_opts
Data type: Optional[Dockerinstall::Log::JSONFile]
Default value: undef
user_ensure
Data type: String
Default value: 'present'
group_ensure
Data type: String
Default value: 'present'
config_ensure
Data type: String
Default value: 'file'
dockerinstall::install
Docker daemon installation from package repository.
Examples
include dockerinstall::install
Parameters
The following parameters are available in the dockerinstall::install
class.
package_name
Data type: Dockerinstall::PackageName
Default value: $dockerinstall::package_name
version
Data type: Dockerinstall::Version
Default value: $dockerinstall::version
manage_package
Data type: Boolean
Default value: $dockerinstall::manage_package
prerequired_packages
Data type: Array[String]
Default value: $dockerinstall::prerequired_packages
containerd_package_name
Data type: String
Default value: $dockerinstall::containerd_package_name
containerd_version
Data type: String
Default value: $dockerinstall::containerd_version
dockerinstall::params
Module parameters
Examples
include dockerinstall::params
dockerinstall::profile::daemon
Docker configuration setup and daemon start
Examples
include dockerinstall::profile::daemon
Parameters
The following parameters are available in the dockerinstall::profile::daemon
class.
network_bridge_ip
Data type: Optional[String]
Default value: undef
mtu
Data type: Optional[Integer]
Default value: undef
storage_driver
Data type: Optional[String]
Default value: undef
storage_opts
Data type: Optional[Array[String]]
Default value: undef
cgroup_driver
Data type: Optional[String]
Default value: undef
log_driver
Data type: Optional[String]
Default value: undef
log_opts
Data type: Optional[Hash]
Default value: undef
docker0_bind
Data type: Boolean
Default value: false
tls_enable
Data type: Boolean
Default value: false
docker_tlsdir
Data type: Stdlib::Unixpath
Default value: $dockerinstall::params::docker_tlsdir
dockerinstall::profile::decomission
Docker daemon decomission
Examples
include dockerinstall::profile::decomission
dockerinstall::profile::install
Docker installation (installation only)
Examples
include dockerinstall::profile::install
Parameters
The following parameters are available in the dockerinstall::profile::install
class.
dockerd_version
Data type: Optional[String]
Default value: undef
containerd_version
Data type: Optional[String]
Default value: undef
docker_tlsdir
Data type: Stdlib::Unixpath
Default value: $dockerinstall::params::docker_tlsdir
dockerinstall::profile::registry
Docker registry installation profile
Examples
include dockerinstall::registry
Parameters
The following parameters are available in the dockerinstall::profile::registry
class.
server_name
Data type: String
cert_identity
Data type: Optional[String]
Default value: $server_name
ssl_client_ca_auth
Data type: Boolean
Default value: true
ssl_client_ca_certs
Data type: Optional[Array[Stdlib::Fqdn]]
Default value: undef
manage_cert_data
Data type: Boolean
Default value: true
ssl_cert
Data type: Optional[String]
Default value: undef
ssl_key
Data type: Optional[String]
Default value: undef
manage_nginx_core
Data type: Boolean
Default value: true
manage_web_user
Data type: Boolean
Default value: true
global_ssl_redirect
Data type: Boolean
Default value: true
dockerinstall::profile::registry::clientauth
Base profile for Docker registry client auth setup
Examples
include dockerinstall::profile::registry::clientauth
Parameters
The following parameters are available in the dockerinstall::profile::registry::clientauth
class.
registry
Data type: Optional[Array[Stdlib::Fqdn]]
Default value: undef
dockerinstall::registry::auth_token
Enable integration of Registry into GitLab authentication see https://docs.gitlab.com/ee/administration/packages/container_registry.html#enable-the-container-registry
Examples
include dockerinstall::registry::auth_token
Parameters
The following parameters are available in the dockerinstall::registry::auth_token
class.
enable
Data type: Boolean
Whether to enable token authentication or not
Default value: false
gitlab
Data type: Boolean
Whether to enable GitLab as token provider or not
Default value: false
realm_host
Data type: Optional[Stdlib::Fqdn]
If GitLab is in use as token provider than GitLab host must be provided
Default value: undef
realm
Data type: Optional[Stdlib::HTTPUrl]
The realm in which the registry server authenticates eg https://gitlab.domain.tld/jwt/auth
Default value: undef
realm_certificate
Data type: Optional[String]
Contents of the certificate that Realm (eg GitLab) uses to sign the tokens.
Default value: undef
rootcertbundle
The absolute path to the root certificate bundle. This bundle contains the public part of the certificates used to sign authentication tokens.
service
Data type: String
The service being authenticated.
Default value: $dockerinstall::registry::params::auth_token_service
issuer
Data type: String
The name of the token issuer. The issuer inserts this into the token so it must match the value configured for the issuer.
Default value: $dockerinstall::registry::params::auth_token_issuer
registry_cert_export
Data type: Boolean
Whether to import token certificate from PuppetDB or not. If set to false
than token certificate should be provide either via realm_certificate
or
it must be set via classes gitlabinstall::gitlab
or
dockerinstall::registry::gitlab
Default value: true
token_map_export
Data type: Boolean
Default value: true
dockerinstall::registry::base
Run registry container
Examples
include dockerinstall::registry::base
Parameters
The following parameters are available in the dockerinstall::registry::base
class.
docker_image
Data type: String
Default value: 'registry:2.7.1'
data_directory
Data type: Stdlib::Unixpath
Default value: $dockerinstall::registry::params::data_directory
dockerinstall::registry::gitlab
Export GitLab certificate and tokens map for Registry authentication
Examples
include dockerinstall::registry::gitlab
Parameters
The following parameters are available in the dockerinstall::registry::gitlab
class.
registry_cert_export
Data type: Boolean
Whether to write certificate content into local file system or export it to Puppet DB
Default value: true
registry_internal_certificate
Data type: Optional[String]
Contents of the certificate that GitLab uses to sign the tokens. This
parameter allows to setup custom certificate into file system path
(registry_cert_path
) or export to Puppet DB.
Default value: undef
registry_cert_path
This is the path where registry_internal_certificate
contents will be
written to disk.
default certificate location is /etc/docker/registry/tokenbundle.pem
token_map_export
Data type: Boolean
Whether to export Nginx tokens map into PuppetDB or not
Default value: true
token_map_setup
Data type: Boolean
Whether to setup Nginx tokens map locally or not (mutually exclusive with
token_map_export
with lower priority)
Default value: true
nginx_tokens_map
Data type: Stdlib::Unixpath
Path to Nginx config which represents map of tokenns to project. This config file
is used in include
directive for map $uri $gitlab_token {} configuration
directive. See http://nginx.org/en/docs/http/ngx_http_map_module.html#map
Default is /etc/nginx/conf.d/mapping/gitlab-auth-token.conf
Default value: $dockerinstall::registry::params::nginx_tokens_map
gitlab_host
Data type: Optional[Stdlib::Fqdn]
Default value: $dockerinstall::params::certname
dockerinstall::registry::nginx
Registry Nginx setup
Examples
include dockerinstall::registry::nginx
Parameters
The following parameters are available in the dockerinstall::registry::nginx
class.
server_name
Data type: String
ssl
Data type: Boolean
Default value: false
ssl_cert
Data type: Optional[String]
Default value: undef
ssl_key
Data type: Optional[String]
Default value: undef
ssl_client_ca_auth
Data type: Boolean
Default value: false
manage_nginx_core
Data type: Boolean
Default value: true
manage_web_user
Data type: Boolean
Default value: true
manage_document_root
Data type: Boolean
Default value: true
global_ssl_redirect
Data type: Boolean
Default value: true
nginx_tokens_map
Data type: Stdlib::Unixpath
Default value: $dockerinstall::registry::params::nginx_tokens_map
dockerinstall::registry::params
Registry parameters
Examples
include dockerinstall::registry::params
dockerinstall::registry::setup::token
Registry token authentication basic setup
Examples
include dockerinstall::registry::setup::token
dockerinstall::repos
Docker repository managemennt
Examples
include dockerinstall::repos
Parameters
The following parameters are available in the dockerinstall::repos
class.
manage_package
Data type: Boolean
Default value: $dockerinstall::manage_package
repo
Data type: Dockerinstall::Repo
Default value: $dockerinstall::repo
location
Data type: String
Default value: $dockerinstall::repo_location
os
Data type: Dockerinstall::RepoOS
Default value: $dockerinstall::repo_os
gpgcheck
Data type: Boolean
Default value: $dockerinstall::repo_gpgcheck
sslverify
Data type: Boolean
Default value: $dockerinstall::repo_sslverify
basearch
Data type: String
Default value: $::architecture
repo_ensure
Data type: Enum['present', 'absent']
Default value: 'present'
dockerinstall::service
Docker service managemennt
Examples
include dockerinstall::service
Parameters
The following parameters are available in the dockerinstall::service
class.
service_config
Data type: Optional[String]
Docker service environment config (eg /etc/sysconfig/docker on Red Hat based) set OPTIONS environment variable
Default value: $dockerinstall::service_config
storage_config
Data type: Optional[String]
Docker service environment config for storage driver options set DOCKER_STORAGE_OPTIONS environment variable
Default value: $dockerinstall::storage_config
service_ensure
Data type: Dockerinstall::Ensure
Default value: $dockerinstall::service_ensure
manage_service
Data type: Boolean
Default value: $dockerinstall::manage_service
service_name
Data type: String
Default value: $dockerinstall::service_name
service_enable
Data type: Boolean
Default value: $dockerinstall::service_enable
service_hasstatus
Data type: Boolean
Default value: $dockerinstall::service_hasstatus
service_hasrestart
Data type: Boolean
Default value: $dockerinstall::service_hasrestart
service_config_template
Data type: Optional[String]
Default value: $dockerinstall::service_config_template
service_overrides_config
Data type: Optional[String]
Default value: $dockerinstall::service_overrides_config
service_overrides_template
Data type: Optional[String]
Default value: $dockerinstall::service_overrides_template
storage_config_template
Data type: Optional[String]
Default value: $dockerinstall::storage_config_template
root_dir
Data type: Optional[String]
Default value: $dockerinstall::root_dir
tcp_bind
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::tcp_bind
tls_enable
Data type: Boolean
Default value: $dockerinstall::tls_enable
tls_verify
Data type: Boolean
Default value: $dockerinstall::tls_verify
tls_cacert
Data type: String
Default value: $dockerinstall::tls_cacert
tls_cert
Data type: String
Default value: $dockerinstall::tls_cert
tls_key
Data type: String
Default value: $dockerinstall::tls_key
socket_bind
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::socket_bind
ip_forward
Data type: Boolean
Default value: $dockerinstall::ip_forward
iptables
Data type: Boolean
Default value: $dockerinstall::iptables
ip_masq
Data type: Boolean
Default value: $dockerinstall::ip_masq
icc
Data type: Boolean
Default value: $dockerinstall::icc
registry_mirror
Data type: Optional[String]
Default value: $dockerinstall::registry_mirror
fixed_cidr
Data type: Optional[String]
Default value: $dockerinstall::fixed_cidr
default_gateway
Data type: Optional[String]
Default value: $dockerinstall::default_gateway
bridge
Data type: Optional[String]
Default value: $dockerinstall::bridge
bip
Data type: Optional[String]
Default value: $dockerinstall::bip
log_level
Data type: Optional[Dockerinstall::LogLevel]
Default value: $dockerinstall::log_level
log_driver
Data type: Optional[Dockerinstall::LogDriver]
Default value: $dockerinstall::log_driver
log_opt
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::log_opt
selinux_enabled
Data type: Boolean
Default value: $dockerinstall::selinux_enabled
socket_group
Data type: Optional[String]
Default value: $dockerinstall::socket_group
dns
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::dns
dns_search
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::dns_search
mtu
Data type: Optional[Integer]
Default value: $dockerinstall::mtu
labels
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::labels
extra_parameters
Data type: Optional[Dockerinstall::Multiple]
Default value: $dockerinstall::extra_parameters
proxy
Data type: Optional[String]
Default value: $dockerinstall::proxy
no_proxy
Data type: Optional[String]
Default value: $dockerinstall::no_proxy
tmp_dir
Data type: Optional[String]
Default value: $dockerinstall::tmp_dir
storage_driver
Data type: Optional[Dockerinstall::StorageDriver]
Default value: $dockerinstall::storage_driver
dm_basesize
Data type: Optional[String]
Default value: $dockerinstall::dm_basesize
dm_fs
Data type: Optional[Dockerinstall::DmFS]
Default value: $dockerinstall::dm_fs
dm_mkfsarg
Data type: Optional[String]
Default value: $dockerinstall::dm_mkfsarg
dm_mountopt
Data type: Optional[String]
Default value: $dockerinstall::dm_mountopt
dm_blocksize
Data type: Optional[String]
Default value: $dockerinstall::dm_blocksize
dm_loopdatasize
Data type: Optional[String]
Default value: $dockerinstall::dm_loopdatasize
dm_loopmetadatasize
Data type: Optional[String]
Default value: $dockerinstall::dm_loopmetadatasize
dm_datadev
Data type: Optional[String]
Default value: $dockerinstall::dm_datadev
dm_metadatadev
Data type: Optional[String]
Default value: $dockerinstall::dm_metadatadev
dm_thinpooldev
Data type: Optional[String]
Default value: $dockerinstall::dm_thinpooldev
dm_use_deferred_removal
Data type: Boolean
Default value: $dockerinstall::dm_use_deferred_removal
dm_use_deferred_deletion
Data type: Boolean
Default value: $dockerinstall::dm_use_deferred_deletion
dm_blkdiscard
Data type: Boolean
Default value: $dockerinstall::dm_blkdiscard
dm_override_udev_sync_check
Data type: Boolean
Default value: $dockerinstall::dm_override_udev_sync_check
overlay2_override_kernel_check
Data type: Boolean
Default value: $dockerinstall::overlay2_override_kernel_check
manage_users
Data type: Boolean
Default value: $dockerinstall::manage_os_users
manage_package
Data type: Boolean
Default value: $dockerinstall::manage_package
service_config_ensure
Data type: String
Default value: 'file'
dockerinstall::setup
Docker basic setup
Examples
include dockerinstall::setup
Parameters
The following parameters are available in the dockerinstall::setup
class.
manage_docker_certdir
Data type: Boolean
Default value: $dockerinstall::manage_docker_certdir
manage_docker_tlsdir
Data type: Boolean
Default value: $dockerinstall::manage_docker_tlsdir
docker_tlsdir
Data type: Stdlib::Unixpath
Default value: $dockerinstall::params::docker_tlsdir
docker_dir_ensure
Data type: String
Default value: $dockerinstall::docker_dir_ensure
dockerinstall::swarm::manager
A description of what this class does
Examples
include dockerinstall::swarm::manager
Parameters
The following parameters are available in the dockerinstall::swarm::manager
class.
enable
Data type: Boolean
Default value: true
advertise_addr
Data type: Optional[Stdlib::IP::Address]
Default value: undef
manager_node
Data type: Optional[ Variant[ Stdlib::Fqdn, Stdlib::IP::Address ] ]
Default value: undef
dockerinstall::swarm::worker
A description of what this class does
Examples
include dockerinstall::swarm::worker
Parameters
The following parameters are available in the dockerinstall::swarm::worker
class.
enable
Data type: Boolean
Default value: true
manager_node
Data type: Optional[ Variant[ Stdlib::Fqdn, Stdlib::IP::Address ] ]
Default value: undef
dockerinstall::tls
Protect the Docker daemon socket with TLS certificate
Examples
include dockerinstall::tls
Parameters
The following parameters are available in the dockerinstall::tls
class.
docker_tlsdir
Data type: Stdlib::Unixpath
Default value: $dockerinstall::params::docker_tlsdir
Defined types
dockerinstall::composeservice
Run compose service
Examples
dockerinstall::composeservice { 'namevar': }
Parameters
The following parameters are available in the dockerinstall::composeservice
defined type.
configuration
Data type: String
ensure
Data type: Variant[ Enum['stopped', 'running'], Boolean ]
Default value: 'running'
project_name
Data type: Optional[String]
Default value: undef
project_directory
Data type: Optional[Stdlib::Unixpath]
Default value: undef
project_basedir
Data type: Optional[Stdlib::Unixpath]
Default value: undef
configuration_path
Data type: Optional[Stdlib::Unixpath]
Default value: undef
build_image
Data type: Boolean
Default value: false
dockerinstall::registry::clientauth
Setup client cert auth for registry usung Puppet CA certificates
Examples
dockerinstall::registry::clientauth { 'namevar': }
Parameters
The following parameters are available in the dockerinstall::registry::clientauth
defined type.
server_name
Data type: Stdlib::Fqdn
Default value: $name
server_port
Data type: Optional[Stdlib::Port]
Default value: undef
dockerinstall::swarm::node
A description of what this defined type does
Examples
dockerinstall::swarm::node { 'worker/sman1.domain.com': }
dockerinstall::swarm::node { 'manager/sman2.domain.com': }
Parameters
The following parameters are available in the dockerinstall::swarm::node
defined type.
join_token
Data type: String
manager_node_ip
Data type: Optional[Stdlib::IP::Address]
Default value: undef
dockerinstall::swarm::promote
A description of what this defined type does
Examples
dockerinstall::swarm::promote { 'namevar': }
Parameters
The following parameters are available in the dockerinstall::swarm::promote
defined type.
nodeid
Data type: String
Default value: $name
dockerinstall::webservice
Start compose service based on auto-generated compose file
Examples
dockerinstall::webservice { 'app': }
Parameters
The following parameters are available in the dockerinstall::webservice
defined type.
docker_image
Data type: String
Specify the image to start the container from. see: https://docs.docker.com/compose/compose-file/#image
build_image
Data type: Boolean
Whether to build docker image using docker-compose command
Default value: false
manage_image
Data type: Boolean
Whether to manage image with docker command or not
if set to true - will define custom resource Dockerimage for image specified
with parameter docker_image
Default value: false
project_name
Data type: String
Specify an alternate project name (default: directory name) see: https://docs.docker.com/compose/reference/overview/#use--p-to-specify-a-project-name
Default value: $name
service_name
Data type: Optional[String]
Service name inside docker compose file see: https://docs.docker.com/compose/compose-file/#service-configuration-reference
Default value: undef
env_name
Data type: Optional[String]
Development environment for which service is running (eg prod, stage, test, qa etc) It is mandatory for secrets setup into file secrets/<env_name>.env Also it could be used for service definition as <project_name>-<env_name>
Default value: undef
secrets
Data type: Optional[Hash[String, String]]
Hash of environment variables to setup into environment file secrets/<env_name>.env see: https://docs.docker.com/compose/compose-file/#env_file
Default value: undef
environment
Data type: Optional[Hash[String, String]]
Add environment variables. You can use either an array or a dictionary see: https://docs.docker.com/compose/compose-file/#environment
Default value: undef
compose_file_version
Data type: String
Compose file versions see: https://docs.docker.com/compose/compose-file/#compose-and-docker-compatibility-matrix
Default value: '3.8'
restart
Data type: Enum[ 'no', 'always', 'on-failure', 'unless-stopped' ]
Restart policy to use for service see: https://docs.docker.com/compose/compose-file/#restart
Default value: 'always'
expose_ports
Data type: Optional[Array[String]]
Expose ports in short syntax see: https://docs.docker.com/compose/compose-file/#ports
Default value: undef
docker_volume
Data type: Optional[Array[String]]
Mount host paths or named volumes, specified as sub-options to a service. Short syntax is supported see: https://docs.docker.com/compose/compose-file/#volumes
Default value: undef
docker_extra_hosts
Data type: Optional[Array[String]]
Add hostname mappings. Use the same values as the docker client --add-host parameter. see: https://docs.docker.com/compose/compose-file/#extra_hosts
Default value: undef
project_volumes
Data type: Optional[Array[String]]
volumes
section allows you to create named volumes that can be reused
across multiple services
see: https://docs.docker.com/compose/compose-file/#volume-configuration-reference
Default value: undef
docker_mtu
Data type: Optional[Integer]
Set the containers network MTU to specified value (for network default
)
see: https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options
Default value: undef
docker_ulimits
Data type: Optional[ Hash[ String, Variant[ Dockerinstall::RLimit, Array[Dockerinstall::RLimit, 2] ] ] ]
Override the default ulimits for a container. see: https://docs.docker.com/compose/compose-file/#ulimits
Default value: undef
docker_dns
Data type: Optional[ Array[ Variant[ Stdlib::IP::Address, Stdlib::Fqdn ] ] ]
Custom DNS servers. see: https://docs.docker.com/compose/compose-file/#dns
Default value: undef
docker_build
Data type: Boolean
Enable configuration options that are applied at build time. see: https://docs.docker.com/compose/compose-file/#build
Default value: false
docker_context
Data type: String
Either a path to a directory containing a Dockerfile, or a url to a git repository. see: https://docs.docker.com/compose/compose-file/#context
Default value: '.'
docker_file
Data type: String
Alternate Dockerfile. see: https://docs.docker.com/compose/compose-file/#dockerfile
Default value: 'Dockerfile'
docker_build_args
Data type: Optional[ Variant[ Hash[String, String], Array[String] ] ]
Add build arguments, which are environment variables accessible only during the build process. see: https://docs.docker.com/compose/compose-file/#args
Default value: undef
docker_command
Data type: Optional[ Variant[ String, Array[String] ] ]
Override the default command. see: https://docs.docker.com/compose/compose-file/#command
Default value: undef
privileged
Data type: Boolean
Give extended privileges to this container. A "privileged" container is given access to all devices see: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
Default value: false
decomission
Data type: Boolean
Compose service decomission (stop and removal)
Default value: false
Resource types
dockerimage
Local docker image
Properties
The following properties are available in the dockerimage
type.
ensure
Valid values: present
, absent
Create or remove the image.
Default value: present
Parameters
The following parameters are available in the dockerimage
type.
domain
Domain is registry host:port. port is optional
id
ID is image id
name
namevar
Resource name
path
Path is username/repository part of image name
provider
The specific backend to use for this dockerimage
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
tag
Tag is the mechanism that registries use to give Docker images a version
dockerservice
Docker Compose service
Properties
The following properties are available in the dockerservice
type.
configuration
Docker Compose configuration file content (YAML)
ensure
Valid values: stopped
, running
, false
, true
Aliases: "false"=>"stopped", "true"=>"running"
Whether a service should be running.
Parameters
The following parameters are available in the dockerservice
type.
basedir
The directory where to store Docker Compose projects (it could be runtime or temporary directory). By default /var/run/compose
build
Valid values: true
, false
, yes
, no
Specify whether to build Docker image
Default value: false
name
namevar
Docker compose service name
path
Path to Docker Compose configuration file. Path should be absolute or relative to Project directory
Default value: docker-compose.yml
project
Docker Compose project name. It could be absolute path to a project directory or just alternate project name
provider
The specific backend to use for this dockerservice
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
replace
Valid values: true
, false
, yes
, no
Whether to replace a configuration file or not
Default value: true
restart
Specify a restart command manually.
start
Specify a start command manually.
status
Specify a status command manually. This command must return 0 if the service is running and a nonzero value otherwise.
stop
Specify a stop command manually.
Functions
dockerinstall::cidr_network
Type: Ruby 4.x API
The dockerinstall::cidr_network function.
dockerinstall::cidr_network(Stdlib::IP::Address $cidr)
The dockerinstall::cidr_network function.
Returns: Any
cidr
Data type: Stdlib::IP::Address
dockerinstall::option
Type: Puppet Language
The dockerinstall::option function.
dockerinstall::option(String $name, Data $value)
The dockerinstall::option function.
Returns: Hash
name
Data type: String
value
Data type: Data
Data types
Dockerinstall::CgroupDriver
The Dockerinstall::CgroupDriver data type.
Alias of Enum['cgroupfs', 'systemd']
Dockerinstall::DmFS
The Dockerinstall::DmFS data type.
Alias of Enum['ext4', 'xfs']
Dockerinstall::Ensure
The Dockerinstall::Ensure data type.
Alias of Enum['stopped', 'running']
Dockerinstall::Log::JSONFile
https://docs.docker.com/config/containers/logging/json-file/
Alias of Struct[{ Optional['max-size'] => Variant[Pattern[/^[0-9]+[gmk]?$/], Enum['-1']], Optional['max-file'] => Variant[Pattern[/^[0-9]+$/]], Optional['labels'] => String, Optional['env'] => String, Optional['env-regex'] => String, Optional['compress'] => Enum['true', 'false'], Optional['mode'] => Enum['blocking', 'non-blocking'], Optional['max-buffer-size'] => Pattern[/^[0-9]+[gmk]?$/], }]
Dockerinstall::LogDriver
The Dockerinstall::LogDriver data type.
Alias of Enum['json-file', 'syslog', 'journald', 'gelf', 'fluentd', 'awslogs', 'splunk', 'etwlogs', 'gcplogs', 'none']
Dockerinstall::LogLevel
The Dockerinstall::LogLevel data type.
Alias of Enum['debug', 'info', 'warn', 'error', 'fatal']
Dockerinstall::Multiple
The Dockerinstall::Multiple data type.
Alias of Variant[String, Array[String]]
Dockerinstall::Numerical
The Dockerinstall::Numerical data type.
Alias of Variant[Integer, Pattern[/^[0-9]+$/, /^-[0-9]+$/]]
Dockerinstall::PackageName
The Dockerinstall::PackageName data type.
Alias of Enum['docker', 'docker-ce', 'docker-ee']
Dockerinstall::RLimit
The Dockerinstall::RLimit data type.
Alias of Variant[Dockerinstall::Numerical, Enum['unlimited', 'infinity']]
Dockerinstall::Repo
The Dockerinstall::Repo data type.
Alias of Enum['stable', 'test', 'edge', 'nightly']
Dockerinstall::RepoOS
The Dockerinstall::RepoOS data type.
Alias of Enum['centos', 'debian', 'fedora', 'ubuntu']
Dockerinstall::StorageDriver
The Dockerinstall::StorageDriver data type.
Alias of Enum['aufs', 'devicemapper', 'btrfs', 'zfs', 'overlay', 'overlay2']
Dockerinstall::StorageOptions
The Dockerinstall::StorageOptions data type.
Alias of Variant[Pattern[/^dm\./], Pattern[/^zfs\.fsname=/], Pattern[/^btrfs\.min_space=/], Pattern[/^overlay2\.(override_kernel_check|size)=/]]
Dockerinstall::UserList
The Dockerinstall::UserList data type.
Alias of Variant[String, Array[String, 1]]
Dockerinstall::Version
The Dockerinstall::Version data type.
Alias of Variant[Enum['present', 'installed', 'absent'], Pattern[ /^17\.1[0-2]\./, /^17\.0[3-9]\./, /^18\.0[1-9]\./, /^(5:)?19\.03\./, /^20\.10\./, ]]
Changelog
All notable changes to this project will be documented in this file.
Release 0.1.0
Features
Bugfixes
Known Issues
Release 0.6.1
Features
Bugfixes
- Added token certificate directory into Puppet management
Known Issues
Release 0.6.2
Features
Bugfixes
- Hardcoded certificate path
- Bind certificate directory into registry container
Known Issues
Release 0.6.3
Features
Bugfixes
- Bind certificate into registry container instead certificate directory
Known Issues
Release 0.6.4
Features
Bugfixes
- Added ability to not import token certificate from PuppetDB (eg when registry and GitLab reside on the same server)
Known Issues
Release 0.7.0
Features
- Added ability to build docker image before service run (for dockerservice)
Bugfixes
Known Issues
Release 0.7.1
Features
- Added docker compose parameters privileged and command
- Added template for tokens' map
Bugfixes
Known Issues
Release 0.8.0
Features
- Added authorization settings into Nginx
Bugfixes
Known Issues
Release 0.8.1
Features
- Added ability to pass build image flag from webservice
Bugfixes
Known Issues
Release 0.8.2
Features
Bugfixes
- Removed coontext and docker file existing check
- bugfix: Docker Compose does not support tarball contexts
Known Issues
Release 0.8.3
Features
Bugfixes
- Bugfix: directory /etc/docker/registry should be defined in case of registry token authentication
Known Issues
Release 0.9.0
Features
- Added Docker decomission profile
Bugfixes
Known Issues
Release 0.9.1
Features
- Added Docker 20.10 support
- Added CentOS 8 support
Bugfixes
Known Issues
Release 0.9.2
Features
Bugfixes
- Added Docker daemon restart during Docker upgrade
Known Issues
Release 0.9.3
Features
Bugfixes
- Updated dependencies
Known Issues
Release 0.9.4
Features
Bugfixes
- Adjusted module settings and dependencies
Known Issues
Release 0.9.5
Features
Bugfixes
- Added missed dependency class into dockerinstall::registry::clientauth
Known Issues
Release 0.10.0
Features
- Added containment for several calsses and resources
Bugfixes
Known Issues
Release 0.10.1
Features
Bugfixes
- Added additional dependencies during decomission
Known Issues
Release 0.10.2
Features
- Default docker compose version set to 1.29.2
Bugfixes
Known Issues
Release 0.10.3
Features
- PDK upgrade to version 2.3.0
Bugfixes
Known Issues
Release 0.11.0
Features
- Added option selinux-enabled in daemon.json
- Default Docker Compose version set to 2.2.2
Bugfixes
Known Issues
Release 0.12.0
Features
- Added ability to install Docker Compose CLI plugin fro Compose v2+
Bugfixes
- Fixed Docker Compose v2+ installation
- Fixed Dockerservice provider to support Docker Compose v2+
Known Issues
Release 0.12.1
Features
Bugfixes
- Fixed dockerservice provider for never version docker compose container name and project separator now is "-" instead "_"
Known Issues
Release 0.13.0
Features
- Updated fixtures and module meta
Bugfixes
- Removed dependency on systemd::systemctl::daemon_reload
Known Issues
Release 0.13.1
Features
- Added repository metadata update commands
Bugfixes
Known Issues
Release 0.13.2
Features
- Updated composer
Bugfixes
- Fixed athentication issue
Known Issues
Release 0.13.3
Features
Bugfixes
- Updated version to cover Ubuntu versions
Known Issues
Release 0.13.5
Features
- Added flag to allow users access to Docker TLS assets
- Added this flag into
install
anddaemon
pofiles
Bugfixes
Known Issues
Release 0.13.6
Features
- Docker registry default version 2.8.1
Bugfixes
Known Issues
Release 0.14.1
Features
- PDK version 3.0.0
Bugfixes
- Fixed PDK warnings
Known Issues
Release 0.15.0
Features
Bugfixes
- Fixed error with container status for docker compose 2.14.1+
Known Issues
Release 0.16.1
Features
- Setup
aursu/nginx
as a dependency
Bugfixes
- Added support for Ubuntu Focal package version
Known Issues
Release 0.17.0
Features
- Setup
aursu/lsys_nginx
as a dependency
Bugfixes
Known Issues
Release 0.17.1
Features
- Added docker version 25.x
Bugfixes
Known Issues
Release 0.18.0
Features
- Added docker version 26.x
Bugfixes
Known Issues
Release 0.19.2
Features
- Added Windows support for private Registries auth
Bugfixes
- Fixed paths to Windows keys
Known Issues
Release 0.20.0
Features
- Added Windows support for private Registries auth (inside user home directory)
- PDK upgrade to 3.2.0
Bugfixes
Known Issues
Dependencies
- aursu/bsys (>= 0.4.0 < 1.0.0)
- aursu/lsys_nginx (>= 0.47.0 < 1.0.0)
- aursu/puppet (>= 0.7.1 < 1.0.0)
- aursu/tlsinfo (>= 0.5.0 < 1.0.0)
- aursu/nginx (>= 4.0.0 < 5.0.0)
- puppet/selinux (>= 3.0.0 < 5.0.0)
- puppetlabs/apt (>= 7.2.0 < 10.0.0)
- puppetlabs/puppet_agent (>= 1.6.1 < 5.0.0)
- puppetlabs/stdlib (>= 4.13.0 < 10.0.0)
- puppet/systemd (>= 6.0.0 < 8.0.0)