gitlab
: This module installs and configures Gitlab with the Omnibus package.gitlab::backup
: This class is called from gitlab for backup config.gitlab::host_config
: This class is for setting host configurations required for gitlab installation.gitlab::install
: This class is called from gitlab for install.gitlab::omnibus_config
: This class is used to configure the gitlab omnibus package on a nodegitlab::omnibus_package_repository
: This class is used to configure gitlab repositoriesgitlab::service
: This class is meant to be called from gitlab. It ensure the service is running.
gitlab::custom_hook
: Manage custom hook files within a GitLab project. Custom hooks can be created as a pre-receive, post-receive, or update hook. Only one of each is currently supported by this module.gitlab::global_hook
: Manage global chain loaded hook files for all GitLab projects. Hooks can be created as a pre-receive, post-receive, or update hook. It's possible to create multipe hooks per type as long as their names are unique. Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.gitlab::system_hook
: A file hook will run on each event so it's up to you to filter events or projects
post_upgrade
: Cleans up old postgres database after upgradepostgres_upgrade
: Upgrades the postgres database if needed
This module installs and configures Gitlab with the Omnibus package.
The following parameters are available in the gitlab
class:
package_ensure
service_name
service_enable
service_exec
service_ensure
service_manage
service_provider_restart
service_user
service_group
rake_exec
edition
manage_upstream_edition
config_manage
config_file
alertmanager
ci_redis
ci_unicorn
external_url
external_port
geo_postgresql
geo_logcursor
geo_primary_role
geo_secondary
geo_secondary_role
git
gitaly
git_data_dirs
gitlab_git_http_server
gitlab_ci
gitlab_kas
gitlab_pages
gitlab_rails
gitlab_sshd
gitlab_workhorse
grafana
logging
letsencrypt
package
logrotate
manage_storage_directories
manage_accounts
mattermost_external_url
mattermost
mattermost_nginx
mattermost_nginx_eq_nginx
nginx
node_exporter
redis_exporter
postgres_exporter
pgbouncer_exporter
gitlab_monitor
gitlab_exporter
pages_external_url
pages_nginx
pages_nginx_eq_nginx
praefect
postgresql
prometheus
prometheus_monitoring_enable
redis
redis_master_role
redis_slave_role
redis_sentinel_role
registry
registry_external_url
registry_nginx
registry_nginx_eq_nginx
roles
sentinel
shell
sidekiq
sidekiq_cluster
skip_auto_migrations
skip_auto_reconfigure
skip_post_deployment_migrations
store_git_keys_in_db
source_config_file
unicorn
puma
user
web_server
high_availability
backup_cron_enable
backup_cron_minute
backup_cron_hour
backup_cron_skips
package_hold
package_name
manage_package
repository_configuration
manage_omnibus_repository
pgpass_file_location
pgpass_file_ensure
pgbouncer_password
consul
custom_hooks_dir
system_hooks_dir
pgbouncer
repmgr
custom_hooks
global_hooks
system_hooks
Data type: String
Can be used to choose exact package version to install.
Default value: 'installed'
Data type: String
Name of the system service.
Default value: 'gitlab-runsvdir'
Data type: Boolean
Run the system service on boot.
Default value: true
Data type: String
The service executable path. Provide this variable value only if the service executable path would be a subject of change in future GitLab versions for any reason.
Default value: '/usr/bin/gitlab-ctl'
Data type: Enum['stopped', 'false', 'running', 'true']
Should Puppet start the service?
Default value: 'running'
Data type: Boolean
Should Puppet manage the service?
Default value: false
Data type: Boolean
Should Puppet restart the gitlab systemd service?
Default value: false
Data type: String
Owner of the config file.
Default value: 'root'
Data type: String
Group of the config file.
Default value: 'root'
Data type: String
The gitlab-rake executable path. You should not need to change this path.
Default value: '/usr/bin/gitlab-rake'
Data type: Optional[String]
Deprecated: See manage_upstream_edition
Default value: undef
Data type: Enum['ce', 'ee', 'disabled']
One of [ 'ce', 'ee', 'disabled' ]. Manage the installation of an upstream Gitlab Omnibus edition to install.
Default value: 'ce'
Data type: Boolean
Should Puppet manage the config?
Default value: true
Data type: Stdlib::Absolutepath
Path of the Gitlab Omnibus config file.
Default value: '/etc/gitlab/gitlab.rb'
Data type: Optional[Hash]
Hash of 'alertmanager' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'ci_redis' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'ci_unicorn' config parameters.
Default value: undef
Data type: Stdlib::Httpurl
External URL of Gitlab.
Default value: "http://${facts['networking']['fqdn']}"
Data type: Optional[Integer[1, 65565]]
External PORT of Gitlab.
Default value: undef
Data type: Optional[Hash]
Hash of 'geo_postgresql' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'geo_logcursor' config parameters.
Default value: undef
Data type: Boolean
Boolean to enable Geo primary role
Default value: false
Data type: Optional[Hash]
Hash of 'geo_secondary' config parameters.
Default value: undef
Data type: Boolean
Boolean to enable Geo secondary role
Default value: false
Data type: Optional[Hash]
Hash of 'omnibus_gitconfig' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'omnibus_gitconfig' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of git data directories
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_git_http_server' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_ci' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_kas' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_pages' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_pages' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_sshd' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_workhorse' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'grafana' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'logging' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'letsencrypt' config parameters.
Default value: undef
Data type: Optional[Hash[String[1], Scalar]]
Hash of 'package' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'logrotate' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'manage_storage_directories' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'manage_accounts' config parameters.
Default value: undef
Data type: Optional[String]
External URL of Mattermost.
Default value: undef
Data type: Optional[Hash]
Hash of 'mattmost' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'mattmost_nginx' config parameters.
Default value: undef
Data type: Boolean
Replicate the Mattermost Nginx config from the Gitlab Nginx config.
Default value: false
Data type: Optional[Hash]
Hash of 'nginx' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'node_exporter' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'redis_exporter' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'postgres_exporter' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'pgbouncer_exporter' config parameters.
Default value: undef
Data type: Optional[Hash]
Deprecated if using Gitlab > 12.3 and < 13.0, unsupported by gitlab omnibus using Gitlab 13+. Hash of 'gitlab_monitor' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_exporter' config parameters.
Default value: undef
Data type: Optional[String]
External URL of Gitlab Pages.
Default value: undef
Data type: Optional[Hash]
Hash of 'pages_nginx' config parameters.
Default value: undef
Data type: Boolean
Replicate the Pages Nginx config from the Gitlab Nginx config.
Default value: false
Data type: Optional[Hash]
Hash of 'praefect' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'postgresql' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'prometheus' config parameters.
Default value: undef
Data type: Optional[Boolean]
Enable/disable prometheus support.
Default value: undef
Data type: Optional[Hash]
Hash of 'redis' config parameters.
Default value: undef
Data type: Optional[Boolean]
To enable Redis master role for the node.
Default value: undef
Data type: Optional[Boolean]
To enable Redis slave role for the node.
Default value: undef
Data type: Optional[Boolean]
To enable sentinel role for the node.
Default value: undef
Data type: Optional[Hash]
Hash of 'registry' config parameters.
Default value: undef
Data type: Optional[String]
External URL of Registry
Default value: undef
Data type: Optional[Hash]
Hash of 'registry_nginx' config parameters.
Default value: undef
Data type: Boolean
Replicate the registry Nginx config from the Gitlab Nginx config.
Default value: false
Data type: Optional[Array]
Array of roles when using a HA or Geo enabled GitLab configuration. See: https://docs.gitlab.com/omnibus/roles/README.html for acceptable values
Default value: undef
Data type: Optional[Hash]
Hash of 'sentinel' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'gitlab_shell' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'sidekiq' config parameters
Default value: undef
Data type: Optional[Hash]
Hash of 'sidekiq_cluster' config parameters.
Default value: undef
Data type: Optional
Deprecated if using Gitlab > 10.6.4 and < 11.0.0, unsupported by gitlab omnibus using gitlab 11+. Use skip_auto_reconfigure
Default value: undef
Data type: Enum['present', 'absent']
Utilized for Zero Downtime Updates, See: https://docs.gitlab.com/omnibus/update/README.html#zero-downtime-updates
Default value: 'absent'
Data type: Boolean
Adds SKIP_POST_DEPLOYMENT_MIGRATIONS=true to the execution of gitlab-ctl reconfigure. Used for zero-downtime updates
Default value: false
Data type: Boolean
Enable or disable Fast Lookup of authorized SSH keys in the database. See: https://docs.gitlab.com/ee/administration/operations/fast_ssh_key_lookup.html
Default value: false
Data type: Optional[Stdlib::Absolutepath]
Override Hiera config with path to gitlab.rb config file
Default value: undef
Data type: Optional[Hash]
Hash of 'unicorn' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'puma' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'user' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'web_server' config parameters.
Default value: undef
Data type: Optional[Hash]
Hash of 'high_availability' config parameters.
Default value: undef
Data type: Boolean
Boolean to enable the daily backup cron job
Default value: false
Data type: Integer[0,59]
The minute when to run the daily backup cron job
Default value: 0
Data type: Integer[0,23]
The hour when to run the daily backup cron job
Default value: 2
Data type: Array
Array of items to skip valid values: db, uploads, repositories, builds, artifacts, lfs, registry, pages
Default value: []
Data type: Enum['hold', 'none']
Wether to hold the specified package version. Available options are 'hold' or 'none'. Defaults to 'none'. Available only for Debian/Solaris package managers.
Default value: 'none'
Data type: Optional[String]
The internal packaging system's name for the package. This name will automatically be changed by the gitlab::edition parameter. Can be overridden for the purposes of installing custom compiled version of gitlab-omnibus.
Default value: undef
Data type: Boolean
Should the GitLab package be managed?
Default value: true
Data type: Hash
A hash of repository types and attributes for configuraiton the gitlab package repositories. See docs in README.md
Data type: Boolean
Set to false if you wish to manage gitlab without configuring the package repository
Default value: true
Data type: Stdlib::Absolutepath
Path to location of .pgpass file used by consul to authenticate with pgbouncer database
Default value: '/home/gitlab-consul/.pgpass'
Data type: Enum['absent', 'present']
Create .pgpass file for pgbouncer authentication. When set to present requires valid value for pgbouncer_password.
Default value: 'absent'
Data type: Optional[String]
Password for the gitlab-consul database user in the pgbouncer database
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Stdlib::Absolutepath
Default value: '/opt/gitlab/embedded/service/gitlab-shell/hooks'
Data type: Stdlib::Absolutepath
Default value: '/opt/gitlab/embedded/service/gitlab-rails/file_hooks'
Data type: Optional[Hash]
Default value: undef
Data type: Optional[Hash]
Default value: undef
Data type: Hash
Default value: {}
Data type: Hash
Default value: {}
Data type: Hash[String[1],Hash[String[1],Any]]
Default value: {}
This class is called from gitlab for backup config.
This class is for setting host configurations required for gitlab installation.
The following parameters are available in the gitlab::host_config
class:
config_dir
skip_auto_migrations
skip_auto_reconfigure
store_git_keys_in_db
pgpass_file_ensure
pgpass_file_location
pgbouncer_password
Data type: Any
The service executable path. Provide this variable value only if the service executable path would be a subject of change in future GitLab versions for any reason.
Default value: '/etc/gitlab'
Data type: Any
Deprecated if using Gitlab > 10.6.4 and < 11.0.0, unsupported by gitlab omnibus using gitlab 11+. Use skip_auto_reconfigure
Default value: $gitlab::skip_auto_migrations
Data type: Any
Utilized for Zero Downtime Updates, See: https://docs.gitlab.com/omnibus/update/README.html#zero-downtime-updates
Default value: $gitlab::skip_auto_reconfigure
Data type: Any
Enable or disable Fast Lookup of authorized SSH keys in the database. See: https://docs.gitlab.com/ee/administration/operations/fast_ssh_key_lookup.html
Default value: $gitlab::store_git_keys_in_db
Data type: Any
Create .pgpass file for pgbouncer authentication. When set to present requires valid value for pgbouncer_password.
Default value: $gitlab::pgpass_file_ensure
Data type: Any
Path to location of .pgpass file used by consul to authenticate with pgbouncer database
Default value: $gitlab::pgpass_file_location
Data type: Any
Password for the gitlab-consul database user in the pgbouncer database
Default value: $gitlab::pgbouncer_password
This class is called from gitlab for install.
The following parameters are available in the gitlab::install
class:
Data type: Any
Default value: $gitlab::package_name
Data type: Any
Default value: $gitlab::package_ensure
Data type: Any
Default value: $gitlab::package_hold
Data type: Any
Default value: $gitlab::manage_package
This class is used to configure the gitlab omnibus package on a node
The following parameters are available in the gitlab::omnibus_config
class:
Data type: Any
Should Puppet manage the config?
Default value: $gitlab::config_manage
Data type: Any
Path of the Gitlab Omnibus config file.
Default value: $gitlab::config_file
This class is used to configure gitlab repositories
The following parameters are available in the gitlab::omnibus_package_repository
class:
Data type: Any
A hash of repository types and attributes for configuraiton the gitlab package repositories. See docs in README.md
Default value: $gitlab::repository_configuration
Data type: Any
Set to false if you wish to manage gitlab without configuring the package repository
Default value: $gitlab::manage_omnibus_repository
Data type: Any
One of [ 'ce', 'ee', 'disabled' ]. Manage the installation of an upstream Gitlab Omnibus edition to install.
Default value: $gitlab::manage_upstream_edition
This class is meant to be called from gitlab. It ensure the service is running.
The following parameters are available in the gitlab::service
class:
service_ensure
service_enable
service_name
service_exec
service_manage
service_provider_restart
skip_post_deployment_migrations
Data type: Any
Should Puppet start the service?
Default value: $gitlab::service_ensure
Data type: Any
Run the system service on boot.
Default value: $gitlab::service_enable
Data type: Any
Name of the system service.
Default value: $gitlab::service_name
Data type: Any
The service executable path. Provide this variable value only if the service executable path would be a subject of change in future GitLab versions for any reason.
Default value: $gitlab::service_exec
Data type: Any
Should Puppet manage the service?
Default value: $gitlab::service_manage
Data type: Any
Should Puppet restart the gitlab systemd service?
Default value: $gitlab::service_provider_restart
Data type: Any
Adds SKIP_POST_DEPLOYMENT_MIGRATIONS=true to the execution of gitlab-ctl reconfigure. Used for zero-downtime updates
Default value: $gitlab::skip_post_deployment_migrations
Manage custom hook files within a GitLab project. Custom hooks can be created as a pre-receive, post-receive, or update hook. Only one of each is currently supported by this module.
gitlab::custom_hook { 'my_custom_hook':
namespace => 'my_group',
project => 'my_project',
type => 'post-receive',
source => 'puppet:///modules/my_module/post-receive',
}
gitlab::custom_hook { 'my_custom_hook':
project => 93,
hashed_storage => true,
type => 'post-receive',
source => 'puppet:///modules/my_module/post-receive',
}
# Hook path will be `@hashed/6e/40/6e4001871c0cf27c7634ef1dc478408f642410fd3a444e2a88e301f5c4a35a4d`
The following parameters are available in the gitlab::custom_hook
defined type:
Data type: Variant[String,Integer]
The GitLab project name, or the hashed directory name or project ID number
Data type: Optional[String]
The GitLab group namespace for the project.
Default value: undef
Data type: Enum['update', 'post-receive', 'pre-receive']
The custom hook type. Should be one of pre-receive, post-receive, or update.
Data type: Optional[String]
Specify the custom hook contents either as a string or using the template function. If this paramter is specified source parameter must not be present.
Default value: undef
Data type: Optional[String]
Specify a file source path to populate the custom hook contents. If this paramter is specified content parameter must not be present.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The GitLab shell repos path. This defaults to '/var/opt/gitlab/git-data/repositories' if not present.
Default value: undef
Data type: Boolean
Whether to treat the project name as a hashed storage directory name or ID number
Default value: false
Manage global chain loaded hook files for all GitLab projects. Hooks can be created as a pre-receive, post-receive, or update hook. It's possible to create multipe hooks per type as long as their names are unique. Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
gitlab::custom_hook { 'my_custom_hook':
type => 'post-receive',
source => 'puppet:///modules/my_module/post-receive',
}
The following parameters are available in the gitlab::global_hook
defined type:
Data type: Enum['post-receive', 'pre-receive', 'update']
The custom hook type. Should be one of pre-receive, post-receive, or update.
Data type: Stdlib::Absolutepath
The GitLab shell repos path. This defaults to '/opt/gitlab/embedded/service/gitlab-shell/hooks' if not present.
Default value: $gitlab::custom_hooks_dir
Data type: Optional[String[1]]
Specify the custom hook contents either as a string or using the template function. If this paramter is specified source parameter must not be present.
Default value: undef
Data type: Optional[Pattern[/^puppet:/]]
Specify a file source path to populate the custom hook contents. If this paramter is specified content parameter must not be present.
Default value: undef
within a file hook code. You can have as many file hooks as you want. Each file hook will be triggered by GitLab asynchronously in case of an event. For a list of events see the system hooks documentation.
gitlab::system_hook { 'my_system_hook':
type => 'post-receive',
source => 'puppet:///modules/my_module/post-receive',
}
The following parameters are available in the gitlab::system_hook
defined type:
Data type: Stdlib::Absolutepath
The GitLab shell repos path. This defaults to '/opt/gitlab/embedded/service/gitlab-rails/file_hooks' if not present.
Default value: $gitlab::system_hooks_dir
Data type: Optional[String[1]]
Specify the system hook contents either as a string or using the template function. If this paramter is specified source parameter must not be present.
Default value: undef
Data type: Optional[Pattern[/^puppet:/]]
Specify a file source path to populate the system hook contents. If this paramter is specified content parameter must not be present.
Default value: undef
Cleans up old postgres database after upgrade
Supports noop? false
Upgrades the postgres database if needed
Supports noop? false