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

Change subject: Add roles for VisualEditor, EventLogging, MobileFrontend, Echo 
and GettingStarted
......................................................................


Add roles for VisualEditor, EventLogging, MobileFrontend, Echo and 
GettingStarted

Change-Id: I7afe5f59ca2b07170bba59a968ed6891504197f7
---
M puppet/manifests/roles.pp
M puppet/manifests/site.pp
A puppet/templates/ve-config.php.erb
3 files changed, 104 insertions(+), 5 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index 0cebd73..e23bbbb 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -10,22 +10,23 @@
 # To enable a particular role on your instance, include it in the
 # mediawiki-vagrant node definition in 'site.pp'.
 #
-#
 
 
 # == Class: role::generic
 # Configures common tools and shell enhancements.
 class role::generic {
-       class { '::apt':
+       class { 'apt':
                stage => first,
        }
-       class { '::misc': }
-       class { '::git': }
+       class { 'misc': }
+       class { 'git': }
 }
 
 # == Class: role::mediawiki
 # Provisions a MediaWiki instance powered by PHP, MySQL, and memcached.
 class role::mediawiki {
+       include role::generic
+
        $wiki_name = 'devwiki'
        $server_url = 'http://127.0.0.1:8080'
        $dir = '/vagrant/mediawiki'
@@ -56,12 +57,87 @@
                dir        => $dir,
                server_url => $server_url,
        }
+
+}
+
+# == Class: role::eventlogging
+# This role sets up the EventLogging extension for MediaWiki such that
+# events are validated against production schemas but logged locally.
+class role::eventlogging {
+       include role::mediawiki
+
+       mediawiki::extension { 'EventLogging':
+               priority => 5,
+               settings => {
+                       # Work with production schemas but log locally:
+                       wgEventLoggingBaseUri        => 
'http://localhost:8100/event.gif',
+                       wgEventLoggingFile           => 
'/vagrant/logs/eventlogging.log',
+                       wgEventLoggingSchemaIndexUri => 
'http://meta.wikimedia.org/w/index.php',
+                       wgEventLoggingDBname         => 'metawiki',
+               }
+       }
+}
+
+# == Class: role::mobilefrontend
+# Configures this machine to run the Wikimedia Foundation's set of
+# Selenium browser tests for MediaWiki instances.
+class role::mobilefrontend {
+       include role::mediawiki
+       include role::eventlogging
+
+       mediawiki::extension { 'MobileFrontend':
+               settings => {
+                       wgMFForceSecureLogin => false,
+                       wgMFLogEvents        => true,
+               }
+       }
+}
+
+# == Class: role::gettingstarted
+# Configures the GettingStarted extension and its dependency, redis.
+class role::gettingstarted {
+       include role::mediawiki
+       include role::eventlogging
+
+       class { 'redis': }
+
+       mediawiki::extension { 'GettingStarted':
+               settings => {
+                       wgGettingStartedRedis => '127.0.0.1',
+               },
+       }
+}
+
+# == Class: role::echo
+# Configures Echo, a MediaWiki notification framework.
+class role::echo {
+       include role::mediawiki
+       include role::eventlogging
+
+       mediawiki::extension { 'Echo':
+               needs_update => true,
+               settings     => {
+                       wgEchoEnableEmailBatch => false,
+               },
+       }
+}
+
+# == Class: role::visualeditor
+class role::visualeditor {
+       include role::mediawiki
+
+       class { '::mediawiki::parsoid': }
+       mediawiki::extension { 'VisualEditor':
+               settings => template('ve-config.php.erb'),
+       }
 }
 
 # == Class: role::browsertests
 # Configures this machine to run the Wikimedia Foundation's set of
 # Selenium browser tests for MediaWiki instances.
 class role::browsertests {
+       include role::mediawiki
+
        class { '::browsertests': }
 }
 
@@ -70,5 +146,7 @@
 # interface for obtaining aggregate measurements of user activity on
 # MediaWiki sites.
 class role::umapi {
+       include role::mediawiki
+
        class { '::user_metrics': }
 }
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index 9eb694a..815b0ec 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -21,6 +21,13 @@
 import 'roles.pp'
 
 node 'mediawiki-vagrant' {
-       include role::generic
        include role::mediawiki
+
+       # include role::visualeditor
+       # include role::browsertests
+       # include role::echo
+       # include role::eventlogging
+       # include role::gettingstarted
+       # include role::mobilefrontend
+       # include role::umapi
 }
diff --git a/puppet/templates/ve-config.php.erb 
b/puppet/templates/ve-config.php.erb
new file mode 100644
index 0000000..c6a0f6f
--- /dev/null
+++ b/puppet/templates/ve-config.php.erb
@@ -0,0 +1,14 @@
+// 
http://www.mediawiki.org/wiki/Extension:VisualEditor#Basic_setup_instructions
+
+define( 'NS_VISUALEDITOR', 2500 );
+define( 'NS_VISUALEDITOR_TALK', 2501 );
+$wgExtraNamespaces[NS_VISUALEDITOR] = 'VisualEditor';
+$wgExtraNamespaces[NS_VISUALEDITOR_TALK] = 'VisualEditor_talk';
+
+$wgVisualEditorNamespaces = array();
+$wgVisualEditorNamespaces[] = NS_VISUALEDITOR;
+
+$wgDefaultUserOptions['visualeditor-enable'] = 1;
+$wgHiddenPrefs[] = 'visualeditor-enable';
+
+$wgVisualEditorParsoidURL = 'http://localhost:<%= 
scope.lookupvar("mediawiki::parsoid::port") %>';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7afe5f59ca2b07170bba59a968ed6891504197f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[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