Skip to content

luan/teapot

Repository files navigation

Teapot Build Status

Teapot is the API that powers Tiego. It's a simple, RESTful JSON API to manage cloud provided workstations backed by Diego and Docker images.

You can find the live API documentation here: http://docs.teapot.apiary.io/

Setup

Just go get it: go get github.com/luan/teapot

Usage

To run the Teapot API with Diego Edge:

teapot -address 0.0.0.0:8080 -receptorAddress http://receptor.192.168.11.11.xip.io/

To run the Teapot API on Diego Edge:

cd $GOPATH/src/github.com/luan/teapot
export RECEPTOR=http://receptor.192.168.11.11.xip.io/
bin/dance # optionally provide a bucket name, default: tiego-artifacts

You can replace the receptor URL with your receptor for other types of deployments, receptors with Basic Auth enabled should work out of the box with something like http://user:password@receptor.example.com.

Development flow

To deploy the Teapot to a Diego, we use a minimal busybox image and download the compiled binary for Teapot and the spy from the docker-circus.

The Teapot binary is stored on an S3 bucket, so before you deploy your changes to your Diego environment you need to get s3 working.

Also, if you're not developing from a linux workstation, you will need golang with cross-compile support.

Install & Configure s3cmd

# for OSX
brew install s3cmd
# for debian based linux distros
sudo apt-get install -y s3cmd
s3cmd --configure # enter credentials Amazon S3 enabled account

Build & Upload

bin/build
bin/upload # optionally provide a bucket name, default: tiego-artifacts
bin/deploy

Or you can use bin/dance [BUCKET] for convenicence

After this you can deploy Teapot using bin/deploy, as explained above.

Golang cross-compile on OSX:

brew install go --cross-compile-all # or reinstall if you already had it installed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors