Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/web/manifests/server.pp

Issue 4884212985364480: Allow running multiplexer on web servers (Closed)
Patch Set: Created Dec. 18, 2013, 7:02 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « manifests/webserver.pp ('k') | modules/web/templates/site.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/manifests/server.pp
===================================================================
--- a/modules/web/manifests/server.pp
+++ b/modules/web/manifests/server.pp
@@ -1,9 +1,9 @@
-class web::server($vhost, $repository) {
+class web::server($vhost, $repository, $multiplexer_locations = undef) {
File {
owner => 'root',
group => 'root',
mode => 0644,
}
Cron {
environment => ['MAILTO=admin@adblockplus.org', 'PYTHONPATH=/opt/sitescripts'],
@@ -31,16 +31,35 @@ class web::server($vhost, $repository) {
require => Nginx::Hostconfig[$vhost],
source => 'puppet:///modules/private/adblockplus.org_sslcert.pem',
}
class {'sitescripts':
sitescriptsini_source => 'puppet:///modules/web/sitescripts',
}
+ if $multiplexer_locations != undef {
+ include spawn-fcgi
+ package {['python-flup', 'python-mysqldb']:}
+
+ spawn-fcgi::pool {"multiplexer":
+ ensure => present,
+ fcgi_app => '/opt/sitescripts/multiplexer.fcgi',
+ socket => '/tmp/multiplexer-fastcgi.sock',
+ mode => '0666',
+ user => 'nginx',
+ children => 1,
+ require => [
+ Exec["fetch_sitescripts"],
+ Package["python-flup"],
+ Package["python-mysqldb"],
+ ],
+ }
+ }
+
user {'www':
ensure => present,
comment => 'Web content owner',
home => '/home/www',
managehome => true,
}
exec {"fetch_repo":
« no previous file with comments | « manifests/webserver.pp ('k') | modules/web/templates/site.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld