Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (57 sloc) 2.56 KB

Cloudfoundry single-vm setup

This repo is intended to manage a single vm cloudfoundry installation.

The installation of cloudfoundry itself, is handled through a script (see install section below), we are waiting for the release of oneric for the appearence of packages, before making a chef recipe.

To reduce setup effort, we use the * domain, which points to localhost; and the vm redirects it's port 80 to the hosts 8080 port. Thus vmc target redirects to the vm.


Install (move this to a recipe)

sudo su -
apt-get update
apt-get install openssh-server curl
bash < <(curl -s -k -B

Client setup

We need to install the vmc gem, (will be known as cloundfoundry-client in ubuntu 11.10). If you want php support, as of this writing we need to fetch the pre-release version of the gem: 0.3.13.beta.2

# add php supprt - all that is required is the new vmc client
#sudo gem install vmc
sudo gem install vmc --pre

Usage and examples

start (manage) the service

~/cloudfoundry/vcap/bin/vcap start
~/cloudfoundry/vcap/bin/vcap status

Grant admin privileges:

# become an admin
# edit admins: [,] to
# admins: [] 
emacs ~/cloudfoundry/vcap/cloud_controller/config/cloud_controller.yml 
~/cloudfoundry/vcap/bin/vcap restart


# to go back: vmc target
vmc target
vmc info
vmc register --email --passwd blablabla

Manage users (admin)

vmc users
vmc add-user ...
vmc delete-user ...

node.js example

cd node-app
npm install mongodb
vmc push node-app  #override url :, take away port:8080

php example

cd php-app
vmc push php-app  #override url :, take away port:8080

Without promts:

## create - without prompts
vmc push php-app --path php-app --no-prompt --url --no-start
vmc create-service mongodb --bind php-app # --name optional
vmc start php-app

# delete - without prompts - find the service name
vmc stop php-app
vmc delete-service .....