Nova Resource:Wikidata-dev/wikidata-shex

From Wikitech-static
Jump to navigation Jump to search

This instance (wikidata-shex.wikidata-dev.eqiad.wmflabs) is a test system for the planned Wikidata Shape Expressions integration. It is managed by the members of the Wikidata ShEx hike.


The system is based on the debian-9.6-stretch image. MediaWiki is installed via the role::labs::mediawiki_vagrant Puppet role. To do anything Vagrant-related, you will want to SSH into the VM (ssh wikidata-shex.eqiad.wmflabs) and then change to the Vagrant directory (cd /srv/mediawiki-vagrant).

Vagrant creates an LXC container and proxies port 8080 to it; run vagrant ssh in the VM to get a shell inside that container. (If that command prints an error about a Vagrant environment being required, you probably forgot the cd /srv/mediawiki-vagrant.) In the container, MediaWiki is installed under /vagrant/mediawiki, but modifying things there by hand is probably a bad idea, since they might get erased by Puppet. (Note that this is a different Puppet setup than the main Cloud VPS one – this one is Vagrant’s responsibility.) MediaWiki extensions (WikibaseSchema, ConfirmEdit, ULS, CLDR, Babel) are therefore installed via new Puppet manifests which are defined in /vagrant/puppet/modules/local/manifests/ and loaded in /vagrant/puppet/hieradata/local.yaml; any changes to the Puppet setup are applied by running vagrant provision in the VM (not in the container).

A Cloud VPS proxy is set up to serve the VM’s port 8080 (which, per the above, is proxied to the LXC container) at

The systemd units git-update.service and git-update.timer, defined in corresponding unit files under /etc/systemd/system/, automatically pull the latest code every ten minutes during working hours. To manually update the code, run sudo systemctl start git-update. If anything went wrong during the update, you can see the output with sudo journalctl -u git-update -e -a. (TODO: perhaps those units should be puppetized?)

The password for the MediaWiki “Admin” user may be viewed with the command sudo cat ~root/Vagrant_MediaWiki_Password. Dedicated accounts for all the relevant users have been created (contact the devs if more are needed).

The system cannot send email; if you try to send an email from MediaWiki (e. g. to create an account and email the user the password), it will be appended to the file /var/mail/vagrant inside the container.


Remember that you can always log updates in #wikimedia-cloud connect:

!log wikidata-dev wikidata-shex blah blah doing things

You can see all wikidata-shex SAL log entries.