You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Performance/Runbook/WebPageReplay: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Dzahn
 
imported>Phedenskog
(Update to follow our new setup.)
 
Line 6: Line 6:


== Update to new version ==
== Update to new version ==
Firefox and Chrome are bundled in the Docker container. When there's [https://hub.docker.com/r/sitespeedio/browsertime/tags/ a new version], check the [https://github.com/sitespeedio/browsertime/blob/master/CHANGELOG.md changelog] and update like this:
Firefox and Chrome are bundled in the sitespeed.io Docker container. When there's [https://hub.docker.com/r/sitespeedio/sitespeed.io/tags a new version], check the [https://github.com/sitespeedio/sitespeed.io/blob/master/CHANGELOG.md changelog] and update like this:


# SSH to the server: <code>ssh -i "webpagereplay.pem" ubuntu@54.85.66.136</code>
# Clone the Gerrit repo: ssh://USER@gerrit.wikimedia.org:29418/performance/synthetic-monitoring-tests.git
# Remove the run file: <code>rm /home/ubuntu/browsertime.run</code>
#Go into the new cloned repo: <code>cd synthetic-monitoring-tests</code>
# Wait for the tests to finish by tailing the log and look for Exit <code>tail -f /tmp/webpagereplay.log</code>
#Create a new branch named with the new version number: <code>git checkout -b my_new_version</code>
# Update to a new Docker container by editing the run file: <code>nano /home/ubuntu/run.sh</code> and change x.y.z to your new version sitespeedio/browsertime:x.y.z
# Edit the run.sh file and change one of the first lines that looks something like this: <code>DOCKER_CONTAINER=sitespeedio/sitespeed.io:10.3.2</code>
# Start the tests again (the new container will automatically be downloaded): <code>nohup /home/ubuntu/run.sh &</code>
#Change the version number (''10.3.2'' in this case) to your new version.
# Go to the [https://grafana.wikimedia.org/d/000000431/webpagereplay? WebPageReplay Grafana dashboard] and add an annotation with the tag '''webpagereplay''' and a message of what you upgraded
# Commit the file and send in the commit for a review.
# Keep looking at the graph and verify that everything looks ok.
#When the change is approved, the new version will be automatically picked up the next iteration of running the tests.
# Upgrade the other servers to the new version:
## <code>ssh -i "webpagereplay.pem" ubuntu@52.91.218.240</code>
## <code>ssh -i "webpagereplay.pem" ubuntu@54.90.122.71</code>


==Deploy first time==
==Deploy first time==
On a new server you need to [[Performance/WebPageReplay#Install|install the dependencies]] (Docker, NodeJS/npm). You can do that with the install script or follow the [[Performance/WebPageReplay#Install|step by step instructions]].<syntaxhighlight lang="bash">
On a new server you need to [[Performance/WebPageReplay#Install|install the dependencies]] (Docker) and [[Performance/WebPageReplay#Setup a new server|follow the instructions]].  
wget -qO- https://phab.wmfusercontent.org/file/data/zkk4sg53gjvrt6aw4dio/PHID-FILE-bdwkukgfcanvuh7qgtjt/Install_Browsertime_WebPageReplay_dependencies_on_a_fresh_Ubuntu | bash
</syntaxhighlight>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 f''ile 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.


<br />
<br />


[[Category:Runbooks]]
[[Category:Runbooks]]

Latest revision as of 09:20, 8 November 2019

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 sitespeed.io Docker container. When there's a new version, check the changelog and update like this:

  1. Clone the Gerrit repo: ssh://USER@gerrit.wikimedia.org:29418/performance/synthetic-monitoring-tests.git
  2. Go into the new cloned repo: cd synthetic-monitoring-tests
  3. Create a new branch named with the new version number: git checkout -b my_new_version
  4. Edit the run.sh file and change one of the first lines that looks something like this: DOCKER_CONTAINER=sitespeedio/sitespeed.io:10.3.2
  5. Change the version number (10.3.2 in this case) to your new version.
  6. Commit the file and send in the commit for a review.
  7. When the change is approved, the new version will be automatically picked up the next iteration of running the tests.

Deploy first time

On a new server you need to install the dependencies (Docker) and follow the instructions.