jenkins-bot has submitted this change and it was merged.

Change subject: Add 'fundraising' role
......................................................................


Add 'fundraising' role

This patch adds a 'fundraising' role which configures the following things:

 * Switches MediaWiki to 'fundraising/1.22' branch
 * rsyslog w/fundraising configs
 * ContributionTracking, ParserFunctions, FundraisingEmailUnsubscribe &
   DonationInterface MediaWiki extensions

Change-Id: Ifebd54d4307e0ca3997d8572dc93f31a2622fa64
---
M puppet/manifests/roles.pp
M puppet/manifests/site.pp
A puppet/templates/fr-config.php.erb
A puppet/templates/fr-payments-rsyslog.conf.erb
4 files changed, 75 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Mwalker: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index 4f75306..6af7f49 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -60,6 +60,60 @@
 
 }
 
+# == Class: role::fundraising
+# This role configures MediaWiki to use the 'fundraising/1.22' branch
+# and sets up the ContributionTracking, FundraisingEmailUnsubscribe, and
+# DonationInterface extensions.
+class role::fundraising {
+       include role::mediawiki
+
+       $rsyslog_max_message_size = '64k'
+
+       package { 'rsyslog': }
+
+       service { 'rsyslog':
+               ensure     => running,
+               provider   => 'init',
+               require    => Package['rsyslog'],
+               hasrestart => true,
+       }
+
+       file { '/etc/rsyslog.d/60-payments.conf':
+               content => template('fr-payments-rsyslog.conf.erb'),
+               require => Package['rsyslog'],
+               notify  => Service['rsyslog'],
+       }
+
+       exec { 'checkout fundraising branch':
+               command => 'git checkout --track origin/fundraising/1.22',
+               unless  => 'git branch --list | grep -q fundraising/1.22',
+               cwd     => $mediawiki::dir,
+               require => Exec['mediawiki setup'],
+       }
+
+       @mediawiki::extension { [ 'ContributionTracking', 'ParserFunctions' ]: }
+
+       @mediawiki::extension { 'FundraisingEmailUnsubscribe':
+               entrypoint => 'FundraiserUnsubscribe.php',
+       }
+
+       @mediawiki::extension { 'DonationInterface':
+               entrypoint   => 'donationinterface.php',
+               settings     => template('fr-config.php.erb'),
+               needs_update => true,
+               require      => [
+                       File['/etc/rsyslog.d/60-payments.conf'],
+                       Exec['checkout fundraising branch'],
+                       Mediawiki::Extension[
+                               'ContributionTracking',
+                               'FundraisingEmailUnsubscribe',
+                               'ParserFunctions'
+                       ],
+               ],
+       }
+}
+
+
 # == Class: role::eventlogging
 # This role sets up the EventLogging extension for MediaWiki such that
 # events are validated against production schemas but logged locally.
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index a902394..f4df0bd 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -23,6 +23,7 @@
 node 'mediawiki-vagrant' {
        include role::mediawiki
 
+       # include role::fundraising
        # include role::scribunto
        # include role::wikieditor
        # include role::proofreadpage
diff --git a/puppet/templates/fr-config.php.erb 
b/puppet/templates/fr-config.php.erb
new file mode 100644
index 0000000..bfbfbcc
--- /dev/null
+++ b/puppet/templates/fr-config.php.erb
@@ -0,0 +1,15 @@
+$wgDonationInterfaceTestMode = true;
+$wgDonationInterfaceEnableGlobalCollect = true;
+$wgDonationInterfaceEnablePaypal = true;
+
+$DI = "$IP/extensions/DonationInterface";
+$wgGlobalCollectGatewayHtmlFormDir = "$DI/globalcollect_gateway/forms";
+$wgPaypalGatewayHtmlFormDir = "$DI/paypal_gateway/forms";
+$wgPayflowProGatewayHtmlFormDir = "$DI/payflowpro_gateway/forms";
+
+$wgGlobalCollectGatewayAccountInfo['test'] = array(
+    'MerchantID' => 'test'
+);
+
+require_once( "$IP/DonationInterfaceFormSettings.php" );
+$wgDonationInterfaceUseSyslog = true;
diff --git a/puppet/templates/fr-payments-rsyslog.conf.erb 
b/puppet/templates/fr-payments-rsyslog.conf.erb
new file mode 100644
index 0000000..54c4b04
--- /dev/null
+++ b/puppet/templates/fr-payments-rsyslog.conf.erb
@@ -0,0 +1,5 @@
+$MaxMessageSize <%= @rsyslog_max_message_size %>
+if ($programname contains '_payment_in') then /var/log/payments/initial
+       & ~
+if ($programname contains 'globalcollect') then /var/log/payments/globalcollect
+       & ~

-- 
To view, visit https://gerrit.wikimedia.org/r/69618
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifebd54d4307e0ca3997d8572dc93f31a2622fa64
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to