[Mageia-sysadm] [655] - deploy trunk as a test instance, as asked several time on irc

root at mageia.org root at mageia.org
Wed Jan 5 19:12:51 CET 2011


Revision: 655
Author:   misc
Date:     2011-01-05 19:12:50 +0100 (Wed, 05 Jan 2011)
Log Message:
-----------
- deploy trunk as a test instance, as asked several time on irc

Modified Paths:
--------------
    puppet/modules/catdap/manifests/init.pp

Modified: puppet/modules/catdap/manifests/init.pp
===================================================================
--- puppet/modules/catdap/manifests/init.pp	2011-01-05 13:41:16 UTC (rev 654)
+++ puppet/modules/catdap/manifests/init.pp	2011-01-05 18:12:50 UTC (rev 655)
@@ -1,7 +1,6 @@
 class catdap {
 
-    $catdap_location = "/var/www/identity"
-    $catdap_vhost = "identity.$domain"
+    $upstream_svn = "svn://svn.mageia.org/svn/soft/identity/CatDap/" 
 
     # TODO switch to a proper rpm packaging
     $rpm_requirement = ['perl-Catalyst-Runtime',"perl-FCGI", 'perl-Catalyst-Plugin-Authorization-Roles', 
@@ -17,27 +16,41 @@
         ensure => installed
     }
 
-    subversion::snapshot { $catdap_location:
-        source => "svn://svn.mageia.org/svn/soft/identity/CatDap/branches/live"
-    }
-
     $ldap_password = extlookup('catdap_ldap','x')
     
-    file { "$catdap_location/catdap_local.yml":
-        ensure => present,
-        owner => root,
-        group => apache,
-        mode => 640,
-        content => template("catdap/catdap_local.yml"),
-        require => Subversion::Snapshot[$catdap_location]
+   
+
+    define catdap_snapshot($location, $svn_location) {
+        file { "$location/catdap_local.yml":
+            ensure => present,
+            owner => root,
+            group => apache,
+            mode => 640,
+            content => template("catdap/catdap_local.yml"),
+            require => Subversion::Snapshot[$location],
+        }
+
+        subversion::snapshot { $location:
+            source => $svn_location
+        }
+
+        apache::vhost_catalyst_app { $name:
+            script => "$location/script/catdap_fastcgi.pl",
+            location => $location,
+            use_ssl => true,
+        }
+
+        apache::vhost_redirect_ssl { $name: }
     }
 
-    apache::vhost_catalyst_app { $catdap_vhost:
-        script => "$catdap_location/script/catdap_fastcgi.pl",
-        location => $catdap_location,
-        use_ssl => true,
+    catdap_snapshot { "identity.$domain":
+        location => "/var/www/identity",
+        svn_location => "$upstream_svn/branches/live" 
     }
 
-    apache::vhost_redirect_ssl { $catdap_vhost: }
+    catdap_snapshot { "identity-trunk.$domain":
+        location => "/var/www/identity-trunk",
+        svn_location => "$upstream_svn/trunk" 
+    }
 
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110105/6f9d880c/attachment-0001.html>


More information about the Mageia-sysadm mailing list