4 Allows trying out Skia code in the browser. Run a local webserver
5 and from the pages it serves try out Skia code and see the results
6 immediately. To make sandboxing easier this must be built w/GPU off.
11 $ GYP_GENERATORS=ninja ./gyp_skia gyp/webtry.gyp gyp/most.gyp -Dskia_gpu=0
12 $ ninja -C out/Debug webtry
13 $ cd experimental/webtry
17 Then visit http://localhost:8000 in your browser.
19 Only tested under linux, doubtful it will work on other platforms.
24 Create a GCE instance:
26 gcutil --project=google.com:skia-buildbots addinstance skia-webtry-b \
27 --zone=us-central2-b --external_ip_address=108.170.220.126 \
28 --service_account=default \
29 --service_account_scopes="https://www.googleapis.com/auth/devstorage.full_control" \
30 --network=default --machine_type=n1-standard-1 --image=backports-debian-7-wheezy-v20140331 \
31 --persistent_boot_disk
33 Make sure port 80 is accessible externally for the above instance.
35 SSH into the instance:
37 gcutil --project=google.com:skia-buildbots ssh --ssh_user=default skia-webtry-b
43 The following things only need to be done once
45 1. sudo apt-get install git schroot debootstrap
46 2. git clone https://skia.googlesource.com/skia
47 3. Add the following to /etc/fstab and reboot:
49 none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
51 The above will allow ninja to run. See http://stackoverflow.com/questions/2009278/python-multiprocessing-permission-denied
53 4. Add the following to the /etc/schroot/minimal/fstab:
55 /home/webtry/inout /inout none rw,bind 0 0
57 5. Change /etc/monit/monitrc to:
61 then run the following so it applies:
63 sudo /etc/init.d/monit restart
65 This means that monit will poll every two seconds that our application is up and running.
67 6. Set the TCP keepalive. For more info see:
68 https://developers.google.com/cloud-sql/docs/gce-access
70 sudo bash -c 'echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time'
75 Do the following the first time you setup a machine, and each time you want to update the code running on the server
77 cd ~/skia/experimental/webtry/setup
84 Do this step only once, but only after running webtry_setup.sh the first time
86 sudo debootstrap --variant=minbase wheezy /srv/chroot/webtry
92 * res/js/polyfill.js - Various JS polyfill libraries. To rebuild or update
93 see polyfill/README.md.