Skip to content

HTTPS clone URL

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.
bin
cloud_controller
common
dea
health_manager
java @ d9dc8af
lib
rakelib
router
services @ ad466fe
setup
tests @ ec939ee
.gitignore
.gitmodules
.rvmrc
AUTHORS
LICENSE
NOTICE
README
Rakefile

README

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 *.vcap.me maps to local host,
so when you use this setup, the end result is that your development environment
is available at http://api.vcap.me.

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, 
      (http://www.ubuntu.com/business/get-ubuntu/download)
    - 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 https://github.com/cloudfoundry/vcap/raw/master/setup/install)

- step #2 *Optional, mac users only*, create a local ssh tunnel 
  # from your vm, run ifconfig and note eth0, possiby 192.168.252.130
  # 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, api.vcap.me and *.vcap.me 
  # map to localhost which maps to your running cloudfoundry instance
  sudo ssh -L 80:192.168.252.130:80 mhl@192.168.252.130 -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)

  #try 
  vmc target api.vcap.me
  vmc info

  #it should produce roughly the following...

  VMware's Cloud Application Platform
  For support visit support@cloudfoundry.com

  Target:   http://api.vcap.me (v0.999)
  Client:   v0.3.10


  #play around as a user, start with
  vmc register --email foo@bar.com --passwd password
  vmc login --email foo@bar.com --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>"
end

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

 === 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 env.vcap.me/, 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 env.vcap.me -n

  #running 
  vmc apps

  #should give the following output.
  #+-------------+----+---------+-------------+----------+
  #| Application | #  | Health  | URLS        | Services |
  #+-------------+----+---------+-------------+----------+
  #| env         | 1  | RUNNING | env.vcap.me |          |
  #+-------------+----+---------+-------------+----------+

Something went wrong with that request. Please try again.