Last active
December 22, 2015 18:29
-
-
Save atomaka/6513502 to your computer and use it in GitHub Desktop.
vagrant-gitlab modifications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure a GitLab server (gitlab.domain.tld) | |
node /default/ { | |
$gitlab_dbname = 'gitlab_prod' | |
$gitlab_dbuser = 'labu' | |
$gitlab_dbpwd = 'labpass' | |
class { 'depends': | |
gitlab_dbname => $gitlab_dbname, | |
gitlab_dbuser => $gitlab_dbuser, | |
gitlab_dbpwd => $gitlab_dbpwd, | |
} | |
Class['depends'] -> Class['gitlab'] | |
exec { 'initial update': | |
command => '/usr/bin/apt-get update', | |
} | |
Exec['initial update'] -> Package <| |> | |
class { | |
'gitlab': | |
git_user => 'git', | |
git_home => '/home/git', | |
git_email => 'notifs@foobar.fr', | |
git_comment => 'GitLab', | |
gitlab_sources => 'https://github.com/gitlabhq/gitlabhq.git', | |
gitlab_domain => 'gitlab.localdomain.local', | |
gitlab_dbtype => 'mysql', | |
gitlab_dbname => $gitlab_dbname, | |
gitlab_dbuser => $gitlab_dbuser, | |
gitlab_dbpwd => $gitlab_dbpwd, | |
ldap_enabled => false, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class depends($gitlab_dbname, $gitlab_dbuser, $gitlab_dbpwd) { | |
include redis | |
include nginx | |
include mysql::server | |
class { 'ruby': | |
version => '1:1.9.3', | |
rubygems_update => false; | |
} | |
class { 'ruby::dev': } | |
mysql::db { | |
$gitlab_dbname: | |
ensure => 'present', | |
charset => 'utf8', | |
user => $gitlab_dbuser, | |
password => $gitlab_dbpwd, | |
host => 'localhost', | |
grant => ['all'], | |
# See http://projects.puppetlabs.com/issues/17802 (thanks Elliot) | |
} | |
anchor { 'depends::begin': } | |
anchor { 'depends::end': } | |
Anchor['depends::begin'] -> | |
Class['redis'] -> Class['nginx'] -> Class['ruby'] -> Class['ruby::dev'] -> | |
Class['mysql::server'] -> Mysql::Db[$gitlab_dbname] -> | |
Anchor['depends::end'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment