github.com/cloudfoundry-attic/garden-linux@v0.333.2-candidate/README.md (about)

     1  # Garden Linux
     2  
     3  A Linux backend for [Garden](https://github.com/cloudfoundry-incubator/garden).
     4  
     5  You can deploy Garden-Linux using the [Garden-Linux BOSH Release](https://github.com/cloudfoundry-incubator/garden-linux-release).
     6  This is the only "supported" way to use Garden-Linux.
     7  If you're not using BOSH, and still want to have a play, follow the insructions below.
     8  
     9  ## Installing Garden-Linux
    10  
    11  **Note:** the rest of these instructions assume you arranged for the garden-linux code and dependencies to be
    12  present in your `$GOPATH` on a machine running Ubuntu 14.04 or later.
    13  The easiest way to achieve this is actually to check out the [Garden-Linux BOSH Release](https://github.com/cloudfoundry-incubator/garden-linux-release), since that's the only place that all the dependency version data is recorded.
    14  The steps are:
    15  
    16  ```
    17  git clone --recursive git@github.com:cloudfoundry-incubator/garden-linux-release
    18  cd garden-linux-release
    19  export GOPATH=$PWD
    20  ```
    21  
    22  ### Install and load aufs
    23  
    24  ```
    25  sudo apt-get install linux-image-extra-$(uname -r)
    26  sudo modprobe aufs
    27  ```
    28  
    29  ### Build garden-linux
    30  
    31  ```
    32  cd $GOPATH/src/github.com/cloudfoundry-incubator/garden-linux # assuming your $GOPATH has only one entry
    33  make
    34  ```
    35  
    36  ### Set up necessary directories
    37  
    38  ```
    39  sudo mkdir -p /opt/garden/depot /opt/garden/graph /opt/garden/state
    40  ```
    41  
    42  ### Download a RootFS (Optional)
    43  
    44  If you plan to run docker images instead of using rootfs from disk, you can skip this step.
    45  
    46  e.g. if you want to use the default Cloud Foundry rootfs:
    47  ```
    48  wget https://github.com/cloudfoundry/stacks/releases/download/1.19.0/cflinuxfs2-1.19.0.tar.gz
    49  sudo mkdir /opt/garden/rootfs
    50  sudo tar -xzpf cflinuxfs2-1.19.0.tar.gz -C /opt/garden/rootfs
    51  ```
    52  
    53  ### Run garden-linux
    54  
    55  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.
    56  
    57  ```
    58  cd $GOPATH/src/github.com/cloudfoundry-incubator/garden-linux # assuming your $GOPATH has only one entry
    59  sudo ./out/garden-linux \
    60         -depot=/opt/garden/depot \
    61         -graph=/opt/garden/graph \
    62         -stateDir=/opt/garden/state \
    63         -rootfs=/opt/garden/rootfs \
    64         -bin=$PWD/linux_backend/bin \
    65         -listenNetwork=tcp \
    66         -listenAddr=127.0.0.1:7777
    67  ```
    68  
    69  ### Kick the tyres
    70  
    71  The easiest way to start creating containers is using the unofficial [`gaol`](https://github.com/contraband/gaol) command line client.
    72  For more advanced use cases, you'll want to use the [Garden](https://github.com/cloudfoundry-incubator/garden) client package.
    73  
    74  ## Development
    75  
    76  See the [Developer's Guide](docs/DEVELOPING.md) to get started.
    77  
    78  Many integration tests are in another repository, [Garden Integration Tests](https://github.com/cloudfoundry-incubator/garden-integration-tests).