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

Unified Diff: manifests/issuesserver.pp

Issue 5735669590654976: #753 - set up an order system to let eyeo employees file order requests (Closed)
Patch Set: #753 - set up an order system to let eyeo employees file order requests Created July 29, 2014, 11:18 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 | « no previous file | modules/discourse/manifests/init.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: manifests/issuesserver.pp
===================================================================
--- a/manifests/issuesserver.pp
+++ b/manifests/issuesserver.pp
@@ -1,5 +1,6 @@
node 'issues1' {
- include base
+
+ include base, private::trac
class {'trac':
domain => 'issues.adblockplus.org',
@@ -8,6 +9,58 @@
is_default => true,
}
+ trac::instance {'trac':
+ config => 'trac/trac.ini.erb',
+ description => 'Adblock Plus Issue Tracker',
+ environment => 'environment',
+ location => '/',
+ logo => 'adblockplus_logo.png',
+ database => 'trac',
+ permissions => "puppet:///modules/trac/permissions.csv",
+ }
+
+ trac::instance {'orders':
+ config => 'trac/orders.ini.erb',
+ description => 'Eyeo Order System',
+ environment => 'environment-orders',
+ location => '/orders',
+ logo => 'eyeo_logo.png',
+ database => 'trac_orders',
+ permissions => "puppet:///modules/trac/order-permissions.csv",
+ }
+
+ # Transforming the auth_cookie table of the "new" Trac project into an
+ # insertable view for the "old" project's table of the same name avoids
+ # the need to convert the entire auth to htpasswd-file handling, which
+ # would be the official way to go for achieving a shared authentication.
+ exec { 'trac_auth_cookie_federated':
+ command => "mysql -utrac -p'${private::trac::database_password}' trac_orders --execute '
+ CREATE VIEW auth_cookie_view AS SELECT * FROM trac.auth_cookie;
+ RENAME TABLE auth_cookie TO auth_cookie_original, auth_cookie_view TO auth_cookie;'",
+ unless => "mysql -utrac -p'${private::trac::database_password}' trac_orders --execute '
+ SHOW CREATE TABLE auth_cookie' | grep VIEW",
+ path => "/usr/bin:/usr/sbin:/bin:/usr/local/bin",
+ require => [
+ Exec["deploy_trac"],
+ Exec["deploy_orders"],
+ ],
+ }
+
+ # Synchronizing e-mail and password information between the project
+ # allows for logging in from any entry point - whilst maintaining a
+ # registration form (and process) in one project only.
+ cron {'trac_session_attribute_sync':
+ ensure => present,
+ user => trac,
+ minute => '*/30',
+ command => "mysql -utrac -p'${private::trac::database_password}' trac_orders --execute ' \
+ INSERT INTO session_attribute (sid, authenticated, name, value) SELECT sid, authenticated, name, value \
+ FROM trac.session_attribute WHERE authenticated = 1 AND name IN (\"email\", \"password\") \
+ ON DUPLICATE KEY UPDATE value=VALUES(value) ' >/dev/null
+ ",
+ require => Exec['trac_auth_cookie_federated'],
+ }
+
class {'nagios::client':
server_address => 'monitoring.adblockplus.org'
}
« no previous file with comments | « no previous file | modules/discourse/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld