Introduction1. Cloud Foundry is an open source cloudcomputing platform as a service (PaaS) .2. Developed by VMware .3. Apache License 2.0 .4. The industry’s first open platform as aservice 5. Derek Collison and Mark Lucovsky - Two ofthe Super Coders Behind Cloud Foundry whenit was initially started in April 2011 .
Why Cloud Foundry?● Developers Agility - No one between you and your application ● Optimized Software Delivery - Portability without changes – Dev/Test/Production, Private/Public clouds 
Why Cloud Foundry?● Open System - The freedom to choose  ○ Choice of clouds for deployment, across public, private and hybrid clouds ■ CloudFoundry.com – VMwares operated Cloud Service ■ Micro Cloud Foundry™ ○ Choice of industry standard frameworks. Spring for Java, Scala etc. ○ Choice of application services. RabbitMQ, MySQL, MongoDB etc ○ Extensible architecture ○ A Community open-source project
Choice of Developer Frameworks(The Top of the Triangle)Cloud Foundry supports the followingapplication development frameworks :1. Spring/Java2. Ruby on Rails3. Ruby and Sinatra4. Node.js5. Grails
Frameworks● The support includes a runtime environment that enables your applications to execute on Cloud Foundry● Deployment tools (vmc and STS) detect the framework and automate configuration and deployment to Cloud Foundry● Can bind with services, such as database
Choice of Application Services (TheLeft Side of the Triangle)Cloud Foundry services :1. MySQL, the open source relational database.2. vFabric Postgres, relational database based onPostgreSQL.3. MongoDB, the scalable, open, document-baseddatabase.4. Redis, the open key-value data structure server.5. RabbitMQ, for reliable, scalable, and portablemessaging.
Services● To access Cloud Foundry services from your application, you first create a service, and then bind it to your application .● When your application runs on Cloud Foundry, the environment contains a VCAP_SERVICES variable that has information about all the services bound to the application. The content of this variable is a JSON document .
Choice of Clouds (The Right Side ofthe Triangle)● Public, Private, VMware based and non- VMware based it up to the developer and organization as to where they want to run Cloud Foundry .● Cloud Foundry can run on top of vSphere and vCloud Infrastructure .
Micro Cloud Foundry● Micro Cloud Foundry™ - now you can run a complete instance of Cloud Foundry on your own computer .● It is a full instance of Cloud Foundry that provides the flexibility of local development while preserving your options for future deployment and scaling of your applications .
Micro Cloud FoundryJust 3 steps :1. Install - VMware Player (free)2. Login using CloudFoundry.com credentials3. Download Micro Cloud Foundry virtualmachine image (Its about 1.4GB)prompt$ du -h micro-v119-20121113.000224.zip1.4G micro-v119-20121113.000224.zip
Micro Cloud Foundry Configuration● When you first start the VM, it will prompt to configure the Micro Cloud Foundry instance.● Set password for the ‘root’ and ‘vcap’● The ‘root’ and ‘vcap’ users are the administrative/control accounts for your Micro Cloud Foundry VM .● Micro Cloud Foundry networking is also configured.● Enter DNS configuration token, which is received on the page where you downloaded the Micro Cloud VM. (This is very important to work in offline mode as we are relying on DNS lookup)
Micro Cloud Foundry ConfigurationCan use SSH tunnel to access the Micro CloudFoundry VM 
Working Offline With Micro CloudFoundry● Virtual Machine Settings -> Network Adapter -> make sure that NAT is selected.● Select option 6 to toggle to offline mode.● Configure host computer to route DNS requests to the Micro Cloud Foundry VM. ○ For DHCP:edit the file /etc/dhcp3/dhclient.conf and addthis line:prepend domain-name-servers <IP_VM>
Command-Line Interface (vmc)Cloud Foundry command-line interface can beused to execute all the Cloud Foundryoperations, such as configuring yourapplications and deploying them to CloudFoundry .Prerequisite: Ruby and RubyGemsprompt$ sudo gem install vmc
vmc targetExecute the vmc target command to specify theCloud Foundry target to which you will deployyour applications .1. To deploy on the PaaS Cloud Foundry,specify https://api.cloudfoundry.com2. To deploy on your local Micro CloudFoundry, specify http://api.<appname>.cloudfoundry.me, where appname is thedomain you registered for your application atthe Micro Cloud Foundry Web site.
VMC Basic CommandsThe following command targets the PaaSCloud Foundry :prompt$ vmc target https://api.cloudfoundry.comTo determine your current target:prompt$ vmc targetLogin:prompt$ vmc login
VMC Basic CommandsEnsure you have successfully logged in:prompt$ vmc infoChange password:prompt$ vmc passwdView the full list of VMC commands:prompt$ vmc help
Logging into Micro Cloud FoundryFirst register a user:prompt$ vmc registerThen login:prompt$ vmc login
Deploying a Sample ApplicationA simple Java Web Application from Maven.mvn archetype:generate -DgroupId=org.example -DartifactId=maven-webapp -DarchetypeArtifactId=maven-archetype-webappRun “mvn package” to create war file.Change directory to “target”Deploy the application using the vmc push command:prompt$ vmc push
Deploying a Sample ApplicationYou can specify one or all of the following options to passdeployment values; if you do not specify an option, vmcpush will interactively prompt you for it :prompt$ vmc push <appname> --path <directory> --url<deploymentURL> --instances <instance-number> --memory <MB> --no-start
Getting Information about the CloudFoundry TargetDisplay the instances of these service typescreated :prompt$ vmc services
Getting Information aboutApplicationsDisplay the list of applications that are currentlydeployed for your account, along withinstances, health, and associated serviceinstances :prompt$ vmc appsDisplay the standard output log entries for anapplication :prompt$ vmc logs <appname>
Debugging Problems With YourApplicationsViewing Log Files:Use the "vmc files" command to get a list ofavailable log files 
Does Cloud Foundry Auto Scale?According to Collison , Cloud Foundryprovides all the mechanisms to allow auto-scaling, however auto-scaling at its simplestform is not directly builtin.Thorsten  answers to this question bysaying “no, but trivially so”RightScale  provides dynamic serverconfiguration for Cloud Foundry with their All-In-One Cloud Foundry ServerTemplate™.
Simplified Application DeploymentWith Cloud Foundry “Manifest”● Automates application deployments .● The manifests feature uses a YAML document, "manifest.yml" .Ways to create manifest● The manifest can be created by hand● It can be created after a "vmc push"
Topics Not CoveredEclipse Plugin & DebuggingApache MavenSupport for other frameworks. eg: PHPvmc tunnel (Accessing services)
References Wikipedia, “Cloud Foundry,” Wikipedia, the free encyclopedia, 2012.[Online]. Available: http://en.wikipedia.org/wiki/Cloud_Foundry. [Accessed: 09-Jan-2013]. VMware, “Cloud Foundry — Delivering on VMware’s ‘Open PaaS’ Strategy,”The Console Blog - VMware Blogs, 2011. [Online]. Available: http://blogs.vmware.com/console/2011/04/cloud-foundry-delivering-on-vmwares-open-paas-strategy.html. [Accessed: 09-Jan-2013]. VMware, “Two of the Super Coders Behind Cloud Foundry,” CloudFoundry.com Blog, 2011. [Online]. Available: http://blog.cloudfoundry.com/2011/04/12/two-of-the-super-coders-behind-cloud-foundry/. [Accessed: 09-Jan-2013]. VMware, “Explaining The Magic Triangle,” CloudFoundry.com Blog, 2011.[Online]. Available: http://blog.cloudfoundry.com/2011/04/14/explaining-the-magic-triangle/. [Accessed: 09-Jan-2013].