Performance/Runbook/WebPageReplay

From Wikitech
Jump to navigation Jump to search

This is the runbook for deploying new versions of WebPageReplay/Browsertime/Firefox/Chrome.

Meta

Update to new version

Firefox and Chrome are bundled in the Docker container. When there's a new version, check the changelog and update like this:

  1. SSH to the server: ssh -i "webpagereplay.pem" ubuntu@54.85.66.136
  2. Remove the run file: rm /home/ubuntu/browsertime.run
  3. Wait for the tests to finish by tailing the log and look for Exit tail -f /tmp/webpagereplay.log
  4. Update to a new Docker container by editing the run file: nano /home/ubuntu/run.sh and change x.y.z to your new version sitespeedio/browsertime:x.y.z
  5. Start the tests again (the new container will automatically be downloaded): nohup /home/ubuntu/run.sh &
  6. Go to the WebPageReplay Grafana dashboard and add an annotation with the tag webpagereplay and a message of what you upgraded
  7. Keep looking at the graph and verify that everything looks ok.
  8. Upgrade the other servers to the new version:
    1. ssh -i "webpagereplay.pem" ubuntu@52.91.218.240
    2. ssh -i "webpagereplay.pem" ubuntu@54.90.122.71

Deploy first time

On a new server you need to install the dependencies (Docker, NodeJS/npm). You can do that with the install script or follow the step by step instructions.

wget -qO- https://phab.wmfusercontent.org/file/data/zkk4sg53gjvrt6aw4dio/PHID-FILE-bdwkukgfcanvuh7qgtjt/Install_Browsertime_WebPageReplay_dependencies_on_a_fresh_Ubuntu | bash

The next step is to setup the AWS ID and KEY on the server (to be able to send the result to S3). The easiest way is to get those from one of the current running servers. Login to the server and check the .bashrc file located in the home directory. Look for AWS_ACCESS_KEY_ID and EXPORT AWS_SECRET_ACCESS_KEY and follow the pattern to export them the same way on the new server.