You are browsing a read-only backup copy of Wikitech. The primary site can be found at

Wikifunctions/Beta Cluster

From Wikitech-static
< Wikifunctions
Revision as of 15:05, 2 September 2022 by imported>Ori (→‎Debugging)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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 deployment-docker-wikifunctions01:6254
Evaluator deployment-docker-wikifunctions01:6927


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

# See which Docker image is running:
$ docker inspect --format='{{.Name}} {{.Image}}' $(docker ps -aq)

# Get an interactive shell inside the Docker container:
$ docker exec -u root -it mediawiki-services-function-orchestrator.service bash
# Once you're inside the container you can run `apt update` followed by `apt install` to install additional debugging tools.

(Replace 'orchestrator' with 'evaluator' in the commands above for debugging the function-evaluator.)

Running MediaWiki maintenance scripts

To run maintenance scripts, you need to SSH into the Beta Cluster deployment host (currently 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.