Debian Codegraph @

api/v0/examples/README.md

raw symbols SCIP
1 # Examples
2
3 ## Building
4 ```
5 $ go get github.com/tools/godep
6 $ make
7 ```
8
9 ## Running
10 ### Start Mesos
11 You will need a running Mesos master and slaves to run the examples. For instance, start a local Mesos:
12 ```
13 $ <mesos-build-install>/bin/mesos-local --ip=127.0.0.1 --port=5050 --roles=golang
14 ```
15 See http://mesos.apache.org/gettingstarted/ for getting started with Apache Mesos.
16
17 ### Start the Go scheduler/executor examples
18 ```
19 $ export EXECUTOR_BIN=$(pwd)/_output/executor
20 $ ./_output/scheduler -master=127.0.0.1:5050 -executor="$EXECUTOR_BIN" -logtostderr=true
21 ```
22 If all goes well, you should see output about task completion.
23 You can also point your browser to the Mesos GUI http://127.0.0.1:5050/ to validate the framework activities.
24
25 ### Start the Go scheduler with other executors
26 You can also use the Go `example-scheduler` with executors written in other languages such as `Python` or `Java` for further validation (note: to use these executors requires a build of the mesos source code with `make check`):
27 ```
28 $ ./_output/scheduler -master=127.0.0.1:5050 -executor="<mesos-build>/src/examples/python/test-executor" -logtostderr=true
29 ```
30 Similarly for the Java version:
31 ```
32 $ ./_output/scheduler -master=127.0.0.1:5050 -executor="<mesos-build>/src/examples/java/test-executor" -logtostderr=true
33 ```
34
35 ### Start the Go persistent scheduler/executor examples
36 ```
37 $ export EXECUTOR_BIN=$(pwd)/_output/executor
38 $ ./_output/persistent_scheduler -master=127.0.0.1:5050 -executor="$EXECUTOR_BIN" -logtostderr=true -role=golang -mesos_authentication_principal=golang
39 ```