Event Platform/Beta Deployments

From Wikitech

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:


As an example, let's say you want to test changes to Event Platform/EventStreams. The workflow would look something like this:

  1. Get patches merged to the service Gerrit repo
  2. On merge a new docker image will be created and pushed to Docker-registry.
  3. Go to the Deployment prep instance (Compute -> Instances -> Filter by name = event) page in Horizon
    1. Right now this would point to deployment-eventstreams-2
  4. Click on the Puppet Configuration tab
  5. Click on the "Edit" button and version bump the service docker image .
  6. Apply changes. Horizon should auto merge to the cloud instances gerrit repo.
  7. Login to the cloudvps host (assumes you have provided a pub key and configured bastion hops):

    ssh deployment-eventstreams-2.deployment-prep.eqiad1.wikimedia.cloud

    Where
    1. deployment-eventstreams-2: is the clouvps integration test instance
    2. deployment-prep.eqiad1.wikimedia.cloud: is the clouvps deployment-prep net
  8. Deploy the changes with puppet:

    sudo puppet agent -t

  9. You can edit https://simple.wikipedia.beta.wmflabs.org/ to test changes.