Integrated information from using the sample client document and reframed the sample client document. Added a link from the README to the getting-started page.

This commit is contained in:
Renan DelValle 2016-08-11 11:39:10 -07:00
parent a258b75b15
commit c3a29f4940
3 changed files with 89 additions and 46 deletions

View file

@ -1,48 +1,43 @@
### Using the Sample client with Thermos
Clone Aurora:
# Using the Sample client with Thermos
## Usage:
```
$ git clone git://git.apache.org/aurora.git
client:
-cmd string
Job request type to send to Aurora Scheduler
-executor string
Executor to use (default "thermos")
-password string
Password to use for authorization (default "secret")
-updateId string
Update ID to operate on
-url string
URL at which the Aurora Scheduler exists as [url]:[port]
-username string
Username to use for authorization (default "aurora")
```
Bring up the vagrant image:
```
$ cd aurora
$ vagrant up
```
## Sample commands:
These commands are set to run on a vagrant box. To be able to runt he docker compose
executor examples, the vagrant box must be configured properly to use the docker compose executor.
Download and run the Client to create a Thermos Job:
### Thermos
#### Creating a Thermos job
```
$ go get github.com/rdelval/gorealis
$ cd $GOPATH/src/github.com/rdelval/gorealis
$ go run examples/client.go -executor=thermos -url=http://192.168.33.7:8081 -cmd=create
```
### Using the Sample client with Docker Compose executor
Clone modified version of Aurora repo and checkout the right branch:
#### Kill a Thermos job
```
$ git clone git@github.com:rdelval/aurora.git
$ git checkout DockerComposeExecutor
$ go run $GOPATH/src/github.com/rdelval/gorealis.git/examples/client.go -executor=thermos -url=http://192.168.33.7:8081 -cmd=kill
```
Bring up the vagrant image:
### Docker Compose executor (custom executor)
### Creating Docker Compose executor job
```
$ cd aurora
$ vagrant up
```
Download and run the Client to create a Docker-Compose Job:
```
$ go get github.com/rdelval/gorealis
$ go run $GOPATH/src/github.com/rdelval/gorealis/examples/client.go -executor=compose -url=http://192.168.33.7:8081 -cmd=create
```
From the [Aurora web UI](http://192.168.33.7:8081/scheduler/vagrant/prod/docker-compose/0), create struct dump by clicking on the task ID.
In the struct dump, find the port assigned to the task (named "port0").
Navigate to the 192.168.33.7:`<assigned port>`.
If the page is not found, wait a few minutes while the docker image is downloaded and the container is deployed.
Finally, terminate the job:
### Kill a Docker Compose executor job
```
$ go run $GOPATH/src/github.com/rdelval/gorealis.git/examples/client.go -executor=compose -url=http://192.168.33.7:8081 -cmd=kill
```