Name: garden-runc-release
Owner: Cloud Foundry
Description: null
Created: 2015-09-07 09:19:58.0
Updated: 2018-05-24 15:04:23.0
Pushed: 2018-05-24 15:04:22.0
Homepage: null
Size: 2791
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A BOSH release for deploying Guardian.
Guardian is a simple single-host OCI container manager. It implements the Garden API which is used in Cloud Foundry.
Clone it:
clone https://github.com/cloudfoundry/garden-runc-release
arden-runc-release
submodule update --init --recursive
The easiest way to run Garden-runC is to deploy it with BOSH Lite, a VirtualBox development environment for BOSH. Once you have set up bosh-lite (follow the instructions in the bosh-lite docs), just deploy like any bosh release, e.g:
arden-runc-release # if you're not already there
ripts/deploy-lite.sh
You can retrieve the address of the Garden-runC server by running bosh vms
.
It will be 10.244.0.2
if using the provided deploy-lite script.
The server port defaults to 7777
.
The easiest way to start creating containers is to use the
gaol
command line client.
e.g. gaol -t 10.244.0.2:7777 create -n my-container
For more advanced use cases, you'll need to use the Garden client package for Golang.
Garden has experimental support for running containers without requiring root privileges. Take a look at the rootless-containers.md doc for further info.
If you would like to enable rootless containers please read this document.
In order to help us extend Garden-runC, we recommend opening a Github issue to describe the proposed features or changes. We also welcome pull requests.
You can use other distributions or OS X for development since a good chunk of the unit tests work across alternative platforms, and you can run platform specific tests in a VM using Concourse CI.
In order to contribute to the project you may want some of the following installed:
Garden-runC uses git submodules to maintain its dependencies and components. Some of Garden-runC's important components currently are:
src/code.cloudfoundry.org/garden
is the API server and client.src/code.cloudfoundry.org/guardian
is the Garden backend.src/code.cloudfoundry.org/grootfs
downloads and manages
root filesystems.src/code.cloudfoundry.org/garden-shed
is the legacy rootfs management piece,
superseded by GrootFS.src/code.cloudfoundry.org/garden-integration-tests
are the cross-backend integration tests of Garden.Set your $GOPATH
to the checked out directory, or use Direnv to do this, as
below:
nv allow
Concourse CI is used for running Garden-runC tests in a VM. It provides the Fly CLI for Linux and MacOSX. Instructions for deploying a single VM Concourse using BOSH can be found in the concourse-deployment repo
Once running, navigate to https://192.168.100.4:8080 in a web browser
and download the Fly CLI using the links found in
the bottom-right corner. Place the fly
binary somewhere on your $PATH
.
The tests use the Ginkgo BDD testing framework.
Assuming you have configured a Concourse and installed Ginkgo, you can run all
the tests by executing FLY_TARGET=<your concourse target> ./scripts/test
from the top level garden-runc-release
directory.
Note: The concourse-lite VM may need to be provisioned with more RAM If you start to see tests failing with 'out of disk' errors.
The integration tests can be executed in Concourse CI by using Fly CLI and
executing ./scripts/test
.
To run individual tests, use./scripts/remote-fly
:
t your concourse target
rt GARDEN_REMOTE_ATC_URL=<target>
nning Guardian tests
ripts/remote-fly ci/unit-tests/guardian.yml
nning Garden tests
ripts/remote-fly ci/unit-tests/garden.yml
nning Garden Integration tests
ripts/remote-fly ci/integration-tests/gdn-linux.yml
nning Garden Integration Windows Regression tests (aka Gats98)
OWS_TEST_ROOTFS=docker:///microsoft/nanoserver:1709 ./scripts/remote-fly ci/integration-tests/gdn-linux.yml
It is possible to run the integration tests locally on a Linux based OS like Ubuntu, but we don't recommend it due to the dependencies required, and the need for parts of the testing suite to run as a privileged user. If you'd like to run them locally, you will need at least:
The tests can be executed without Concourse CLI by running ginkgo -r
command for any of the components:
nning Garden unit tests
rc/code.cloudfoundry.org/garden
go -r
nning Guardian unit tests
rc/code.cloudfoundry.org/guardian
go -r
It should be possible to run the unit tests on any system that satisfies golang build constraints.
Write code in a submodule:
rc/code.cloudfoundry.org/guardian # for example
checkout master
pull
st, code, test..
commit
push
Commit the changes, run the tests, and create a bump commit:
om the garden-runc directory
ripts/test-and-bump # or just ./scripts/bump if you've already run the tests
var/vcap/data/garden/depot/<handle>
/vcap/packages/runc/bin/runc exec <handle> <command>
The garden-ordnance-survey tool can be used to gather information useful for debugging issues on garden-runc-release deployments. Run this command on the deployment VM as root:
curl bit.ly/garden-ordnance-survey -sSfL | bash
Apache License 2.0