Cloud Foundry Bootcamp


Published on

The basics of how to get started with Cloud Foundry, presented at the Cloud Foundry Open Tour in Sofia, Bulgaria, November 2012

Published in: Technology
1 Comment
  • What a great slide! We're looking at message broker solutions right now ... you a top candidate!
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Cloud Foundry Bootcamp

  1. 1. Cloud Foundry BootcampAndy PiperDeveloper © 2012 VMware, Inc. All rights reserved
  2. 2. Hello I’m Andy
  3. 3. Developer Advocate @ Cloud Foundry social web enthusiast maker, educator, LEGO fan OSS supporter / contributor Eclipse Committer (Paho / MQTT)excited by “what’s next”, Internet of Things, etc. @andypiper a few things about me
  4. 4. Capabilities The BasicsHow it Works (Architecture) Micro Cloud Foundry CONFIDENTIAL
  5. 5. What doesCloud Foundry offer? CONFIDENTIAL
  6. 6. Cloud Foundry: Choice of Runtimes CONFIDENTIAL
  7. 7. Frameworks and Runtimes Supported• Out of the Box • Java (.WAR files, on Tomcat. Spring’s an ideal choice here, of course..) • Scala (Lift, Play!) • Ruby (Rails, Sinatra, etc.) • Node.js• Ecosystem Partners • .NET (Uhuru, Tier3) • Python (Stackato) • PHP (AppFog) • Haskell (1) • Erlang (2) 1) 2) CONFIDENTIAL
  8. 8. Cloud Foundry: Choice of Clouds CONFIDENTIAL
  9. 9. Main Risk: Lock In Welcome to the hotel California Such a lovely place Such a lovely face Plenty of room at the hotel California Any time of year, you can find it here Last thing I remember, I was Running for the door I had to find the passage back To the place I was before ’relax,’ said the night man, We are programmed to receive. You can checkout any time you like, But you can never leave! -the Eagles CONFIDENTIAL
  10. 10. Cloud CONFIDENTIAL
  11. 11. Cloud CONFIDENTIAL
  12. 12. Cloud Foundry: Clouds  • community lead for PHP • PaaS for PHP  Joyent • community lead for Node.js  ActiveState • community lead for Python, Perl • Providers of Stackato private PaaS CONFIDENTIAL
  13. 13. Micro Cloud Foundry CONFIDENTIAL
  14. 14. Cloud Foundry: Services CONFIDENTIAL
  15. 15. Cloud Foundry: Services Services are one of the extensibility planes in Cloud Foundry• there are more services being contributed by the community daily! MySQL, Redis, MongoDB, RabbitMQ, PostgreSQL Services may be shared across applications Cloud Foundry abstracts the provisioning aspect of services through a uniform API hosted in the Cloud Controller It’s very easy to take an app and add a service to the app in a uniform way CONFIDENTIAL
  16. 16. Cloud Foundry: Services Take Advantage of Services • they cost nothing to setup • they deliver value They Encourage Better Architectures • Need a fast read-write cache? Redis is ready to go! • Need to store long-tail documents? Give MongoDB a try • Need to decouple what applications do from when they do it? Use messaging and RabbitMQ CONFIDENTIAL
  17. 17. Demo: logging in, asking questions, & deploying from the CLI CONFIDENTIAL
  18. 18. Demo: Using the tunnel to talk to your services CONFIDENTIAL
  19. 19. Cloud Foundry architecture CONFIDENTIAL
  20. 20. Cloud Foundry - Architecture Message Bus Web Message Bus Web Message Bus (NATS) (NATS) (NATS)100s of DEAs Load Load App Load Balancers App Balancers Balancers App DEAs DEAs DEAs Cloud Routers Routers Cloud Routers Cloud Controllers DB Controllers Controllers DB DB Web Health Health Health Service API Services Services Services Manager Manager Manager Client, e.g. VMC CONFIDENTIAL
  21. 21. Application deployment flow find DEA for appvmc push I’m create Cloud VMC available DEA start app Controller DEA Application deploy Framework droplet detection Framework specific staging plugin update routes Creates Droplet Router Router CONFIDENTIAL
  22. 22. About the staging plugin Framework specific Creates a zip file = black box • Contains everything necessary for DEA to run the application • Two scripts:, CONFIDENTIAL
  23. 23. Request handling flowHTTP Request HTTP Request HTTP Request Load Balancer Router Application Load Balancer Router DEA CONFIDENTIAL
  24. 24. Self Healing Infrastructure If an application instance crashes • DEA detects unexpected exit => DEA broadcasts message • Routers remove instance from routing • Health manager notifies Cloud Controller • Cloud Controller re-launches instance If an DEA VM crashes • Application instances become unavailable • Health Manager notices the missing instances and notifies the Cloud Controller • Cloud Controller requests application instances to be started • Existing DEA will reply and start the applications CONFIDENTIAL
  25. 25. Micro Cloud Foundry CONFIDENTIAL
  26. 26. What is in Micro Cloud Foundry? App Instances Services Open source Platform as a Service project A cloud packaged as a VMware Virtual Machine Use as a developer sandbox • Use the services from Junit integration tests • Deploy your application for functional testing • Remote debugging from STS CONFIDENTIAL
  27. 27. Pre-requisites for using Micro Cloud Foundry Minimum 1 GB Minimum 8 GB Internet Connectivity RAM Disk (w/DHCP is ideal) VMC STS Command line GUI CONFIDENTIAL
  28. 28. Register and login to CONFIDENTIAL
  29. 29. Select a domain name* => IP address of your machine where Micro Cloud Foundry isrunning CONFIDENTIAL
  30. 30. Remember the configuration token CONFIDENTIAL
  31. 31. Download, unzip and open micro.vmx CONFIDENTIAL
  32. 32. Configure Micro Cloud Foundry Pick password Enter token CONFIDENTIAL
  33. 33. Getting started with Cloud Foundry... CONFIDENTIAL
  34. 34. Register Use promo code cfopentoursofia CONFIDENTIAL
  35. 35. Welcome email CONFIDENTIAL
  36. 36. Ways to use Cloud Foundry command line... IDE plugin... toolchain plugin... Cloud IDEs CONFIDENTIAL 36
  37. 37. Example vmc commands $"gem"install"vmc $"vmc"target"<any"cloud> $"vmc"login"<credentials> $"vmc"push"<my7app> " "">"bind"services?"Yes $"vmc"update"<my7app> $"vmc"instances"<my7app>"+100" CONFIDENTIAL 37
  38. 38. Installing vmc on Windows Install the vmc gem CONFIDENTIAL 38
  39. 39. Installing vmc on Mac OSXUse Ruby Version Manager$ curl -L | bash -s stable --ruby$ rvm install 1.9.2$ rvm use 1.9.2 You need:$ gem install vmc Command Line Tools for OSX or XCode 4.1 CONFIDENTIAL
  40. 40. Logging into$"vmc"target"api.cloudfoundry.comSuccessfully"targeted"to"""""""""[]$"vmc"loginAttempting"login"to"""[]Email:"apiper@vmware.comPassword:"********Successfully"logged"into"""[] CONFIDENTIAL 40
  41. 41. Cloud Foundry Integration plugin for Eclipse Eclipse support: ✦ CF Integration for Eclipse ✦ SpringSource Tool Suite 41
  42. 42. Cloud Foundry Integration plugin for Eclipse 42
  43. 43. Thank YouCloudFoundry Source Samples: @cloudfoundry #cloudfoundry@andypiper /© 2012 VMware, Inc. All rights reserved