You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Performance/Runbook/WebPageTest
< Performance | Runbook
Jump to navigation
Jump to search
This is the runbook for deploying new versions of WebPageTest.
Meta
- Issue tracker (Phabricator): WebPageTest
- Documentation: WebPageTest
Update the WebPageTest agent
Whenever there is a new version of Chrome or Firefox we need to deploy a new version of the WebPageTest agent. You need to do that in two steps: First build a new container with the new version of Chrome/Firefox and then log into the agent server and update to the new version.
Build a new Docker container
Clone https://github.com/WPO-Foundation/wptagent or update your fork.
git clone git@github.com:WPO-Foundation/wptagent.git
- Go to the right directory:
cd wptagent
- Build a new container, make sure you run with --no-cache so all layers are rebuilt:
docker build --no-cache -t wikimedia/wptagent .
- Log into the container:
docker run -it wikimedia/wptagent /bin/bash
- Get the version of Chrome and Firefox. This will output a string that you will use a Docker tag. Let us call the output NEW_TAG:
echo $(firefox --version)-$(google-chrome --version)-$(date +%Y-%m-%d) | sed -e 's/ /_/g'
- Re-tag the image
docker tag wikimedia/wptagent:latest wikimedia/wptagent:NEW_TAG
- Publish the new version to the Docker hub:
docker push wikimedia/wptagent:NEW_TAG
Deploy the new container
- Log into the server
ssh -i "WebPageTestAgent.pem" ubuntu@ec2-3-87-120-168.compute-1.amazonaws.com
- Edit the start script and update the version (VERSION) to the new tag:
nano start.sh
- Stop the current running agent container:
docker stop wptagent && docker rm wptagent
- Delete the old containers and data:
docker system prune --all --volumes -f
- Start the agent:
./start.sh