OLD | NEW |
| (Empty) |
1 WebTry Server | |
2 ============= | |
3 | |
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. | |
7 | |
8 | |
9 Running Locally | |
10 =============== | |
11 | |
12 One time setup: | |
13 | |
14 $ export SKIA_ROOT=path_to_your_skia_source | |
15 $ export WEBTRY_INOUT=path_to_a_writeable_directory | |
16 $ mkdir -p $WEBTRY_INOUT | |
17 | |
18 Then, to run: | |
19 | |
20 $ cd experimental/webtry | |
21 $ go get -d | |
22 $ ./build | |
23 $ ./webtry | |
24 | |
25 Then visit http://localhost:8000 in your browser. | |
26 | |
27 Only tested under linux and MacOS, doubtful it will work on other platforms. | |
28 | |
29 | |
30 Server Setup | |
31 ============ | |
32 | |
33 Create a GCE instance: | |
34 | |
35 gcutil --project=google.com:skia-buildbots addinstance skia-webtry-b \ | |
36 --zone=us-central2-b --external_ip_address=108.170.220.126 \ | |
37 --service_account=default \ | |
38 --service_account_scopes="https://www.googleapis.com/auth/devstorage.full_
control" \ | |
39 --network=default --machine_type=n1-standard-1 --image=backports-debian-7-
wheezy-v20140331 \ | |
40 --persistent_boot_disk | |
41 | |
42 Make sure port 80 is accessible externally for the above instance. | |
43 | |
44 SSH into the instance: | |
45 | |
46 gcutil --project=google.com:skia-buildbots ssh --ssh_user=default skia-webtr
y-b | |
47 | |
48 | |
49 Do the first time | |
50 ================= | |
51 | |
52 The following things only need to be done once. | |
53 | |
54 1. SSH into the server as default. | |
55 2. sudo apt-get install git | |
56 3. git clone https://skia.googlesource.com/skia | |
57 4. cd ~/skia/experimental/webtry/setup | |
58 5. ./webtry_setup.sh | |
59 | |
60 6. Add the following to the /etc/schroot/minimal/fstab: | |
61 | |
62 none /run/shm tmpfs rw,nosuid,nodev,noexec 0 0 | |
63 /home/webtry/inout /skia_build/inout none rw,bind 0
0 | |
64 /home/webtry/cache /skia_build/cache none rw,bind 0
0 | |
65 | |
66 7. Change /etc/monit/monitrc to: | |
67 | |
68 set daemon 2 | |
69 | |
70 then run the following so it applies: | |
71 | |
72 sudo /etc/init.d/monit restart | |
73 | |
74 This means that monit will poll every two seconds that our application is up and
running. | |
75 | |
76 8. Set the TCP keepalive. For more info see: | |
77 https://developers.google.com/cloud-sql/docs/gce-access | |
78 | |
79 sudo sh -c 'echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time' | |
80 | |
81 | |
82 To update the code | |
83 ================== | |
84 | |
85 1. SSH into the server as default. | |
86 2. cd ~/skia/experimental/webtry/setup | |
87 3. git pull | |
88 4. ./webtry_setup.sh | |
89 | |
90 | |
91 Third Party Code | |
92 ================ | |
93 | |
94 * res/js/polyfill.js - Various JS polyfill libraries. To rebuild or update | |
95 see poly/README.md. | |
OLD | NEW |