Forge Home

gitlab

Puppet GitLab Module

sbadia

sbadia

79,810 downloads

51,627 latest version

4.0 quality score

Version information

  • 1.1.0 (latest)
  • 1.0.0
  • 0.2.0
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.10
  • 0.0.9
  • 0.0.8 (deleted)
  • 0.0.6 (deleted)
  • 0.0.5 (deleted)
  • 0.0.4 (deleted)
  • 0.0.3 (deleted)
  • 0.0.1 (deleted)
released Aug 5th 2015
This version is compatible with:
  • RedHat
    ,
    CentOS
    ,
    Debian
    ,
    Ubuntu

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'sbadia-gitlab', '1.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sbadia-gitlab
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sbadia-gitlab --version 1.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: vcs, git, gitlab

Documentation

sbadia/gitlab — version 1.1.0 Aug 5th 2015

Puppet-gitlab

Build Status Puppet Forge License

Table of contents

  1. Overview
  2. Module description
  3. Parameters
  4. Usage
  5. Limitation
  6. Development

Overview

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.

Module description

This module is based on the admin guides for gitlab, stable version.

Dependencies

See gitlab example.

GitLab web interface

  1. Add an ssh key to your account, or create another account
  2. Create a project
  3. Play !

Parameters

See manifest/init.pp and manifests/params.pp

Usage

Note: Assume that a database server is already installed on your server/infrastructure (see: vagrant-gitlab).

class gitlab

class {
  'gitlab':
    git_email         => 'notifs@foobar.fr',
    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

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,
}

class gitlab::ci::runner

# 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',
}

A Complete example

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                => 'gitlab@fooboozoo.fr',
  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,
}

Limitations

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.

Development

Want to help - send a pull request.

Beaker-Rspec

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

Development environment with vagrant

See vagrant-gitlab.