developer.wikimedia.org
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
- Maintainer:
Developer Advocacy team - Issue tracker: #wikimedia-developer-portal
- Source code: https://gerrit.wikimedia.org/g/wikimedia/developer-portal/
- Launch task: T261510
The static site runs from the Kubernetes infrastructure.
Production deployment
- 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)
- CR+2 the helmfile.d patch in gerrit to start the merge process.
- Ssh to the currently active deployment server (deployment.eqiad.wmnet).
cd /srv/deployment-charts/helmfile.d/services/developer-portal
- 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.
- Deploy the chart to the staging cluster:
helmfile -e staging -i apply --context 5
- Deploy the chart to the codfw cluster:
helmfile -e codfw -i apply --context 5
- Check the production site and build info.
- Deploy the chart to the eqiad cluster:
helmfile -e eqiad -i apply --context 5
- 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