DrTrigon has uploaded a new change for review. https://gerrit.wikimedia.org/r/124170
Change subject: migration; pmtpa Tool Labs -> eqiad ...................................................................... migration; pmtpa Tool Labs -> eqiad Change-Id: Ia292c1fa44a854430ce74a07a94d9fcb2c49ce3f --- A .lighttpd.conf M fabfile.py M public_html/cgi-bin/ps_config.py 3 files changed, 29 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/drtrigonbot refs/changes/70/124170/1 diff --git a/.lighttpd.conf b/.lighttpd.conf new file mode 100644 index 0000000..f453796 --- /dev/null +++ b/.lighttpd.conf @@ -0,0 +1,23 @@ +# https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Web_services +# modify <toolname> for your tool + +debug.log-request-handling = "enable" +fastcgi.debug = 1 + +$HTTP["url"] =~ "^/drtrigonbot/cgi-bin" { + cgi.assign = ( "" => "" ) +} + +# Enable basic directory index +$HTTP["url"] =~ "^/?" { + dir-listing.activate = "enable" +} + +# Add custom mimetype (enable display of text files in browser) +mimetype.assign += ( "" => "text/plain" ) +mimetype.assign += ( ".log*" => "text/plain" ) + +# this will enable counters http://tools.wmflabs.org/<toolname>/server-status (resp: .../server-statistics) +server.modules += ("mod_status") +status.status-url = "/drtrigonbot/server-status" +status.statistics-url = "/drtrigonbot/server-statistics" diff --git a/fabfile.py b/fabfile.py index 1afde96..44e7ab2 100644 --- a/fabfile.py +++ b/fabfile.py @@ -127,15 +127,14 @@ def setup(): - """ I.1) setup home directory structure and .htaccess files """ + """ I.1) setup home directory structure """ local('mkdir BAK_DIR') local('mkdir data') local('mkdir data/subster') local('mkdir data/sum_disc') if LABS: # labs-tools - local('echo Options +Indexes > public_html/.htaccess') + local('mkdir public_html/cgi-bin') local('mkdir public_html/logs') # contains symlinks - local('echo AddType text/plain .log > public_html/logs/.htaccess') local('mkdir public_html/logs/archive') # target for log archive local('mkdir public_html/logs/sge') # sge stdout/-err files else: # toolserver @@ -163,14 +162,13 @@ _clean_git(repos=['pywikibot-drtrigonbot/',]) if LABS: # labs-tools # local('cp -r pywikibot-drtrigonbot/public_html/cgi-bin/* cgi-bin/') - local('ln -s ~/pywikibot-drtrigonbot/public_html/cgi-bin/* cgi-bin/') local('ln -s ~/pywikibot-drtrigonbot/public_html/SearchRequest.xml public_html/SearchRequest.xml') local('ln -s ~/pywikibot-drtrigonbot/public_html/batch.css public_html/batch.css') local('ln -s ~/pywikibot-drtrigonbot/public_html/jira.webresources:global-static.css public_html/jira.webresources:global-static.css') else: # toolserver # local('cp -r pywikibot-drtrigonbot/public_html/* public_html/') local('ln -s ~/pywikibot-drtrigonbot/public_html/tsnotice.css public_html/tsnotice.css') - local('ln -s ~/pywikibot-drtrigonbot/public_html/cgi-bin/* public_html/cgi-bin/') + local('ln -s ~/pywikibot-drtrigonbot/public_html/cgi-bin/* public_html/cgi-bin/') local('ln -s ~/pywikibot-drtrigonbot/public_html/index.html public_html/index.html') def dl_compat(): @@ -201,6 +199,8 @@ local('ln -s pywikibot-drtrigonbot/.forward .forward') if LABS: # labs-tools local('ln -s pywikibot-drtrigonbot/.description .description') + local('ln -s pywikibot-drtrigonbot/.lighttpd.conf .lighttpd.conf') + local('webservice restart') # apply '.lighttpd.conf' local('ln -s replica.my.cnf .my.cnf') # DB config else: # toolserver local('ln -s pywikibot-drtrigonbot/warnuserquota.py warnuserquota.py') diff --git a/public_html/cgi-bin/ps_config.py b/public_html/cgi-bin/ps_config.py index a4b7a15..425447c 100644 --- a/public_html/cgi-bin/ps_config.py +++ b/public_html/cgi-bin/ps_config.py @@ -29,7 +29,7 @@ 'labs': ['compat', 'core'], } localdir = { 'ts': ['..', 'DrTrigonBot', '.'], - 'labs': ['..', 'public_html', 'logs', '.'], } + 'labs': ['..', 'logs', '.'], } bot_path = { 'ts': ["../../pywikipedia/", "../../rewrite/"], 'labs': ["../pywikibot-compat/", "../pywikibot-core/"], } -- To view, visit https://gerrit.wikimedia.org/r/124170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia292c1fa44a854430ce74a07a94d9fcb2c49ce3f Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/bots/drtrigonbot Gerrit-Branch: master Gerrit-Owner: DrTrigon <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
