You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* There is a [sample locations.ini](https://github.com/WPO-Foundation/webpagetest/blob/master/www/settings/locations.ini.GCE-sample) pre-configured with all of the GCE regions as part of the project in github.
9
10
10
-
## Launch a base instance
11
+
## Launch a base Ubuntu 16.04 instance
11
12
* Start at the Google Compute Engine console for the project you are creating the image for:
* Name it something that you will recognize in the list (name doesn't matter)
15
16
* Select a region near you. Once created the image can be deployed globally but selecting a region near you for configuration makes setup easier.
16
-
* Select a 1 vCPU machine (the default - n1-standard-1)
17
+
* Select a 2 vCPU machine (n1-standard-2)
17
18
* The image can be deployed to any instance size after being configured though the shared CPU instances will have inconsistent performance and are not recommended.
18
19
* Change the boot disk to "Ubuntu 16.04 LTS" from the "OS Images" list.
19
20
* Leave the boot disk type as "standard persistent disk" and size at 10GB
@@ -34,65 +35,15 @@ Since GCE images are not publicly shareable it is necessary to configure a new i
34
35
## Install the software
35
36
* SSH into the newly-created instance as the user "ubuntu" with the SSH key you provided (using the "External IP" for the instance)
* This script installs all OS and browser updates at startup (before running the agent) and every 24 hours after that. It also updates the agent code from Github hourly (modify it if you don't want to auto-update):
46
-
*```nano ~/agent.sh```
47
-
* Paste the following script (ctrl-O to save, ctrl-X to exit after you're done):
48
-
```sh
49
-
#!/bin/sh
50
-
cd~/wptagent
51
-
echo"Waiting for 30 second startup delay"
52
-
sleep 30
53
-
echo"Waiting for apt to become available"
54
-
while fuser /var/lib/dpkg/lock >/dev/null 2>&1;do
55
-
sleep 1
56
-
done
57
-
while:
58
-
do
59
-
echo"Updating OS"
60
-
until sudo apt-get update
61
-
do
62
-
sleep 1
63
-
done
64
-
until sudo DEBIAN_FRONTEND=noninteractive apt-get -yq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
* Create a shell script to launch the agent in a detached screen (makes it easy to ssh into an agent and ```screen -r``` to watch the agent activity as it runs
* Configure the startup script to run at boot time
90
-
*```crontab -e```
91
-
* Add the following to the end of the cron file:
92
-
*```@reboot /home/ubuntu/startup.sh```
44
+
The script will install all of the necessary software and reboot the instance when it is complete.
93
45
94
46
## Test the agent
95
-
* Reboot the vm ```sudo reboot```
96
47
* Submit some tests to the web UI for the test location and make sure tests run as expected (if not, ssh into the VM and connect to the screen session to see what it is doing)
0 commit comments