You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Wikifunctions/Beta Cluster: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Ori
mNo edit summary
imported>Quiddity
(2 intermediate revisions by one other user not shown)
Line 29: Line 29:
|<code>deployment-docker-wikifunctions01:6927</code>
|<code>deployment-docker-wikifunctions01:6927</code>
|}
|}
===Debugging===
The function-* services log to Logstash (see [[#Debug logs]] below for details).
The units are configured to automatically restart on failure. If [https://openstack-browser.toolforge.org/server/deployment-docker-wikifunctions01.deployment-prep.eqiad1.wikimedia.cloud deployment-docker-wikifunctions01] is up but one or both of the services are down, they are probably crash-looping. To debug, SSH into the machine and run:
<syntaxhighlight lang="sh">
# Check service status:
$ sudo systemctl status mediawiki-services-function-orchestrator
# Get additional logs:
$ sudo journalctl --unit=mediawiki-services-function-orchestrator
</syntaxhighlight>
Replace 'orchestrator' with 'evaluator' for debugging the function-evaluator.
==Running MediaWiki maintenance scripts==
To run maintenance scripts, you need to SSH into the Beta Cluster deployment host (currently <code>deployment-deploy03.deployment-prep.eqiad1.wikimedia.cloud</code>). See [[Help:Accessing Cloud VPS instances]] for access instructions.
Once you've logged in, you need to wrap invocations of maintenance scripts with <code>mwscript</code>, specifying <code>--wiki=wikifunctionswiki</code> to ensure the code runs in the context of Wikifunctions.
For example:
:<code>mwscript extensions/WikiLambda/maintenance/reloadBuiltinData.php --wiki=wikifunctionswiki</code>
*To '''run raw SQL''' against the database (don't), run: <code>mwscript maintenance/sql.php --wiki=wikifunctionswiki</code>
*To '''run code''' in an interactive MediaWiki PHP REPL, run: <code>mwscript maintenance/shell.php --wiki=wikifunctionswiki</code>
If you do anything potentially destructive, remember to log it to the [[Release Engineering/SAL|RelEng server action log]] via <code>!log <var>message</var></code> in {{irc|wikimedia-releng}}.


==Debug logs==
==Debug logs==
Line 35: Line 64:
*[https://beta-logs.wmcloud.org/app/dashboards#/view/6047da50-e0ef-11ec-9d5f-9f290f4ecdda Logstash dashboard for function-* services]
*[https://beta-logs.wmcloud.org/app/dashboards#/view/6047da50-e0ef-11ec-9d5f-9f290f4ecdda Logstash dashboard for function-* services]
*[https://beta-logs.wmcloud.org/app/dashboards#/view/ed5fa860-e689-11ec-9d5f-9f290f4ecdda Logstash dashboard for PHP]
*[https://beta-logs.wmcloud.org/app/dashboards#/view/ed5fa860-e689-11ec-9d5f-9f290f4ecdda Logstash dashboard for PHP]
[[Category:Abstract Wikipedia team]]

Revision as of 16:38, 21 July 2022

The Beta Cluster houses a functional test instance of Wikifunctions and associated services, with all software components running at HEAD.

The URL for Wikifunctions wiki is https://wikifunctions.beta.wmflabs.org/

function-orchestrator and function-evaluator

The function-{orchestrator,evaluator} services run under Docker, on the deployment-docker-wikifunctions01 cloud instance.

You need to be a member of the deployment-prep project to access the instance via SSH, and a project admin to change the instance configuration.

Both services are exposed via a web proxy. The evaluator is exposed to facilitate testing.

Service Public address Internal address
Orchestrator wikifunctions-orchestrator-beta.wmflabs.org:443 deployment-docker-wikifunctions01:6254
Evaluator wikifunctions-evaluator-beta.wmflabs.org:443 deployment-docker-wikifunctions01:6927

Debugging

The function-* services log to Logstash (see #Debug logs below for details).

The units are configured to automatically restart on failure. If deployment-docker-wikifunctions01 is up but one or both of the services are down, they are probably crash-looping. To debug, SSH into the machine and run:

# Check service status:
$ sudo systemctl status mediawiki-services-function-orchestrator

# Get additional logs:
$ sudo journalctl --unit=mediawiki-services-function-orchestrator

Replace 'orchestrator' with 'evaluator' for debugging the function-evaluator.

Running MediaWiki maintenance scripts

To run maintenance scripts, you need to SSH into the Beta Cluster deployment host (currently deployment-deploy03.deployment-prep.eqiad1.wikimedia.cloud). See Help:Accessing Cloud VPS instances for access instructions.

Once you've logged in, you need to wrap invocations of maintenance scripts with mwscript, specifying --wiki=wikifunctionswiki to ensure the code runs in the context of Wikifunctions.

For example:

mwscript extensions/WikiLambda/maintenance/reloadBuiltinData.php --wiki=wikifunctionswiki
  • To run raw SQL against the database (don't), run: mwscript maintenance/sql.php --wiki=wikifunctionswiki
  • To run code in an interactive MediaWiki PHP REPL, run: mwscript maintenance/shell.php --wiki=wikifunctionswiki

If you do anything potentially destructive, remember to log it to the RelEng server action log via !log message in #wikimedia-releng connect.

Debug logs

Logs from both MediaWiki and the function-* services are shipped to Logstash. See Logstash § Beta Cluster Logstash for access instructions.