Jump to content

developer.wikimedia.org

From Wikitech
(Redirected from Developer Portal)


developer.wikimedia.org (Developer Portal) is a central entry point for Wikimedia technical documentation. The portal is a static site built using MkDocs and Material for MkDocs. It uses a custom plugin to generate PO files and integrate with translatewiki.net. For more information about the project, see mw:Developer Portal.

Service

The static site runs from the Kubernetes infrastructure.

Production deployment

  1. Create a patch to update main_app.version in helmfile.d/services/developer-portal/values.yaml to the desired tag of the wikimedia/wikimedia-developer-portal 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/developer-portal
  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 --context 5
  7. Deploy the chart to the codfw cluster: helmfile -e codfw -i apply --context 5
  8. Deploy the chart to the eqiad cluster: helmfile -e eqiad -i apply --context 5
  9. When in doubt, check k8s status with kube_env developer-portal <cluster> && kubectl get all

Demo server

A demo server is available at https://developer-portal.wmcloud.org/. This proxy points to an instance in the "devportal" Cloud VPS project which uses Podman to run the latest developer portal container as built by PipelineLib. A systemd timer runs podman auto-update every 5 minutes to poll for newer container versions.

The demo server was manually built and does not currently have any Puppet automation to build a new instance. The manual work needed however is a relatively small amount of effort thanks to the magic of podman:

$ sudo apt install podman
$ sudo podman pull docker-registry.wikimedia.org/wikimedia/wikimedia-developer-portal:latest
$ sudo podman run --name developer-portal --label 'io.containers.autoupdate=image' --rm --detach --publish 0.0.0.0:8000:8000 docker-registry.wikimedia.org/wikimedia/wikimedia-developer-portal:latest
$ sudo podman generate systemd --new --name developer-portal | sudo tee /etc/systemd/system/developer-portal.service
$ sudo systemctl enable developer-portal
$ sudo systemctl start developer-portal
$ sudo systemctl edit podman-auto-update.timer # Set to run every 5m
$ sudo systemctl enable podman-auto-update.service
$ sudo systemctl start podman-auto-update.service

See also