Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/92058
Change subject: Add betawiki cronjobs to puppet ...................................................................... Add betawiki cronjobs to puppet Change-Id: I6cd2b9c77452aa95e825ef2b1df025440ed0f970 --- A puppet/modules/wiki/manifests/init.pp A puppet/modules/wiki/templates/wikibackup.erb A puppet/modules/wiki/templates/wikimaintenance.erb A puppet/modules/wiki/templates/wikiservices.erb A puppet/modules/wiki/templates/wikistats.erb M puppet/site.pp 6 files changed, 74 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/58/92058/1 diff --git a/puppet/modules/wiki/manifests/init.pp b/puppet/modules/wiki/manifests/init.pp new file mode 100644 index 0000000..559c832 --- /dev/null +++ b/puppet/modules/wiki/manifests/init.pp @@ -0,0 +1,35 @@ +# = Class: wiki +# +# Configures various wiki stuff. Now mostly crontabs. +# +# == Parameters: +# +# $config:: Where the wiki config is stored. +# +# $user:: What user owns the wiki stuff. +# +# +# == Sample Usage: +# +# class { 'wiki': +# config => '/home/betawiki/config', +# user => 'betawiki', +# } +# +class wiki { + file { "/etc/cron.d/wikibackup": + content => template("wiki/wikibackup.erb"), + } + + file { "/etc/cron.d/wikimaintenance": + content => template("wiki/wikimaintenance.erb"), + } + + file { "/etc/cron.d/wikiservices": + content => template("wiki/wikiservices.erb"), + } + + file { "/etc/cron.d/wikistats": + content => template("wiki/wikistats.erb"), + } +} diff --git a/puppet/modules/wiki/templates/wikibackup.erb b/puppet/modules/wiki/templates/wikibackup.erb new file mode 100644 index 0000000..4852ee5 --- /dev/null +++ b/puppet/modules/wiki/templates/wikibackup.erb @@ -0,0 +1,2 @@ +# file managed by puppet +@daily <%= @user %> /home/betawiki/backup.sh diff --git a/puppet/modules/wiki/templates/wikimaintenance.erb b/puppet/modules/wiki/templates/wikimaintenance.erb new file mode 100644 index 0000000..47d2211 --- /dev/null +++ b/puppet/modules/wiki/templates/wikimaintenance.erb @@ -0,0 +1,3 @@ +# file managed by puppet +* * * * * <%= @user %> nice php /www/translatewiki.net/w/maintenance/runJobs.php --exclusive --maxtime=50 --procs=1 --memory-limit=250M >> /www/translatewiki.net/w/logs/jobqueue 2> /dev/null +*/5 * * * * <%= @user %> nice php /www/sandbox.translatewiki.net/w/maintenance/runJobs.php --exclusive --maxtime=50 --procs=1 --memory-limit=250M >> /www/sandbox.translatewiki.net/w/logs/jobqueue 2> /dev/null diff --git a/puppet/modules/wiki/templates/wikiservices.erb b/puppet/modules/wiki/templates/wikiservices.erb new file mode 100644 index 0000000..73a153c --- /dev/null +++ b/puppet/modules/wiki/templates/wikiservices.erb @@ -0,0 +1,3 @@ +# file managed by puppet +@reboot <%= @user %> <%= @config %>/irc-relay/screen-init.sh +@reboot <%= @user %> <%= @config %>/bin/solr-init diff --git a/puppet/modules/wiki/templates/wikistats.erb b/puppet/modules/wiki/templates/wikistats.erb new file mode 100644 index 0000000..83ee6e2 --- /dev/null +++ b/puppet/modules/wiki/templates/wikistats.erb @@ -0,0 +1,26 @@ +# file managed by puppet +45 21 * * * <%= @user %> <%= @config %>/bin/stats-mediawiki >> /dev/null 2>&1 +31 22 * * * <%= @user %> <%= @config %>/bin/stats-eol >> /dev/null 2>&1 +32 22 * * * <%= @user %> <%= @config %>/bin/stats-freecol >> /dev/null 2>&1 +33 22 * * * <%= @user %> <%= @config %>/bin/stats-fudforum >> /dev/null 2>&1 +34 22 * * * <%= @user %> <%= @config %>/bin/stats-ihris >> /dev/null 2>&1 +35 22 * * * <%= @user %> <%= @config %>/bin/stats-kiwix >> /dev/null 2>&1 +36 22 * * * <%= @user %> <%= @config %>/bin/stats-mantis >> /dev/null 2>&1 +37 22 * * * <%= @user %> <%= @config %>/bin/stats-mifos >> /dev/null 2>&1 +38 22 * * * <%= @user %> <%= @config %>/bin/stats-mwlibrl >> /dev/null 2>&1 +40 22 * * * <%= @user %> <%= @config %>/bin/stats-okawix >> /dev/null 2>&1 +41 22 * * * <%= @user %> <%= @config %>/bin/stats-openimages >> /dev/null 2>&1 +43 22 * * * <%= @user %> <%= @config %>/bin/stats-osm >> /dev/null 2>&1 +44 22 * * * <%= @user %> <%= @config %>/bin/stats-pywikibot >> /dev/null 2>&1 +45 22 * * * <%= @user %> <%= @config %>/bin/stats-shapado >> /dev/null 2>&1 +47 22 * * * <%= @user %> <%= @config %>/bin/stats-intuition >> /dev/null 2>&1 +48 22 * * * <%= @user %> <%= @config %>/bin/stats-wikia >> /dev/null 2>&1 +49 22 * * * <%= @user %> <%= @config %>/bin/stats-wikiblame >> /dev/null 2>&1 +50 22 * * * <%= @user %> <%= @config %>/bin/stats-wikireader >> /dev/null 2>&1 + +53 23 * * * <%= @user %> <%= @config %>/bin/50-wikimedia >> /dev/null 2>&1 +54 23 * * * <%= @user %> <%= @config %>/bin/stats-translatewiki >> /dev/null 2>&1 +55 23 * * * <%= @user %> <%= @config %>/bin/stats-someextensions >> /dev/null 2>&1 + +# Creation of https://translatewiki.net/static/stats/wmf.csv +34 4 * * 4 <%= @user %> <%= @config %>/bin/stats-wmf >> /dev/null 2>&1 diff --git a/puppet/site.pp b/puppet/site.pp index 73862d5..cb9c2d8 100644 --- a/puppet/site.pp +++ b/puppet/site.pp @@ -15,6 +15,11 @@ include exim-conf include logrotate + class { 'wiki': + config => '/home/betawiki/config', + user => 'betawiki', + } + package { 'elasticsearch': provider => dpkg, ensure => latest, -- To view, visit https://gerrit.wikimedia.org/r/92058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cd2b9c77452aa95e825ef2b1df025440ed0f970 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits