Jump to content
Wikitech

developer.wikimedia.org

From Wikitech


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

Tracked in Phabricator
Task T297140 Resolved
  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

Tracked in Phabricator
Task T297800 Resolved

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:

$ sudoaptinstallpodman
$ sudopodmanpulldocker-registry.wikimedia.org/wikimedia/wikimedia-developer-portal:latest
$ sudopodmanrun--namedeveloper-portal--label'io.containers.autoupdate=image'--rm--detach--publish0.0.0.0:8000:8000docker-registry.wikimedia.org/wikimedia/wikimedia-developer-portal:latest
$ sudopodmangeneratesystemd--new--namedeveloper-portal|sudotee/etc/systemd/system/developer-portal.service
$ sudosystemctlenabledeveloper-portal
$ sudosystemctlstartdeveloper-portal
$ sudosystemctleditpodman-auto-update.timer# Set to run every 5m
$ sudosystemctlenablepodman-auto-update.service
$ sudosystemctlstartpodman-auto-update.service

See also

AltStyle によって変換されたページ (->オリジナル) /