Forge Home

gitlab

Installation and configuration of Gitlab Omnibus

1,523,426 downloads

26,835 latest version

4.2 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.15.2 (latest)
  • 1.15.1
  • 1.15.0
  • 1.14.0
  • 1.13.3
  • 1.13.2
  • 1.13.1
  • 1.12.0
  • 1.11.0
  • 1.10.0
  • 1.9.1
  • 1.8.0
  • 1.7.2
  • 1.7.1
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.3
released Jul 17th 2015
This version is compatible with:
  • Puppet Enterprise >=3.7.0 <5.0.0
  • Puppet >=3.7.0 <5.0.0
  • , , , , ,
This module has been deprecated by its author since Feb 8th 2018.

The author has suggested puppet-gitlab as its replacement.

Start using this module

Tags: git, gitlab

Documentation

vshn/gitlab — version 1.3.0 Jul 17th 2015

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with gitlab
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This Puppet module installs and manages Gitlab. It makes use of the provided Omnibus packages and the packagecloud package repositories.

Build Status vshn-gitlab

Module Description

The module installs the Gitlab package from the provided repositories and creates the configuration file which is then used by gitlab-ctl reconfigure to configure all the services. Fun fact: This really uses Chef to configure all the services.

Supported are Debian based (Ubuntu, Debian) and RedHat based (CentOS, RHEL) operating systems. Although the RedHat based are not yet tested.

As Gitlab is providing the package repo since 7.10+, this module only works with CE edition greater than 7.10. Also the enterprise edition package is only available since 7.11+. So the EE is supported with versions greater than 7.11.

Setup

What gitlab affects

  • Package repository (APT or YUM)
  • Package gitlab-ce oder gitlab-ee (depending on the chosen edition)
  • Configuration file /etc/gitlab/gitlab.rb
  • System service gitlab-runsvdir
  • Gitlab configuration using gitlab-ctl reconfigure

Setup Requirements

Have a look at the official download page for the required prerequisits (f.e. Postfix). This module doesn't handle them, that's the job of the specific modules.

It requires only the puppetlabs-apt module when using it under a Debian based OS and the paramater manage_package_repo is not false. Furthermore the stdlib module is required.

Beginning with Gitlab

Just include the class and specify at least external_url.

class { 'gitlab':
  external_url => 'http://gitlab.mydomain.tld',
}

The module also supports Hiera, here comes an example:

gitlab::external_url: 'http://gitlab.mydomain.tld'
gitlab::rails:
  time_zone: 'UTC'
  gitlab_email_enabled: false
  gitlab_default_theme: 4
  gitlab_email_display_name: 'Gitlab'
gitlab::sidekiq:
  shutdown_timeout: 5

If one wants to install Gitlab Enterprise Edition, just define the parameter edition with the value ee:

class { 'gitlab':
  external_url => 'http://gitlab.mydomain.tld',
  edition      => 'ee',
}

Note: This works only for Gitlab version 7.11 and greater. See this blog entry: GitLab 7.11 released with Two-factor Authentication and a publicly viewable Enterprise Edition

Usage

To find the default values, have a look at params.pp. All other parameters are documented inside init.pp.

The main class (init.pp) exposes the configuration sections from the gitlab.rb configuration file as hashes. So if there are any parameter changes in future versions of Gitlab, the module should support them right out of the box. Only if there would be bigger changes to sections, the module would need some updates.

All possible parameters for gitlab.rb can be found here: gitlab.rb.template

Some examples:

class { 'gitlab':
  external_url => 'http://gitlab.mydomain.tld',
  gitlab_rails => {
    'webhook_timeout' => 10,
    'gitlab_default_theme' => 2,
  },
  logging      => {
    'svlogd_size' => '200 * 1024 * 1024',
  },
}

Limitations

The supported operating systems by Gitlab Omnibus are to be found on the official download page. At the moment the module is not yet tested under RPM based operating systems. But in theory it should work as all the preparations are there.

Development

  1. Fork it (https://github.com/vshn/puppet-gitlab/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Make sure your PR passes the Rspec tests.

Contributors

Have a look at Github contributors to see a list of all the awesome contributors to this Puppet module. <3

Why another Gitlab module

There exists a great module from @spuder: https://github.com/spuder/puppet-gitlab Many thanks for the great work done there. Gitlab itself is an ever changing piece of software. Lately they added the package repository which makes a lot of things easier. This was one reason to rewrite the module. The other reason was that the other Gitlab module exposes ALL possible parameters of gitlab.rb which makes it a pain to maintain. This module makes it much easier by just exposing the sections. So it is hopefully much more compatible to upcoming versions of Gitlab.