2. About Me
• Developer Advocate for Cloud Foundry
• Blog: http://videlalvaro.github.com/
• Twitter: @old_sound
• http://slideshare.net/old_sound
2
Wednesday, November 21, 12
3. About Me
• Developer Advocate for Cloud Foundry
• Blog: http://videlalvaro.github.com/
• Twitter: @old_sound
• I created gifsockets™
3
Wednesday, November 21, 12
4. About Me
Co-authored
RabbitMQ in Action
http://bit.ly/rabbitmq
4
Wednesday, November 21, 12
5. Capabilities
The Basics
How it Works (Architecture)
Micro Cloud Foundry
CONFIDENTIAL
5
Wednesday, November 21, 12
6. What does
Cloud Foundry
offer?
CONFIDENTIAL
6
Wednesday, November 21, 12
10. 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
Wednesday, November 21, 12
12. Cloud Foundry: Clouds
§ AppFog.com
• 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
12
Wednesday, November 21, 12
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
15
Wednesday, November 21, 12
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
16
Wednesday, November 21, 12
17. Demo: logging in,
asking questions, &
deploying from the CLI
CONFIDENTIAL
17
Wednesday, November 21, 12
18. Cloud Foundry
architecture
CONFIDENTIAL
18
Wednesday, November 21, 12
19. 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
Wednesday, November 21, 12
20. Application deployment flow
Cloud
VMC DEA
Controller DEA Application
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
21. Application deployment flow
vmc push
Cloud
VMC DEA
Controller DEA Application
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
22. Application deployment flow
vmc push
Cloud
VMC DEA
Controller DEA Application
Framework
detection
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
23. Application deployment flow
vmc push create Cloud
VMC DEA
app Controller DEA Application
Framework
detection
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
24. Application deployment flow
vmc push create Cloud
VMC DEA
app Controller DEA Application
Framework
detection
Framework
specific staging
plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
25. Application deployment flow
find DEA
for app
vmc push create Cloud
VMC DEA
app Controller DEA Application
Framework
detection
Framework
specific staging
plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
26. Application deployment flow
find DEA
for app
vmc push I’m
create Cloud
VMC available DEA
app Controller DEA Application
Framework
detection
Framework
specific staging
plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
27. Application deployment flow
find DEA
for app
vmc push I’m
create Cloud
VMC available DEA
app Controller DEA Application
deploy
Framework droplet
detection
Framework
specific staging
plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
28. Application deployment flow
find DEA
for app
vmc push I’m
create Cloud
VMC available DEA start
app Controller DEA Application
deploy
Framework droplet
detection
Framework
specific staging
plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Wednesday, November 21, 12
29. Application deployment flow
find DEA
for app
vmc 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
Wednesday, November 21, 12
30. About the staging plugin
§ Framework specific
§ Creates a zip file = black box
• Contains everything necessary for DEA to run the application
• Two scripts: start.sh, stop.sh
CONFIDENTIAL
21
Wednesday, November 21, 12
33. 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
Wednesday, November 21, 12
35. 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
25
Wednesday, November 21, 12
36. 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
26
Wednesday, November 21, 12
37. Register and login to CloudFoundry.com
CONFIDENTIAL
27
Wednesday, November 21, 12
38. Select a domain name
*.cloudfoundry.me => IP address of your machine where Micro Cloud Foundry is
running
CONFIDENTIAL
28
Wednesday, November 21, 12
49. Installing vmc on Windows
CONFIDENTIAL
37
Wednesday, November 21, 12
50. Installing vmc on Windows
Install the vmc gem
CONFIDENTIAL
37
Wednesday, November 21, 12
51. Installing vmc on Mac OSX
Use Ruby Version Manager http://beginrescueend.com/
$ curl -L https://get.rvm.io | 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
38
Wednesday, November 21, 12