[Mageia-sysadm] [90] - add a catdap module
root at mageia.org
root at mageia.org
Thu Nov 4 17:57:29 CET 2010
Revision: 90
Author: misc
Date: 2010-11-04 17:57:29 +0100 (Thu, 04 Nov 2010)
Log Message:
-----------
- add a catdap module
Added Paths:
-----------
puppet/modules/catdap/
puppet/modules/catdap/manifests/
puppet/modules/catdap/manifests/init.pp
puppet/modules/catdap/templates/
puppet/modules/catdap/templates/catdap_local.yml
puppet/modules/catdap/templates/catdap_vhost.conf
Added: puppet/modules/catdap/manifests/init.pp
===================================================================
--- puppet/modules/catdap/manifests/init.pp (rev 0)
+++ puppet/modules/catdap/manifests/init.pp 2010-11-04 16:57:29 UTC (rev 90)
@@ -0,0 +1,43 @@
+class catdap {
+
+ include subversion
+ include subversion::client
+ include apache::mod_fcgid
+
+ $catdap_location = "/var/www/identity"
+
+ # TODO switch to a proper rpm packaging
+ $rpm_requirement = ['perl-Catalyst-Runtime',
+"perl-Catalyst-Action-RenderView", "perl-Catalyst-Model-LDAP-FromAuthentication", "perl-Catalyst-P-A-Store-LDAP", "perl-Catalyst-Plugin-Authentication", "perl-Catalyst-Plugin-Captcha",
+"perl-Catalyst-Plugin-ConfigLoader", "perl-Catalyst-Plugin-I18N", "perl-Catalyst-Plugin-Session-Store-File", "perl-Catalyst-Plugin-Static-Simple",
+"perl-Catalyst-P-S-State-Cookie", "perl-Catalyst-P-S-Store-File", "perl-Catalyst-Runtime", "perl-Catalyst-View-Email",
+"perl-Catalyst-View-TT", "perl-Config-General", "perl-Crypt-CBC", "perl-Data-UUID",
+"perl-Email-Valid", "perl-Moose", "perl-namespace-autoclean", "perl-Test-Simple" ]
+
+ package { $rpm_requirement:
+ ensure => installed
+ }
+
+ subversion::snapshot { $catdap_location:
+ source => "svn+ssh://svn.mageia.org/srv/mx2-dd0/svn/soft/identity/CatDap/branches/live"
+ }
+
+ # add a catdap config file
+ file { "$catdap_location/catdap_local.yml":
+ ensure => present,
+ owner => apache,
+ mode => 600,
+ content => template("catdap/catdap_local.yml")
+ }
+
+ # add a apache vhost
+ file { "identity.$domain.conf":
+ path => "/etc/httpd/conf/vhosts.d/$name",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Service['apache'],
+ content => template("catdap/catdap_vhost.conf")
+ }
+}
Added: puppet/modules/catdap/templates/catdap_local.yml
===================================================================
--- puppet/modules/catdap/templates/catdap_local.yml (rev 0)
+++ puppet/modules/catdap/templates/catdap_local.yml 2010-11-04 16:57:29 UTC (rev 90)
@@ -0,0 +1,37 @@
+<%
+# domain come from facter
+
+dc_suffix = 'dc=' + domain.gsub('.',',dc=')
+
+ldap_server = 'ldap' + domain
+
+ldap_password = extlookup('catdap_password')
+
+ldap_account = 'cn=catdap-valstar,ou=System Accounts,' + dc_suffix
+%>
+
+organisation: Mageia
+apptitle: Mageia Identity Management
+emailfrom: noreply@<%= domain %>
+
+Model::Proxy:
+ base: ou=People,<%= dc_suffix %>
+ dn: <%= ldap_account %>
+ password: <%= ldap_password %>
+
+Model::User:
+ base: <%= dc_suffix %>
+ host: <%= ldap_server %>
+ start_tls: 1
+
+authentication:
+ default_realm: ldap
+ realms:
+ ldap:
+ store:
+ ldap_server: <%= ldap_server %>
+ binddn: <%= dc_suffix %>
+ bindpw: <%= ldap_password %>
+ user_basedn: ou=People,<%= dc_suffix %>
+ role_basedn: <%= dc_suffix %>
+
Added: puppet/modules/catdap/templates/catdap_vhost.conf
===================================================================
--- puppet/modules/catdap/templates/catdap_vhost.conf (rev 0)
+++ puppet/modules/catdap/templates/catdap_vhost.conf 2010-11-04 16:57:29 UTC (rev 90)
@@ -0,0 +1,15 @@
+<VirtualHost *:80>
+ ServerName identity.<%= domain %>
+ # Serve static content directly
+ DocumentRoot <%= catdap_location %>/root
+ Alias /static <%= catdap_location %>/root/static
+
+ Alias / <%= catdap_location %>/script/catdap_fastcgi.pl/
+
+ <Directory <%= catdap_location %>/script>
+ Options +ExecCGI
+ SetHandler fcgid-script
+ Allow from all
+ </Directory>
+</VirtualHost>
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101104/95f17423/attachment.html>
More information about the Mageia-sysadm
mailing list