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_ensureservice_nameservice_enableservice_execservice_ensureservice_manageservice_provider_restartservice_userservice_grouprake_execeditionmanage_upstream_editionconfig_manageconfig_filealertmanagerci_redisci_unicornexternal_urlexternal_portgeo_postgresqlgeo_logcursorgeo_primary_rolegeo_secondarygeo_secondary_rolegitgitalygit_data_dirsgitlab_git_http_servergitlab_cigitlab_kasgitlab_pagesgitlab_railsgitlab_sshdgitlab_workhorsegrafanaloggingletsencryptpackagelogrotatemanage_storage_directoriesmanage_accountsmattermost_external_urlmattermostmattermost_nginxmattermost_nginx_eq_nginxnginxnode_exporterredis_exporterpostgres_exporterpgbouncer_exportergitlab_monitorgitlab_exporterpages_external_urlpages_nginxpages_nginx_eq_nginxpostgresqlprometheusprometheus_monitoring_enableredisredis_master_roleredis_slave_roleredis_sentinel_roleregistryregistry_external_urlregistry_nginxregistry_nginx_eq_nginxrolessentinelshellsidekiqsidekiq_clusterskip_auto_migrationsskip_auto_reconfigureskip_post_deployment_migrationsstore_git_keys_in_dbsource_config_fileunicornpumauserweb_serverhigh_availabilitybackup_cron_enablebackup_cron_minutebackup_cron_hourbackup_cron_skipspackage_namemanage_packagerepository_configurationmanage_omnibus_repositorypgpass_file_locationpgpass_file_ensurepgbouncer_passwordconsulcustom_hooks_dirsystem_hooks_dirpgbouncerrepmgrcustom_hooksglobal_hookssystem_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 '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: 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_dirskip_auto_migrationsskip_auto_reconfigurestore_git_keys_in_dbpgpass_file_ensurepgpass_file_locationpgbouncer_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::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_ensureservice_enableservice_nameservice_execservice_manageservice_provider_restartskip_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