Tutorial: WebPageTest Private Instance with Google Cloud Compute (GCP)

Bulk test isn’t available in public WebPageTest offer.
I’ve quickly made the tutorial which you can reuse to create your own instance, for a price starting from $1 per month if you are careful 🙂


1/ Setup the main server

  • Ubuntu 16.04 LTS
  • 1-2 CPU
  • persistent (non persistent ok only for agents)
  • SSD – 10 GB
  • Add public SHH key
  • Allow HTTP traffic
  • Create instance
  • Connect to ssh using Google Cloud Console and paste:
    • bash <(curl -s https://raw.githubusercontent.com/WPO-Foundation/wptserver-install/master/gce_ubuntu.sh)
  • Leave empty – hit enter
  • Save location key
  • Save wpt_data metadata

2/ Setup agent template

  • Launch Google Cloud Shell and paste:
  • bash <(curl -s https://raw.githubusercontent.com/WPO-Foundation/wptagent-install/master/gce_image.sh)
  • Leave wpt-agent as is.
  • Paste wpt_data metadata saved when creating server

3/ Start an agent in the desired location

  • Click “Create an instance”
  • “New instance from VM” (left panel)
  • Select wpt-agent
  • Continue
  • Name = informational.
    • Use something which helps to identify in which Area where it will be hosted
  • Allow HTTP trafic (did not test without this option)
  • Create the instance

4/ Start a test

  • Access http://$Public_IP_of_The_Server/
  • Select test location
  • If no test location, restart the main server (not the agent)
  • Bulk testing is now available.

How much it cost ?

Traffic cost is close to 0$ / month, excepted heavy usage.

If you don’t shutdown or close the server, it will cost:

  • Agent: $15 / month / in US based datacenter ($0,021 / hour)
  • Main server: $50 / month / in US based datacenter ($0,068 / hour)
    => $65 / month
  • For entreprise needs, with daily monitoring:
    • We cover all regions available
    • The main server & agents are never stopped
    • 25 regions x 18$ on average
    • 1 main server at 50$
    • a bit of storage + backup
    • Then add variable cost.
    • => Around $600 / month

Official documentation is here: https://docs.webpagetest.org/private-instances/gce_server/

chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website