Install Gitlab with puppet

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

About spuder
spuder is a "super computer" support engineer by day, and tinkerer / hobbyist by night.

2 Responses to Install Gitlab with puppet

  1. Ian says:

    This is fantastic work. Thanks for all your effort. Gitlab is great but the install is absolutely brutal. Once I brought my setup up to Puppet 3.2 (a nightmarish process unto itself), everything worked beautifully. I am watching the github repo for updates, too. Again: thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: