Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Cloud Foundry - the open platform as a service project
Ruby Shell HTML C Other
branch: vbox-install

This branch is even with hmalphettes:vbox-install

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
java @ d9dc8af
services @ ad466fe
tests @ ec939ee


Copyright (c) 2009-2011 VMware, Inc.

== What is Cloud Foundry?
Cloud Foundry is an open platform-as-a-service (PaaS). The system supports
multiple frameworks, multiple application infrastructure services and
deployment to multiple clouds.
== License
Cloud Foundry uses the Apache 2 license.  See LICENSE for details.

== Installation Notes

Cloud Foundry is made up of a number of system components (cloud controller,
health manager, dea, router, etc.). These components can run co-located in a
single vm/single os or can be spread across several machines/vm's. 

For development purposes, the preferred environment is to run all of the core
components within a single vm and then interact with the system from outside of
the vm via an ssh tunnel. The pre-defined domain * maps to local host,
so when you use this setup, the end result is that your development environment
is available at

For large scale or multi-vm deployments, the system is flexible enough to allow
you to place system components on multiple vm's, run multiple nodes of a given
type (e.g., 8 routers, 4 cloud controllers, etc.) 

The detailed install instructions below walk you through the install process
for a single vm installation. 

Versions of these instructions have been used for production deployments, and 
for our own development purposes. many of us develop on mac laptops, so some
additional instructions for this environment have been included.

== Detailed Install/Run Instructions:

- step #0: 
    - setup a VM with a pristine Ubuntu 10.04.2 server 64bit image, 
    - you may wish to snapshot your VM now in case things go pear shaped.
    - to enable remote access (more fun than using the console), install ssh.

     sudo apt-get install -y openssh-server curl

- step #1:
    - Run the install script. It'll ask for your sudo password at the beginning
      and towards the end. The entire process takes ~1 hour, so just keep a loose
      eye on it.

    bash < <(curl -s -k -B

- step #2 *Optional, mac users only*, create a local ssh tunnel 
  # from your vm, run ifconfig and note eth0, possiby
  # go to your mac terminal window and create a local port 80 tunnel as
  # once you do this, from both your mac, and from within the vm, and * 
  # map to localhost which maps to your running cloudfoundry instance
  sudo ssh -L 80: mhl@ -N

===Trying your setup

- step #3, validate that you can connect and tests pass
  # from the console of your vm, or from your mac (thanks to local tunnel)

  vmc target
  vmc info

  #it should produce roughly the following...

  VMware's Cloud Application Platform
  For support visit

  Target: (v0.999)
  Client:   v0.3.10

  #play around as a user, start with
  vmc register --email --passwd password
  vmc login --email --passwd password

  #to see what else you can do try
  vmc help

== Testing your setup  

#Once the system is installed, you can run the following command Basic System
#Validation Tests (BVT) to ensure that major functionality is working.
cd cloudfoundry/vcap
cd tests && bundle package; bundle install && cd ..
rake tests
# unit tests can also be run using the following.
cd cloudcontroller
rake spec
cd ../dea
rake spec
cd ../router
rake spec
cd ../health_manager
rake spec

-step #4, you are done, make sure you can run a simple hello world app.
  #1) create an empty directory for your test app (lets call it env), and enter it.
  cd env

  #2) cut and paste the following app into a ruby file (lets say env.rb)
  vi env.rb

  ==== cut ===

require 'rubygems'
require 'sinatra'

get '/' do
  host = ENV['VMC_APP_HOST']
  port = ENV['VMC_APP_PORT']
  "<h1>XXXXX Hello from the Cloud! via: #{host}:#{port}</h1>"

get '/env' do
  res = ''
  ENV.each do |k, v|
    res << "#{k}: #{v}<br/>"

 === cut ===

  # run the following the create/push a 4 instance version of this app
  # validate by running vmc apps, note the 4 instance running app
  # then go to a browser and hit, note that hitting refresh
  # will show a different port in each refresh reflecting the different
  # active instances
  vmc push env --instances 4 --mem 64M --url -n

  vmc apps

  #should give the following output.
  #| Application | #  | Health  | URLS        | Services |
  #| env         | 1  | RUNNING | |          |

Something went wrong with that request. Please try again.