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

toolhub.wikimedia.org

From Wikitech-static
Revision as of 21:48, 16 March 2022 by imported>BryanDavis (→‎Production deployment: Add some "how to" instructions)
Jump to navigation Jump to search
Toolhub logo

toolhub.wikimedia.org is a catalog of tools used by the members of the Wikimedia movement. See the Toolhub project page on meta for additional details about the application's features.

Production deployment

Toolhub runs in the "eqiad" Kubernetes cluster. The service is current not active-active in the "codfw" cluster (T288685).

The helm chart and helmfile configuration for the service configure connectivity to its dependencies:

How to deploy

  1. Create a patch to update main_app.version in helmfile.d/services/toolhub/values.yaml to the desired tag of the wikimedia/wikimedia-toolhub container. (example)
  2. CR+2 the helmfile.d patch in gerrit to start the merge process.
  3. Ssh to the currently active deployment server (deployment.eqiad.wmnet).
  4. cd /srv/deployment-charts/helmfile.d/services/toolhub
  5. Verify that your changes from step 1 are checked out. The git clone is updated once a minute by a timer, so if your changes are not present yet double check that zuul has merged the change and then wait patiently for the update to be fetched.
  6. Deploy the chart to the staging cluster: helmfile -e staging -i apply
  7. Deploy the chart to the codfw cluster: helmfile -e codfw -i apply
  8. Deploy the chart to the eqiad cluster: helmfile -e eqiad -i apply

If your deployment includes database or elasticsearch schema changes, you will need to apply them manually. Until T290357: Maintenance environment needed for running one-off commands is resolved you will need to invent your own environment for performing these post-deploy tasks. See T290357#7578866 for the script that bd808 uses. Typical migration commands:

  • poetry run ./manage.py showmigrations
  • poetry run ./manage.py migrate
  • poetry run ./manage.py search_index --rebuild

Testing deployment

https://toolhub-demo.wmcloud.org in the Toolhub Cloud VPS project hosts a testing deployment that is used for beta testing and demonstrations. It is deployed using docker-compose. See contrib/demo-server/README.md in the project's git repo for more information.

Updating the demo build

$ ssh toolhub-demo01.toolhub.eqiad1.wikimedia.cloud
$ cd /srv/toolhub/demo/
$ make pull restart tail
  watch things happen until the search indices are rebuilt
  ^c
$ make web-shell
$ poetry run ./manage.py crawl --quiet
$ exit
$ exit

Local development

Local development is done with docker-compose. See docs/CONTRIBUTING.rst in the project's git repo for more information.

Visualizations related to Tools and Account creation