old

package
v0.0.0-...-a51aa93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2015 License: Apache-2.0 Imports: 38 Imported by: 0

README

Garden in Go, on linux

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/
./scripts/add-route
./scripts/run-garden-remote-linux

# or run from inside the vm:
vagrant ssh
sudo su -
goto garden-linux
./scripts/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

  • Docker v0.9.0 or later (for creating a root filesystem)
  • git (for garden and its dependencies on github)
  • mercurial (for some dependencies not on github)

Run all the following commands as root.

Make a directory to contain go code:

# mkdir ~/go

From now on, we assume this directory is in /root/go.

Install Go 1.2.1 or later. For example, install gvm and issue:

# gvm install go1.2.1
# gvm use go1.2.1

Extend $GOPATH and $PATH:

# export GOPATH=/root/go:$GOPATH
# export PATH=$PATH:/root/go/bin

Install godep (used to manage garden's dependencies):

# go get github.com/kr/godep

Get garden and its dependencies:

# go get github.com/cloudfoundry-incubator/garden-linux
# cd /root/go/src/github.com/cloudfoundry-incubator/garden-linux
# godep restore

Make the C code:

# make

Create a root filesystem, extract it (still as root), and point to it:

# make garden-test-rootfs.tar
# gzip garden-test-rootfs.tar
# mkdir -p /var/garden/rootfs
# tar xzf garden-test-rootfs.tar.gz -C /var/garden/rootfs
# export GARDEN_TEST_ROOTFS=/var/garden/rootfs

(You may wish to save the root filesystem tar.gz file for future use.)

Install ginkgo (used to test garden):

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

Run the tests:

# ginkgo -r

Documentation

Index

Constants

View Source
const (
	DefaultNetworkPool = "10.254.0.0/22"
	DefaultMTUSize     = 1500
)

Variables

This section is empty.

Functions

func Main

func Main()

Types

This section is empty.

Directories

Path Synopsis
integration
fakes
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter
fake_copier
This file was generated by counterfeiter
This file was generated by counterfeiter
fake_graph_driver
This file was generated by counterfeiter
This file was generated by counterfeiter
fake_mapper
This file was generated by counterfeiter
This file was generated by counterfeiter
fake_namespacer
This file was generated by counterfeiter
This file was generated by counterfeiter
fake_rootfs_provider
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL