Cloud Foundry - the open platform as a service project
Copyright (c) 2009-2011 VMware, Inc.
Cloud Foundry is an open platform-as-a-service (PaaS). The system supports multiple frameworks, multiple application infrastructure services and deployment to multiple clouds.
Cloud Foundry uses the Apache 2 license. See LICENSE for details.
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.
There are two methods for installing VCAP. One is a manual process, which you might choose to do if you want to understand the details of what goes into a bringing up a VCAP instance. The other is an automated process contributed by the community. In both cases, you need to start with a stock Ubuntu server VM.
To install ssh:
sudo apt-get install openssh-serverRun the install script. It'll ask for your sudo password at the beginning and towards the end. The entire process takes about half an hour, so just keep a loose eye on it.
sudo apt-get install curl
bash @If this works, create a local port 80 tunnel:
sudo ssh -L ::80 @ -NIf you are not already running a local web server, use port 80 as your local port, otherwise you may want to use 8080 or another common http port.
Once you do this, from both your mac, and from within the vm, api.vcap.me and *.vcap.me
will map to localhost which will map to your running Cloud Foundry instance.
vmc target api.vcap.me
vmc infoNote: If you are using a tunnel and selected a local port other than 80 you
will need to modify the target to include it here, like api.vcap.me:8080.
VMware's Cloud Application Platform
For support visit [email protected]
Target: http://api.vcap.me (v0.999)
Client: v0.3.10vmc register --email [email protected] --passwd password
vmc login --email [email protected] --passwd passwordvmc helpOnce the system is installed, you can run the following Yeti cases(Yeti stands for "Yeti Extraordinary Test Infrastructure") to ensure that major functionality is working.
You can run the Yeti cases as the following steps:
cd cloudfoundry/vcap/tests
./update ## this is not required for running administrative test cases
bundle exec rake full[1]During the first time, Yeti will prompt you for information about your environment:
target should be "api.vcap.me".
This information except password is saved to ~/.bvt/config.yml file.
When run the second time around, Yeti will not prompt for the information again.
Create an empty directory for your test app (lets call it env), and enter it.
mkdir env && cd envCut and paste the following app into a ruby file (lets say env.rb):
require 'rubygems'
require 'sinatra'
get '/' do
host = ENV['VCAP_APP_HOST']
port = ENV['VCAP_APP_PORT']
"
XXXXX Hello from the Cloud! via: #{host}:#{port} " end
get '/env' do
res = ''
ENV.each do |k, v|
res << "#{k}: #{v}
" end res end
vmc push env --instances 4 --mem 64M --url env.vcap.me -nNote that hitting refresh will show a different port in each refresh reflecting the different active instances
vmc apps+-------------+----+---------+-------------+----------+
| Application | # | Health | URLS | Services |
+-------------+----+---------+-------------+----------+
| env | 1 | RUNNING | env.vcap.me | |
+-------------+----+---------+-------------+----------+No open issues yet, or sync has not completed.