From 4d4c9f4a76da90d652bc40c15c51e999efba4784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20T=C3=BAlio=20R=20Braga?= Date: Thu, 3 Mar 2016 16:43:19 -0300 Subject: [PATCH 1/2] Update doc: Add an example of 'LDAP authentication' --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6b9778b..1c9e492 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,11 @@ 2. [Module description](#module-description) 3. [Parameters](#parameters) 4. [Usage](#usage) - * [Basic usage](#basic-usage) - * [With LDAP](#with-ldap) + * [example class gitlab](#example-class-gitlab) + * [example class gitlab::ci](#example-class-gitlab-ci) + * [example class gitlab::runner](#example-class-gitlab-runner) + * [A complete example](#a-complete-example) + * [A complete example with LDAP authentication](#a-complete-usage-with-ldap-authentication) 5. [Limitation](#limitation) 6. [Development](#development) @@ -52,7 +55,7 @@ See [manifest/init.pp](https://github.com/sbadia/puppet-gitlab/blob/master/manif _Note:_ Assume that a database server is already installed on your server/infrastructure (see: [vagrant-gitlab](https://github.com/sbadia/vagrant-gitlab/blob/master/examples/gitlab.pp)). -## class gitlab +## example: class gitlab ```puppet class { @@ -68,7 +71,7 @@ class { } ``` -## class gitlab::ci +## example: class gitlab::ci ```puppet class { 'gitlab::ci': @@ -83,7 +86,7 @@ class { 'gitlab::ci': } ``` -## class gitlab::ci::runner +## example: class gitlab::ci::runner ```puppet # The registration token can be found at: http://ci.example.com/admin/runners, accessible through Header > Runners. @@ -92,7 +95,7 @@ class { 'gitlab::ci::runner': registration_token => 'replaceme', } ``` -## A Complete example +## A complete example ```puppet include redis @@ -121,6 +124,52 @@ class {'gitlab': } ``` +## A complete example with LDAP authentication + +```puppet +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/gitlab', + 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 => true, + ldap_host => 'ads.localdomain.local', + ldap_base => 'DC=localdomain,DC=local', + ldap_uid => 'sAMAccountName', + ldap_user_filter => '(&(objectClass=*)(memberOf=CN=ACCESS_GIT,OU=groups,DC=localdomain,DC=local))', + ldap_port => '389', + ldap_method => 'plain', + ldap_bind_dn => 'CN=GIT_ADMIN,OU=Users,DC=localdomain,DC=local', + ldap_bind_password => 'change_me-GIT_ADMIN_password', + ldap_active_directory => true, + ldap_block_auto_created_users => false, + ldap_sync_time => '1800', + ldap_group_base => 'CN=ACCESS_GIT,OU=groups,DC=localdomain,DC=local', + ldap_sync_ssh_keys => false, + ldap_admin_group => 'CN=ADMIN_GIT,OU=groups,DC=localdomain,DC=local', +} +``` + # Limitations This module has been built on and tested against Puppet 2.7 and higher. From 207446566ef81e9b7daac9c443bb8f71f024806d Mon Sep 17 00:00:00 2001 From: Vadim Lebedev Date: Wed, 25 May 2016 21:59:22 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c9e492..62fd4db 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ class { 'gitlab': ldap_user_filter => '(&(objectClass=*)(memberOf=CN=ACCESS_GIT,OU=groups,DC=localdomain,DC=local))', ldap_port => '389', ldap_method => 'plain', - ldap_bind_dn => 'CN=GIT_ADMIN,OU=Users,DC=localdomain,DC=local', + ldap_bind_dn => 'GIT_ADMIN@localdomain.local', ldap_bind_password => 'change_me-GIT_ADMIN_password', ldap_active_directory => true, ldap_block_auto_created_users => false,