Garden with a linux backend
Go Shell Other
Latest commit f00e791 Nov 2, 2016 @teddyking teddyking committed with williammartin Add deprecation notice to README
[#133451651]

Signed-off-by: Will Martin <wmartin@pivotal.io>
Permalink
Failed to load latest commit information.
.github Add issue template Mar 3, 2016
container_daemon Use new code.cloudfoundry.org import paths Jul 15, 2016
container_provider Rename and Refactor ContainerPool to ResourcePool Jun 18, 2015
container_repository Use new code.cloudfoundry.org import paths Jul 15, 2016
containerizer Use new code.cloudfoundry.org import paths Jul 15, 2016
docs Use new code.cloudfoundry.org import paths Jul 15, 2016
hook Use new code.cloudfoundry.org import paths Jul 15, 2016
integration Capability tests does not rely on interited zeroed caps Aug 4, 2016
iodaemon Bump iodaemon timeout for slow env resilience Aug 12, 2016
linux_backend Garden Linux shouldn't care about AppArmor Sep 29, 2016
linux_container Remove destination filter from MASQUERADE rules Jul 19, 2016
logging Use new code.cloudfoundry.org import paths Jul 15, 2016
metrics Use new code.cloudfoundry.org import paths Jul 15, 2016
network Use new code.cloudfoundry.org import paths Jul 15, 2016
pkg/vars Use new code.cloudfoundry.org import paths Jul 15, 2016
port_pool Use new code.cloudfoundry.org import paths Jul 15, 2016
process Use new code.cloudfoundry.org import paths Jul 15, 2016
process_tracker Iodaemon errors bubble to garden log Jul 20, 2016
resource_pool Use new code.cloudfoundry.org import paths Jul 15, 2016
script Add support for the `script/test` way for vim Mar 10, 2015
scripts Can run tests from vim after renaming the imports Jul 20, 2016
sysconfig Use new code.cloudfoundry.org import paths Jul 15, 2016
sysinfo Use new code.cloudfoundry.org import paths Jul 15, 2016
system Use new code.cloudfoundry.org import paths Jul 15, 2016
utilities Improve monitor script Oct 31, 2015
.drone.yml Revert "Remove .drone.yml as it doesn't seem to be in use." Apr 1, 2015
.gitignore Ignore .envrc Jul 14, 2015
.gitmodules prune non-linux-backend code Apr 9, 2014
.travis.yml bump to go 1.4.1 [#86810456] Feb 3, 2015
LICENSE Add license Aug 13, 2014
Makefile Use new code.cloudfoundry.org import paths Jul 15, 2016
README.md Add deprecation notice to README Nov 2, 2016
TODO.md Move tasks to story. May 6, 2015
main.go Use new code.cloudfoundry.org import paths Jul 15, 2016

README.md

Garden Linux

Garden-Linux is not actively developed anymore. We are currently focusing on the OCI Garden backend: garden-runc.

Note: This repository should be imported as code.cloudfoundry.org/garden-linux.

A Linux backend for Garden.

You can deploy Garden-Linux using the Garden-Linux BOSH Release. This is the only "supported" way to use Garden-Linux. If you're not using BOSH, and still want to have a play, follow the insructions below.

Installing Garden-Linux

Note: the rest of these instructions assume you arranged for the garden-linux code and dependencies to be present in your $GOPATH on a machine running Ubuntu 14.04 or later with Go 1.6 installed. The easiest way to achieve this is actually to check out the Garden-Linux BOSH Release, since that's the only place that all the dependency version data is recorded. The steps are:

git clone --recursive git@github.com:cloudfoundry/garden-linux-release
cd garden-linux-release
export GOPATH=$PWD

Install and load aufs

sudo apt-get install linux-image-extra-$(uname -r)
sudo modprobe aufs

Build garden-linux

cd $GOPATH/src/code.cloudfoundry.org/garden-linux # assuming your $GOPATH has only one entry
make

Set up necessary directories

sudo mkdir -p /opt/garden/depot /opt/garden/graph /opt/garden/state

Download a RootFS (Optional)

If you plan to run docker images instead of using rootfs from disk, you can skip this step.

e.g. if you want to use the default Cloud Foundry rootfs:

wget https://github.com/cloudfoundry/stacks/releases/download/1.19.0/cflinuxfs2-1.19.0.tar.gz
sudo mkdir /opt/garden/rootfs
sudo tar -xzpf cflinuxfs2-1.19.0.tar.gz -C /opt/garden/rootfs

Run garden-linux

Note that if you opted not to download a rootfs in the previous step, you can remove the -rootfs=/opt/garden/rootfs parameter from the command.

cd $GOPATH/src/code.cloudfoundry.org/garden-linux # assuming your $GOPATH has only one entry
sudo ./out/garden-linux \
       -depot=/opt/garden/depot \
       -graph=/opt/garden/graph \
       -stateDir=/opt/garden/state \
       -rootfs=/opt/garden/rootfs \
       -bin=$PWD/linux_backend/bin \
       -listenNetwork=tcp \
       -listenAddr=127.0.0.1:7777

Kick the tyres

The easiest way to start creating containers is using the unofficial gaol command line client. For more advanced use cases, you'll want to use the Garden client package.

Development

See the Developer's Guide to get started.

Many integration tests are in another repository, Garden Integration Tests.