commit | 22f454986ee49037fd080d61da5600921e6a1f95 | [log] [tgz] |
---|---|---|
author | Matt Rosencrantz <mattr@google.com> | Tue Dec 02 16:27:18 2014 -0800 |
committer | Matt Rosencrantz <mattr@google.com> | Tue Dec 02 16:27:18 2014 -0800 |
tree | 29c989d3f966c93accd3779bfa4be7282f28dca1 | |
parent | beca07f60155cd3fe13ae5d4b6878921266a62d6 [diff] |
playground: Remove reliance on rt.R()/rt.Init(). Change-Id: I512c8aa7a805654f18044775c6aa8c653319d0dc
Install Docker:
On Goobuntu, we recommend overriding the default graph dir (/var/lib/docker
) to avoid filling up the root filesystem partition, which is quite small. To do so, add the following line to your /etc/default/docker
:
DOCKER_OPTS="${DOCKER_OPTS} -g /usr/local/google/docker"
Start (or restart) the Docker daemon:
$ sudo service docker restart
Build the playground Docker image (this will take a while...):
$ cp ~/.netrc $VEYRON_ROOT/veyron/go/src/veyron.io/playground/builder/netrc $ sudo docker build -t playground $VEYRON_ROOT/veyron/go/src/veyron.io/playground/builder/.
Note: If you want to ensure an up-to-date version of veyron is installed in the Docker image, run the above command with the “--no-cache” flag.
Test your image (without running compilerd):
$ sudo docker run -i playground < /usr/local/google/home/sadovsky/dev/veyron-www/content/playgrounds/code/fortune/ex0-go/bundle.json
Install the playground binaries:
$ veyron go install veyron.io/playground/...
Run the compiler binary as root:
$ sudo $VEYRON_ROOT/veyron/go/bin/compilerd --shutdown=false --address=localhost:8181
Or, run it without Docker (for faster iterations during development):
$ cd $(mktemp -d "/tmp/XXXXXXXX") $ PATH=$VEYRON_ROOT/veyron/go/bin:$PATH compilerd --shutdown=false --address=localhost:8181 --use-docker=false
The server should now be running at http://localhost:8181 and responding to compile requests at http://localhost:8181/compile.
Add ?pgaddr=//localhost:8181
to any veyron-www page to make its embedded playgrounds talk to your server. Add ?debug=1
to see debug info from the builder.