Event Platform/Beta Deployments
Event Platform services are deployed to k8s via Deployment pipeline . All services are available in staging, and that's where we usually test.
Sometime you might find it useful run integration tests in the
Beta cluster
. For this use case, services should follow
Deployment prep
practices.
While MediaWiki code is synced automagically Nova Resource:Deployment-prep/How code is updated#How do I get my code on the beta cluster? ,
Event Platform services require a couple of manual steps.
tl;dr: version bump the image to deploy in the Horizon UI (do not submit a CR to the cloud infra git repo), ssh to the cloud vps box, run sudo puppet agent -t to pull changes and eventually redeploy the docker image.
To be able to deploy to Beta you need to:
- Have a valid Cloud vps account with a Generate an SSH Key . Deployment prep hosts run docker containers on cloud infra (*not* k8s), so generate a dedicated key.
- Have an ssh config that with cloudvps bastion hops. See Help:Accessing Cloud VPS instances#Setup
- Make sure you are part of the deployment-prep project in https://horizon.wikimedia.org/project/ .
-
Make sure you are a project member of the service you want to deploy.
- You need this to be able to make config changes.
- If the puppet config tab to horizon does not show an "Edit" button, you are not a project memebr. Ping Event Platform/Maintainers if you think you should.
As an example, let's say you want to test changes to
Event Platform/EventStreams
. The workflow would look something like this:
- Get patches merged to the service Gerrit repo
- On merge a new docker image will be created and pushed to Docker-registry .
-
Go to the Deployment prep instance (Compute -> Instances -> Filter by name = event) page in
Horizon
- Right now this would point to deployment-eventstreams-2
- Click on the Puppet Configuration tab
- Click on the "Edit" button and version bump the service docker image .
- Apply changes. Horizon should auto merge to the cloud instances gerrit repo.
-
Login to the cloudvps host (assumes you have provided a pub key and configured bastion hops):
Wheressh deployment-eventstreams-2.deployment-prep.eqiad1.wikimedia.cloud
- deployment-eventstreams-2: is the clouvps integration test instance
- deployment-prep.eqiad1.wikimedia.cloud: is the clouvps deployment-prep net
-
Deploy the changes with puppet:
sudo puppet agent -t - You can edit https://simple.wikipedia.beta.wmflabs.org/ to test changes.