diff options
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/webtry/DESIGN.md | 9 | ||||
-rw-r--r-- | experimental/webtry/README.md | 2 | ||||
-rwxr-xr-x | experimental/webtry/setup/webtry_setup.sh | 3 | ||||
-rw-r--r-- | experimental/webtry/sys/webtry_monit | 3 | ||||
-rw-r--r-- | experimental/webtry/sys/webtry_squid | 6 |
5 files changed, 21 insertions, 2 deletions
diff --git a/experimental/webtry/DESIGN.md b/experimental/webtry/DESIGN.md index c95d76924d..0bc2145128 100644 --- a/experimental/webtry/DESIGN.md +++ b/experimental/webtry/DESIGN.md @@ -32,7 +32,6 @@ User submitted code is also restricted in the following ways: Architecture ------------ - The server runs on GCE, and consists of a Go Web Server that calls out to the c++ compiler and executes code in a chroot jail. See the diagram below: @@ -203,6 +202,14 @@ the metadata server: N.B. If you need to change the MySQL password that webtry uses, you must change it both in MySQL and the value stored in the metadata server. +Squid +----- + +Squid is configured to run on port 80 and run as an accelerator for the actual +Go program which is running on port 8000. The config for the squid proxy is +held in sys/webtry_squid, which is copied into place during installation and +squid is kept running via monit. + Workspaces ---------- diff --git a/experimental/webtry/README.md b/experimental/webtry/README.md index d2835d3c69..dea9ac0099 100644 --- a/experimental/webtry/README.md +++ b/experimental/webtry/README.md @@ -30,6 +30,8 @@ Create a GCE instance: --network=default --machine_type=n1-standard-1 --image=backports-debian-7-wheezy-v20140331 \ --persistent_boot_disk +Make sure port 80 is accessible externally for the above instance. + SSH into the instance: gcutil --project=google.com:skia-buildbots ssh --ssh_user=default skia-webtry-b diff --git a/experimental/webtry/setup/webtry_setup.sh b/experimental/webtry/setup/webtry_setup.sh index 6658ca8c97..34a8051d42 100755 --- a/experimental/webtry/setup/webtry_setup.sh +++ b/experimental/webtry/setup/webtry_setup.sh @@ -2,7 +2,7 @@ # # Script to setup a GCE instance to run the webtry server. # For full instructions see the README file. -sudo apt-get install schroot debootstrap monit +sudo apt-get install schroot debootstrap monit squid3 sudo apt-get install g++ libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libglu1-mesa-dev mesa-common-dev freeglut3-dev libgif-dev libfontconfig libfontconfig-dev echo "Adding the webtry user account" @@ -26,6 +26,7 @@ sudo cp --parents `ldd /bin/sh | cut -d " " -f 3` /srv/chroot/webtry sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_init /etc/init.d/webtry sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_monit /etc/monit/conf.d/webtry +sudo cp /home/webtry/skia/experimental/webtry/sys/webtry_squid /etc/squid3/squid.conf sudo chmod 744 /etc/init.d/webtry # Confirm that monit is happy. diff --git a/experimental/webtry/sys/webtry_monit b/experimental/webtry/sys/webtry_monit index 5fccf8a84e..906b0a69ac 100644 --- a/experimental/webtry/sys/webtry_monit +++ b/experimental/webtry/sys/webtry_monit @@ -2,3 +2,6 @@ check process webtry with pidfile /var/run/webtry.pid start program = "/etc/init.d/webtry start" stop program = "/etc/init.d/webtry stop" +check process squid3 with pidfile /var/run/squid3.pid + start program = "/etc/init.d/squid3 start" + stop program = "/etc/init.d/squid3 stop" diff --git a/experimental/webtry/sys/webtry_squid b/experimental/webtry/sys/webtry_squid new file mode 100644 index 0000000000..8dd623ba08 --- /dev/null +++ b/experimental/webtry/sys/webtry_squid @@ -0,0 +1,6 @@ +http_port 80 accel defaultsite=skfiddle.com +cache_peer 127.0.0.1 parent 8000 0 no-query originserver name=myAccel +acl our_sites dstdomain skfiddle.com +http_access allow our_sites +cache_peer_access myAccel allow our_sites +cache_peer_access myAccel deny all |