GitLab is a free project and repository management application
A Puppet Module is a collection of related content that can be used to model the configuration of a discrete service.
This module is based on the admin guides for gitlab, stable version.
- puppet-gitlab on puppet forge.
- alup/puppet-rbenv
- puppetlabs/puppetlabs-git
- puppetlabs/puppetlabs-stdlib
- puppetlabs/puppetlabs-vcsrepo
See gitlab example.
- access via your browser under the hostname (e.g. http://gitlab.domain.tld)
- Login: [email protected] (version before GitLab v7.1.0 use [email protected])
- Password: 5iveL!fe
- Add an ssh key to your account, or create another account
- Create a project
- Play !
See manifest/init.pp and manifests/params.pp
Note: Assume that a database server is already installed on your server/infrastructure (see: vagrant-gitlab).
class {
'gitlab':
git_email => '[email protected]',
git_comment => 'GitLab',
gitlab_domain => 'gitlab.foobar.fr',
gitlab_dbtype => 'mysql',
gitlab_dbname => $gitlab_dbname,
gitlab_dbuser => $gitlab_dbuser,
gitlab_dbpwd => $gitlab_dbpwd,
ldap_enabled => false,
}
class { 'gitlab::ci':
ci_comment => 'GitLab',
gitlab_server_urls => ['https://gitlab.example.org']
gitlab_domain => $gitlab_domain,
gitlab_dbtype => 'mysql',
gitlab_dbname => $ci_dbname,
gitlab_dbuser => $ci_dbuser,
gitlab_dbpwd => $ci_dbpwd,
gitlab_http_port => 8081,
}
# The registration token can be found at: http://ci.example.com/admin/runners, accessible through Header > Runners.
class { 'gitlab::ci::runner':
ci_server_url => 'https://ci.example.com',
registration_token => 'replaceme',
}
include redis
include nginx
include mysql::server
include git
include nodejs
include logrotate
mysql::db {'gitlab': user => 'user', password => 'password' }
class {'gitlab':
git_user => 'git',
git_home => '/home/git',
git_email => '[email protected]',
git_comment => 'GitLab',
gitlab_sources => 'https://github.com/gitlabhq/gitlabhq.git',
gitlab_domain => 'gitlab.localdomain.local',
gitlab_http_timeout => '300',
gitlab_dbtype => 'mysql',
gitlab_backup => true,
gitlab_dbname => 'gitlab',
gitlab_dbuser => 'user',
gitlab_dbpwd => 'password',
ldap_enabled => false,
}
This module has been built on and tested against Puppet 2.7 and higher.
The module has been tested on:
- RedHat Enterprise Linux 5/6/7
- Debian 6/7
- CentOS 5/6/7
- Ubuntu 12.04/14.04
Testing on other platforms has been light and cannot be guaranteed.
Want to help - send a pull request.
This module has beaker-rspec tests
To run:
bundle install
bundle exec rspec spec/acceptance
# or use BEAKER_destroy=no to keep the resulting vm
BEAKER_destroy=no bundle exec rspec spec/acceptance
# or for centos
BEAKER_set=centos-70-x64 BEAKER_destroy=no bundle exec rspec spec/acceptance
See vagrant-gitlab.