skia2/experimental/webtry
humper 67f2d3c514 Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/)
Reason for revert:
adding -Dskia_mesa=1 broke production; don't yet know why and don't want to leave things in a broken state.

Original issue's description:
> add ganesh checkbox to skfiddle interface
>
> BUG=skia:
> R=mtklein@google.com, tfarina@chromium.org
>
> Committed: https://skia.googlesource.com/skia/+/ccb54895c614632fd01d22b64ab614921f980eb1

TBR=tfarina@chromium.org,jcgregorio@google.com,mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/655633003
2014-10-13 16:05:05 -07:00
..
poly Fix some references to non-existant polyfill directory. 2014-09-29 10:50:59 -07:00
res Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00
scripts Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00
setup Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00
templates Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00
build In the generated fiddle, set the portable fonts flag first. 2014-10-08 12:04:20 -04:00
DESIGN.md add support for skfiddle width/height options 2014-10-13 13:58:09 -04:00
gyp_for_webtry gyp build of skfiddle apps, take 2 2014-09-17 08:42:46 -07:00
main.cpp Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00
README.md Fix webtry setup once instructions in README doc. 2014-10-13 12:37:52 -07:00
result.cpp Add the ability to select a source image to use in the code. 2014-05-29 15:58:00 +00:00
safec gyp build of skfiddle apps, take 2 2014-09-17 08:42:46 -07:00
safec++ Set ulimits for the compile stage. 2014-04-30 19:38:51 +00:00
seccomp_bpf.h disable webtry seccmp on non-linux build 2014-09-09 15:57:33 -07:00
TODO.md Factor out common template code. Send stdout back to web page. 2014-04-22 21:13:45 +00:00
webtry.go Revert of add ganesh checkbox to skfiddle interface (patchset #6 id:270001 of https://codereview.chromium.org/649313002/) 2014-10-13 16:05:05 -07:00

WebTry Server

Allows trying out Skia code in the browser. Run a local webserver and from the pages it serves try out Skia code and see the results immediately. To make sandboxing easier this must be built w/GPU off.

Running Locally

One time setup:

$ export SKIA_ROOT=path_to_your_skia_source
$ export WEBTRY_INOUT=path_to_a_writeable_directory
$ mkdir -p $WEBTRY_INOUT

Then, to run:

$ cd experimental/webtry
$ go get -d
$ ./build
$ ./webtry

Then visit http://localhost:8000 in your browser.

Only tested under linux and MacOS, doubtful it will work on other platforms.

Server Setup

Create a GCE instance:

gcutil --project=google.com:skia-buildbots addinstance skia-webtry-b \
  --zone=us-central2-b --external_ip_address=108.170.220.126 \
  --service_account=default \
  --service_account_scopes="https://www.googleapis.com/auth/devstorage.full_control" \
  --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

Do the first time

The following things only need to be done once.

  1. SSH into the server as default.

  2. sudo apt-get install git

  3. git clone https://skia.googlesource.com/skia

  4. cd ~/skia/experimental/webtry/setup

  5. ./webtry_setup.sh

  6. Add the following to the /etc/schroot/minimal/fstab:

none /run/shm tmpfs rw,nosuid,nodev,noexec 0 0 /home/webtry/inout /skia_build/inout none rw,bind 0 0 /home/webtry/cache /skia_build/cache none rw,bind 0 0

  1. Change /etc/monit/monitrc to:

    set daemon 2

then run the following so it applies:

sudo /etc/init.d/monit restart

This means that monit will poll every two seconds that our application is up and running.

  1. Set the TCP keepalive. For more info see: https://developers.google.com/cloud-sql/docs/gce-access

    sudo sh -c 'echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time'

To update the code

  1. SSH into the server as default.
  2. cd ~/skia/experimental/webtry/setup
  3. git pull
  4. ./webtry_setup.sh

Third Party Code

  • res/js/polyfill.js - Various JS polyfill libraries. To rebuild or update see poly/README.md.