Giter Club home page Giter Club logo

garden's Introduction

                                                 ,-.
                                                  ) \
                                              .--'   |
                                             /       /
                                             |_______|
                                            (  O   O  )
                                             {'-(_)-'}
                                           .-{   ^   }-.
                                          /   '.___.'   \
                                         /  |    o    |  \
                                         |__|    o    |__|
                                         (((\_________/)))
                                             \___|___/
                                        jgs.--' | | '--.
                                           \__._| |_.__/

Warden in Go, because why not.

Backends

Garden provides a platform-neutral API for containerization. Backends implement support for various specific platforms. So far, the list of backends is as follows:

Garden API

The canonical API for Garden is defined as a collection of Go interfaces. See the godoc documentation for details.

For convenience during Garden development, Garden also supports a REST API which may be used to "kick the tyres". The REST API is not supported.

For example, if Garden Linux is deployed to localhost and configured to listen on port 7777, the following commands may be used to kick its tyres:

# list containers (should be empty)
curl http://127.0.0.1:7777/containers

# create a container
curl -H "Content-Type: application/json" \
  -XPOST http://127.0.0.1:7777/containers \
  -d '{"rootfs":"docker:///busybox"}'

# list containers (should list the handle returned above)
curl http://127.0.0.1:7777/containers

# spawn a process
#
# curl will choke here as the protocol is hijacked, but...it probably worked.
curl -H "Content-Type: application/json" \
  -XPOST http://127.0.0.1:7777/containers/${handle}/processes \
  -d '{"path":"sleep","args":["10"]}'

See REST API examples for more.

Testing

Pre-requisites

  • git (for garden and its dependencies on github)
  • mercurial (for some dependencies not on github)

Make a directory to contain go code:

$ mkdir ~/go

Install Go. For example, install gvm and issue:

$ gvm install go1.4.1
$ gvm use go1.4.1

Make sure that your $GOPATH and $PATH are set. For example:

$ export GOPATH=~/go:$GOPATH
$ export PATH=$PATH:~/go/bin

Get garden and its dependencies:

$ go get -t -u github.com/cloudfoundry-incubator/garden
$ cd ~/go/src/github.com/cloudfoundry-incubator/garden
$ go get -t -u ./...

Install ginkgo (used to test garden):

$ go install github.com/onsi/ginkgo/ginkgo

Run the tests:

$ ginkgo -r

garden's People

Contributors

andyzh avatar d avatar dliebreich avatar emalm avatar frodenas avatar glestaris avatar glyn avatar julz avatar mariash avatar maxbrunsfeld avatar mheath avatar mikegehard avatar mokiat avatar onsi avatar pietern avatar slimyang avatar sykesm avatar thansmann avatar tom025 avatar vito avatar xoebus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.