Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
poly/ | 22-Nov-2023 | - | 129 | 106 | ||
res/ | 22-Nov-2023 | - | 8,849 | 7,028 | ||
setup/ | 22-Nov-2023 | - | 96 | 52 | ||
sys/ | 22-Nov-2023 | - | 185 | 97 | ||
templates/ | 22-Nov-2023 | - | 200 | 180 | ||
DESIGN.md | D | 22-Nov-2023 | 10.3 KiB | 283 | 204 | |
README.md | D | 22-Nov-2023 | 2.6 KiB | 95 | 57 | |
TODO.md | D | 22-Nov-2023 | 654 | 17 | 14 | |
build | D | 22-Nov-2023 | 972 | 23 | 11 | |
gyp_for_webtry | D | 22-Nov-2023 | 1.4 KiB | 44 | 28 | |
main.cpp | D | 22-Nov-2023 | 3.3 KiB | 132 | 97 | |
result.cpp | D | 22-Nov-2023 | 464 | 30 | 25 | |
safec | D | 22-Nov-2023 | 107 | 8 | 3 | |
safec++ | D | 22-Nov-2023 | 108 | 8 | 3 | |
seccomp_bpf.h | D | 22-Nov-2023 | 1.8 KiB | 70 | 46 | |
webtry.go | D | 22-Nov-2023 | 27.9 KiB | 896 | 754 |
README.md
1WebTry 2====== 3 4Allows trying out Skia code in the browser. Run a local webserver 5and from the pages it serves try out Skia code and see the results 6immediately. To make sandboxing easier this must be built w/GPU off. 7 8Running Locally 9=============== 10 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 14 $ go build webtry.go 15 $ ./webtry 16 17Then visit http://localhost:8000 in your browser. 18 19Only tested under linux, doubtful it will work on other platforms. 20 21Full Server Setup 22================= 23 24Create a GCE instance: 25 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 32 33Make sure port 80 is accessible externally for the above instance. 34 35SSH into the instance: 36 37 gcutil --project=google.com:skia-buildbots ssh --ssh_user=default skia-webtry-b 38 39 40Do once 41------- 42 43The following things only need to be done once 44 451. sudo apt-get install git schroot debootstrap 462. git clone https://skia.googlesource.com/skia 473. Add the following to /etc/fstab and reboot: 48 49 none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0 50 51The above will allow ninja to run. See http://stackoverflow.com/questions/2009278/python-multiprocessing-permission-denied 52 534. Add the following to the /etc/schroot/minimal/fstab: 54 55 /home/webtry/inout /inout none rw,bind 0 0 56 575. Change /etc/monit/monitrc to: 58 59 set daemon 2 60 61then run the following so it applies: 62 63 sudo /etc/init.d/monit restart 64 65This means that monit will poll every two seconds that our application is up and running. 66 676. Set the TCP keepalive. For more info see: 68 https://developers.google.com/cloud-sql/docs/gce-access 69 70 sudo bash -c 'echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time' 71 72Do the first time 73----------------- 74 75Do the following the first time you setup a machine, and each time you want to update the code running on the server 76 77 cd ~/skia/experimental/webtry/setup 78 ./webtry_setup.sh 79 80 81Once, after setup 82----------------- 83 84Do this step only once, but only after running webtry_setup.sh the first time 85 86 sudo debootstrap --variant=minbase wheezy /srv/chroot/webtry 87 88 89Third Party Code 90---------------- 91 92 * res/js/polyfill.js - Various JS polyfill libraries. To rebuild or update 93 see polyfill/README.md. 94 95