Install Gitlab with puppet
October 30, 2013 2 Comments
Once you have used a professional git hosting service like github, you’ll never be satisfied going back to a plane jane git server like git-web.
git-web is just so darn ugly!
A necessity arose at my company for a way to create pull requests on our main software, so I started investigating how we could migrate our codebase to github.
Unfortunately, github enterprise is $5,000 per 20 users per year. If you have 100 users, thats $25,000 per year!
There are other projects such as gitorious, however their pricing is close to github’s.
Introduce gitlab. Gitlab is an enterprise level git server comparable to gitorious and github enterprise, however costs 1/10th what the competitors charge. They also have a community edition. The only limitations in the community edition being; LDAP group synchronization, and project group invites. Both things a smaller company can live without. See the full feature list here.
Gitlab is light-years ahead of git-web
Installing Gitlab with Puppet
The biggest obstacle to adopting a server like gitlab, is the heavy install. The average time for me to install the community edition of gitlab was 6 hours. So I leveraged puppet to install gitlab automatically.
Using my puppet module, it is now possible to install gitlab in about 15 minutes.
Step by step video tutorial is located below.
Note: You may see the following errors when installing gitlab inside vagrant. This is because dependencies are not resolved when installing a module locally (opposed to from the puppet forge).
vagrant@gitlab:/vagrant$ puppet apply /vagrant/tests/init.pp --debug Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class mysql::server at /vagrant/tests/init.pp:12 on node gitlab.localdomain Wrapped exception: Could not find declared class mysql::server Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class mysql::server at /vagrant/tests/init.pp:12 on node gitlab.localdomain
Solution: Manually install dependencies
puppet module install puppetlabs-mysql
puppet module install puppetlabs-apt
puppet module install example42-postfix
puppet module install puppetlabs-ruby
The spuder-gitlab module can be found on the puppet forge
And the module’s source is on github