Puppet Class: payments

Defined in:
puppet/modules/payments/manifests/init.pp

Overview

Class: payments

Provision a payments wiki using the fundraising deployment branch.

This role creates one additional wiki, payments.wiki.local.wmftest.net

TODO

* Push wiki config down into the payments_wiki module.

* There is some duplication between ::mediawiki and ::role::payments
that probably could be factored out into a ::mediawiki::branch define and
made to work a little more smoothly

Parameters

branch

Branch of mediawiki/core.git to clone

dir

Directory to place MediaWiki clone in

Parameters:

  • branch (Any)
  • dir (Any)
  • drupal_db (Any)
  • drupal_db_user (Any)
  • drupal_db_pass (Any)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'puppet/modules/payments/manifests/init.pp', line 20

class payments(
    $branch,
    $dir,
    $drupal_db,
    $drupal_db_user,
    $drupal_db_pass,
) {
  include ::payments::donation_interface
  include ::crm

  git::clone { 'mediawiki-core-fr':
    remote    => 'https://gerrit.wikimedia.org/r/p/mediawiki/core.git',
    directory => $dir,
    branch    => $branch,
  }

  php::composer::install { 'mediawiki-dependencies':
    directory => $dir,
    require   => Git::Clone['mediawiki-core-fr'],
  }

  mediawiki::wiki { 'payments':
    src_dir => $dir,
    require => [
      Git::Clone['mediawiki-core-fr'],
      Mediawiki::Wiki[$::mediawiki::wiki_name],
      Php::Composer::Install['mediawiki-dependencies'],
    ],
  }

  mediawiki::extension { [
    'payments:ParserFunctions',
  ]: }

  mediawiki::extension { 'payments:FundraisingEmailUnsubscribe':
    needs_update => true,
    settings     => {
      'wgFundraisingEmailUnsubscribeQueueParameters' => {
        'unsubscribe' => {
          'servers' => {
            'scheme' => 'tcp',
            'host'   => 'localhost',
            'port'   => 6379,
          },
        },
        'opt-in'      => {
          'servers' => {
            'scheme' => 'tcp',
            'host'   => 'localhost',
            'port'   => 6379,
          },
        },
      },
    },
  }

  mediawiki::import::text { 'payments:Main_Page':
      # N.b. - Creepy abnormal multiwiki syntax
      wiki       => 'payments',
      db_name    => 'paymentswiki',
      page_title => 'Main_Page',
      source     => 'puppet:///modules/payments/Main_Page.wiki',
  }

  mediawiki::import::text { 'payments:Donate-error':
      wiki       => 'payments',
      db_name    => 'paymentswiki',
      page_title => 'Donate-error',
      source     => 'puppet:///modules/payments/Donate-error.wiki',
  }

  mediawiki::import::text { 'payments:Donate-thanks':
      wiki       => 'payments',
      db_name    => 'paymentswiki',
      page_title => 'Donate-thanks',
      source     => 'puppet:///modules/payments/Donate-thanks.wiki',
  }

  mediawiki::import::text { 'payments:Template:LanguageSwitch':
      wiki       => 'payments',
      db_name    => 'paymentswiki',
      page_title => 'Template:LanguageSwitch',
      source     => 'puppet:///modules/payments/LanguageSwitch.wiki',
  }

  mediawiki::import::text { 'payments:Template:2011FR/JimmyQuote/text/en':
      wiki       => 'payments',
      db_name    => 'paymentswiki',
      page_title => 'Template:2011FR/JimmyQuote/text/en',
      source     => 'puppet:///modules/payments/Appeal.wiki',
  }
}