Permalink
Browse files

Add puppet doc for classes, README

  • Loading branch information...
1 parent 43c9329 commit 4f1322a6ed09d94272ce00670cfd438d76dc9d8d @adrienthebo committed Apr 29, 2012
Showing with 161 additions and 25 deletions.
  1. +6 −5 Modulefile
  2. +18 −0 README.markdown
  3. +43 −0 manifests/adc.pp
  4. +16 −0 manifests/data.pp
  5. +20 −1 manifests/gitweb.pp
  6. +16 −0 manifests/init.pp
  7. +26 −1 manifests/install.pp
  8. +6 −8 manifests/instance.pp
  9. +10 −10 manifests/rc.pp
View
@@ -1,11 +1,12 @@
name 'adrienthebo-gitolite'
version '0.0.1'
-source 'UNKNOWN'
+source 'https://github.com/adrienthebo/puppet-gitolite'
author 'Adrien Thebo'
license 'Apache 2.0'
-summary 'UNKNOWN'
-description 'UNKNOWN'
-project_page 'UNKNOWN'
+summary 'Install and configure Gitolite'
+description 'Install and configure Gitolite, ADCs, Gitweb and other ocmponents'
+project_page* 'https://github.com/adrienthebo/puppet-gitolite'
## Add dependencies, if any:
-# dependency 'username/name', '>= 1.2.0'
+dependency 'puppetlabs/stdlib', '>= 0.0.1'
+dependency 'adrienthebo/gitweb', '>= 0.0.1'
View
@@ -0,0 +1,18 @@
+puppet-gitolite
+===============
+
+Install and manage gitolite
+
+Defines
+
+ package { 'git': ensure => present } ->
+ class { '::gitolite': }
+ include gitolite::gitweb
+
+ gitolite::adc { 'adc.common-functions': mode => '0600'}
+ gitolite::adc { 'help': }
+ gitolite::adc { 'hub': }
+ gitolite::adc { 'fork': }
+ gitolite::adc { 'unlock': }
+ gitolite::adc { 'lock': }
+ gitolite::adc { 'trash': }
View
@@ -1,3 +1,46 @@
+# Define: gitolite::adc
+#
+# Manage the installation and removal of gitolite admin defined commands
+#
+# == Parameters
+#
+# [*ensure*]
+#
+# Whether to create or remove the ADC.
+#
+# Default: present
+#
+# [*source*]
+#
+# The source of the ADC file on the server.
+#
+# Defaults to puppet:///modules/gitolite/adc/${name}
+#
+# [*mode*]
+#
+# The file mode to apply to the file. If a file is not executable then
+# gitolite will not list it as an available ADC.
+#
+# Default: 0700
+#
+# == Example
+#
+# gitolite::adc { 'adc.common-functions': mode => '0600'}
+# gitolite::adc { 'help': }
+# gitolite::adc { 'hub': }
+# gitolite::adc { 'fork': }
+# gitolite::adc { 'unlock': }
+# gitolite::adc { 'lock': }
+# gitolite::adc { 'trash': }
+#
+# == Author
+#
+# Adrien Thebo <adrien@puppetlabs.com>
+#
+# == Copyright
+#
+# Copyright 2012 Puppet Labs, unless otherwise noted
+#
define gitolite::adc($ensure = present, $source = "puppet:///modules/gitolite/adc/${name}", $mode = '0700'){
require gitolite::instance
View
@@ -1,3 +1,19 @@
+# Class: gitolite::data
+#
+# Centralize gitolite data storage. Used by hiera.
+#
+# == Example
+#
+# This class should not be directly included.
+#
+# == Author
+#
+# Adrien Thebo <adrien@puppetlabs.com>
+#
+# == Copyright
+#
+# Copyright 2012 Puppet Labs, unless otherwise noted
+#
class gitolite::data {
##############################################################################
View
@@ -1,5 +1,23 @@
+# Class: gitolite::gitweb
+#
# Configure a gitweb instance built on top of this gitolite instance
-
+#
+# == Examples
+#
+# include gitolite::gitweb
+#
+# class { 'gitolite::gitweb':
+# site_alias => 'git.example.com',
+# }
+#
+# == Author
+#
+# Adrien Thebo <adrien@puppetlabs.com>
+#
+# == Copyright
+#
+# Copyright 2012 Puppet Labs, unless otherwise noted
+#
class gitolite::gitweb($site_alias = hiera('gitolite_gitweb_site_alias')){
require gitolite::rc
@@ -14,6 +32,7 @@
projects_list => hiera('gitolite_rc_projects_list'),
}
+ # Provide an empty htpasswd file for the gitolite htpasswd ADC
file { "/home/git/.htpasswd":
ensure => file,
owner => 'git',
View
@@ -1,3 +1,19 @@
+# = Class: gitolite
+#
+# Install gitolite with default values.
+#
+# == Example
+#
+# include gitolite
+#
+# == Author
+#
+# Adrien Thebo <adrien@puppetlabs.com>
+#
+# == Copyright
+#
+# Copyright 2012 Puppet Labs, unless otherwise noted
+#
class gitolite {
include gitolite::install
include gitolite::instance
View
@@ -1,6 +1,31 @@
# = Class: gitolite::install
#
-# Backports requires the backports repo available. Fo shizzle.
+# Installs gitolite
+#
+# == Parameters
+#
+# [*source*]
+#
+# The source to install from. One of [backports, git, package]
+#
+# Default: hiera('gitolite_install_source')
+#
+# == Example
+#
+# include gitolite::install
+#
+# class { 'gitolite::install':
+# source => 'git',
+# }
+#
+# == Author
+#
+# Adrien Thebo <adrien@puppetlabs.com>
+#
+# == Copyright
+#
+# Copyright 2012 Puppet Labs, unless otherwise noted
+#
class gitolite::install($source = hiera('gitolite_install_source')) {
case $source {
View
@@ -1,18 +1,16 @@
# = Class: gitolite::instance
#
-# == Purpose
-#
# This class creates a gitolite instance and the necessary prerequisite files
#
-# == Parameters
+# == Parameters:
#
# The following parameters can be tuned as parameters or through hiera
#
-# * gitolite_instance_manage_user - Whether or not to manage the gitolite user
-# * gitolite_instance_user - The name of the gitolite user
-# * gitolite_instance_group - The name of the gitolite group
-# * gitolite_instance_home - The name of the gitolite home directory
-# * gitolite_instance_key - The full ssh public key to use to initialize the gitolite-admin repo.
+# * *gitolite_instance_manage_user* - Whether or not to manage the gitolite user
+# * *gitolite_instance_user* - The name of the gitolite user
+# * *gitolite_instance_group* - The name of the gitolite group
+# * *gitolite_instance_home* - The name of the gitolite home directory
+# * *gitolite_instance_key* - The full ssh public key to use to initialize the gitolite-admin repo.
#
class gitolite::instance(
$manage_user = hiera('gitolite_instance_manage_user'),
View
@@ -10,19 +10,19 @@
#
# The following variables are pulled from hiera.
#
-# * gitolite_instance_user - The name of the gitolite user
-# * gitolite_instance_group - The name of the gitolite group
-# * gitolite_instance_home - The name of the gitolite home directory
+# * *gitolite_instance_user* - The name of the gitolite user
+# * *gitolite_instance_group* - The name of the gitolite group
+# * *gitolite_instance_home* - The name of the gitolite home directory
#
# The following parameters can be tuned as parameters or through hiera
#
-# gl_wildrepos - Whether to enable wildrepos
-# gl_wildrepos_defperms - Default permssions for wildrepos
-# gl_wildrepos_perm_cats - Possible permission categories for wildrepos
-# projects_list - The location of the projects list.
-# repo_umask - The umask for repositories.
-# gl_adc_path - The path to load and store ADCs in
-# gl_htpasswd_file - The location of the htpasswd file.
+# * *gl_wildrepos* - Whether to enable wildrepos
+# * *gl_wildrepos_defperms* - Default permssions for wildrepos
+# * *gl_wildrepos_perm_cats* - Possible permission categories for wildrepos
+# * *projects_list* - The location of the projects list.
+# * *repo_umask* - The umask for repositories.
+# * *gl_adc_path* - The path to load and store ADCs in
+# * *gl_htpasswd_file* - The location of the htpasswd file.
#
class gitolite::rc (
$gl_wildrepos = hiera('gitolite_rc_gl_wildrepos'),

0 comments on commit 4f1322a

Please sign in to comment.