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

Change subject: Get Cirrus's browser tests working
......................................................................


Get Cirrus's browser tests working

* Add some extra configuration to the Cirrus role that the browser tests
expect
* Remove some overrides in other roles that lower the amount of ram available
to jobs and cause the in process runJobs to fail.
* Add instructions to setup port forwarding for Elasticsearch.
* Remove Elastica submodule update as we're not using a submodule for that
any more.
* Raise RAM to 1G or we won't have room for Elasticsearch and any disk cache.
* Lower Elasticsearch heap space to 256m.  It'll use more then that, but not
too much more.

Change-Id: I893b8f487b3f760fad9962486fd9c668c53cf378
---
M Vagrantfile
M puppet/manifests/roles/cirrussearch.pp
M puppet/manifests/roles/pdfhandler.pp
M puppet/manifests/roles/proofreadpage.pp
A puppet/modules/elasticsearch/files/defaults
M puppet/modules/elasticsearch/manifests/init.pp
M puppet/modules/elasticsearch/templates/CirrusSearch.php.erb
M support/Vagrantfile-extra.rb
8 files changed, 87 insertions(+), 13 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Vagrantfile b/Vagrantfile
index c451c97..c5f7c25 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -70,7 +70,7 @@
 
     config.vm.provider :virtualbox do |vb|
         # See http://www.virtualbox.org/manual/ch08.html for additional 
options.
-        vb.customize ['modifyvm', :id, '--memory', '768']
+        vb.customize ['modifyvm', :id, '--memory', '1024']
         vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu_64']
         vb.customize ['modifyvm', :id, '--ioapic', 'on']  # Bug 51473
 
@@ -112,7 +112,10 @@
 
 begin
     # Load custom Vagrantfile overrides from 'Vagrantfile-extra.rb'
-    # See 'support/Vagrantfile-extra.rb' for an example.
+    # See 'support/Vagrantfile-extra.rb' for an example but make sure to folow
+    # the instructions in that file.  In particular it is important to copy it
+    # to the parent directory.  Editing it without copying it will only cause
+    # sadness.
     require File.join($DIR, 'Vagrantfile-extra')
 rescue LoadError
     # OK. File does not exist.
diff --git a/puppet/manifests/roles/cirrussearch.pp 
b/puppet/manifests/roles/cirrussearch.pp
index 9efcb8b..1423fd5 100644
--- a/puppet/manifests/roles/cirrussearch.pp
+++ b/puppet/manifests/roles/cirrussearch.pp
@@ -3,6 +3,8 @@
 # Elasticsearch.
 class role::cirrussearch {
     include role::mediawiki
+    include role::timedmediahandler
+    include role::pdfhandler
 
     class { '::elasticsearch': }
 
@@ -13,14 +15,6 @@
         require  => Service['elasticsearch'],
     }
 
-    exec { 'update elastica submodule':
-        cwd     => "${mediawiki::dir}/extensions/Elastica",
-        command => 'git submodule update --init Elastica',
-        require => Mediawiki::Extension['Elastica'],
-        unless  => 'git submodule status Elastica | grep -q head',
-        before  => Mediawiki::Extension['CirrusSearch'],
-    }
-
     exec { 'build CirrusSearch search index':
         command     => 'php ./maintenance/updateSearchIndexConfig.php && php 
./maintenance/forceSearchIndex.php && touch .indexed',
         creates     => '/vagrant/mediawiki/extensions/CirrusSearch/.indexed',
@@ -28,4 +22,5 @@
         require     =>  Mediawiki::Extension['CirrusSearch'],
     }
 
+    notice('If you want to debug Elasticsearch queries you should forward port 
9200 from the VM.  See supprt/Vagrantfile-extra.rb for instructions.')
 }
diff --git a/puppet/manifests/roles/pdfhandler.pp 
b/puppet/manifests/roles/pdfhandler.pp
index 1574577..ec29efd 100644
--- a/puppet/manifests/roles/pdfhandler.pp
+++ b/puppet/manifests/roles/pdfhandler.pp
@@ -17,7 +17,6 @@
         require      => Package['ghostscript', 'imagemagick', 'poppler-utils'],
         settings     => [
             '$wgEnableUploads = true',
-            '$wgMaxShellMemory = 300000',
             '$wgFileExtensions[] = \'pdf\'',
         ],
     }
diff --git a/puppet/manifests/roles/proofreadpage.pp 
b/puppet/manifests/roles/proofreadpage.pp
index bf2438e..258f4c3 100644
--- a/puppet/manifests/roles/proofreadpage.pp
+++ b/puppet/manifests/roles/proofreadpage.pp
@@ -27,7 +27,6 @@
             '$wgEnableUploads = true',
             '$wgFileExtensions[] = "djvu"',
             '$wgFileExtensions[] = "pdf"',
-            '$wgMaxShellMemory = 300000',
             '$wgDjvuDump = "djvudump"',
             '$wgDjvuRenderer = "ddjvu"',
             '$wgDjvuTxt = "djvutxt"',
diff --git a/puppet/modules/elasticsearch/files/defaults 
b/puppet/modules/elasticsearch/files/defaults
new file mode 100644
index 0000000..ad47758
--- /dev/null
+++ b/puppet/modules/elasticsearch/files/defaults
@@ -0,0 +1,44 @@
+# Run ElasticSearch as this user ID and group ID
+#ES_USER=elasticsearch
+#ES_GROUP=elasticsearch
+
+# Heap Size (defaults to 256m min, 1g max)
+ES_HEAP_SIZE=256m
+
+# Heap new generation
+#ES_HEAP_NEWSIZE=
+
+# max direct memory
+#ES_DIRECT_SIZE=
+
+# Maximum number of open files, defaults to 65535.
+#MAX_OPEN_FILES=65535
+
+# Maximum locked memory size. Set to "unlimited" if you use the
+# bootstrap.mlockall option in elasticsearch.yml. You must also set
+# ES_HEAP_SIZE.
+#MAX_LOCKED_MEMORY=unlimited
+
+# Maximum number of VMA (Virtual Memory Areas) a process can own
+#MAX_MAP_COUNT=262144
+
+# ElasticSearch log directory
+#LOG_DIR=/var/log/elasticsearch
+
+# ElasticSearch data directory
+#DATA_DIR=/var/lib/elasticsearch
+
+# ElasticSearch work directory
+#WORK_DIR=/tmp/elasticsearch
+
+# ElasticSearch configuration directory
+#CONF_DIR=/etc/elasticsearch
+
+# ElasticSearch configuration file (elasticsearch.yml)
+#CONF_FILE=/etc/elasticsearch/elasticsearch.yml
+
+# Additional Java OPTS
+#ES_JAVA_OPTS=
+
+# Configure restart on package upgrade (true, every other setting will lead to 
not restarting)
+#RESTART_ON_UPGRADE=true
diff --git a/puppet/modules/elasticsearch/manifests/init.pp 
b/puppet/modules/elasticsearch/manifests/init.pp
index 08a02ef..08afeab 100644
--- a/puppet/modules/elasticsearch/manifests/init.pp
+++ b/puppet/modules/elasticsearch/manifests/init.pp
@@ -17,4 +17,10 @@
         enable  => true,
         require => Package['elasticsearch', 'openjdk-7-jre-headless'],
     }
+
+    file { '/etc/default/elasticsearch':
+        source  => 'puppet:///modules/elasticsearch/defaults',
+        require => Package['elasticsearch'],
+        notify  => Service['elasticsearch'],
+    }
 }
diff --git a/puppet/modules/elasticsearch/templates/CirrusSearch.php.erb 
b/puppet/modules/elasticsearch/templates/CirrusSearch.php.erb
index bd26ef9..1c310fa 100644
--- a/puppet/modules/elasticsearch/templates/CirrusSearch.php.erb
+++ b/puppet/modules/elasticsearch/templates/CirrusSearch.php.erb
@@ -1 +1,24 @@
-$wgSearchType = 'CirrusSearch';
\ No newline at end of file
+$wgSearchType = 'CirrusSearch';
+$wgGroupPermissions[ '*' ][ 'deleterevision' ] = true;
+$wgUseInstantCommons = true;
+$wgCapitalLinks = false;
+$wgEnableUploads = true;
+$wgCirrusSearchShowScore = true;
+$wgShowExceptionDetails = true;
+$wgJobTypeConf['default'] = array(
+       'class' => 'JobQueueRedis',
+       'order' => 'fifo',
+       'redisServer' => 'localhost',
+       'checkDelay' => true,
+       'maximumPeriodicTaskSeconds' => 1,
+       'redisConfig' => array(
+               'password' => '',
+       ),
+);
+$wgJobQueueAggregator = array(
+       'class'       => 'JobQueueAggregatorRedis',
+       'redisServer' => 'localhost',
+       'redisConfig' => array(
+               'password' => '',
+       ),
+);
diff --git a/support/Vagrantfile-extra.rb b/support/Vagrantfile-extra.rb
index 275cf85..194f906 100644
--- a/support/Vagrantfile-extra.rb
+++ b/support/Vagrantfile-extra.rb
@@ -36,4 +36,9 @@
     # Sequel Pro) to manage the database server running on the VM.
     # config.vm.network :forwarded_port,
     #    guest: 3306, host: 3306, id: 'mysql'
+
+    # Forward Elasticsearch port.  This allows you to debug Elasticsearch
+    # queries easilly with something like the Sense Chrome Plugin.
+    # config.vm.network :forwarded_port,
+    #     guest: 9200, host: 9200, id: 'elasticsearch'
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I893b8f487b3f760fad9962486fd9c668c53cf378
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to