Skip to content

glyn/garden

 
 

Repository files navigation

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

Warden in Go, because why not.

Running

For development, you can just spin up the Vagrant VM and run the server locally, pointing at its host:

# if you need it:
vagrant plugin install vagrant-omnibus

# then:
librarian-chef install
vagrant up
ssh-copy-id vagrant@192.168.50.5
ssh vagrant@192.168.50.5 sudo cp -r .ssh/ /root/.ssh/
./bin/add-route
./bin/run-garden-remote-linux

# or run from inside the vm:
vagrant ssh
sudo su -
goto garden
./bin/run-garden-linux

This runs the server locally and configures the Linux backend to do everything over SSH to the Vagrant box.

Testing

Pre-requisites

  • Go 1.2 or later
  • git
  • mercurial
  • godep
mkdir ~/go

Assuming Go was installed using gvm:

export GOPATH=/home/<user>/go:$GOPATH
export PATH=$PATH:/home/<user>/go/bin

Download a root filesystem, extract it as root, and point to it:

curl -O http://cfstacks.s3.amazonaws.com/lucid64.dev.tgz
sudo mkdir -p /var/warden/rootfs
sudo tar xzf lucid64.dev.tgz -C /var/warden/rootfs
export GARDEN_TEST_ROOTFS=/var/warden/rootfs

Get garden and its dependencies:

go get github.com/pivotal-cf-experimental/garden
cd ~/go/github.com/pivotal-cf-experimental/garden
godep restore

Make the C code:

make

Install ginkgo:

cd ~/go/github.com/onsi/ginkgo/ginkgo
go install

Run the tests:

cd ~/go/github.com/pivotal-cf-experimental/garden
ginkgo -r

Releases

No releases published

Packages

No packages published

Languages

  • Go 90.1%
  • C 7.6%
  • Shell 2.2%
  • Ruby 0.1%