4. What is Cloud Foundry
•
•
•
•
Friday, November 15, 13
OpenSource Paas Platform
Supports Multiple Frameworks
Supports Multiple Services
Can be run on Public or Private Infrastructure
4
9. Organization and Spaces
•
Friday, November 15, 13
Organizations and Spaces are the main organizational units in which
applications, services, domains, routes, and users are contained
9
11. Spaces
•
Spaces : Organization is
mapped to Multiple - Spaces.
•
Default : development, staging
and production
•
1
*
Each Organization can have one
or more spaces
Friday, November 15, 13
11
12. Domains
•
Each space is associated with
one or more Domains
1
•
•
•
Default Domain is cfapps.io
Each Space has one or more
Domains
*
*
1
1
*
1
*
Space has one or more
Applications and Services
Friday, November 15, 13
12
13. Routes
•
A route, based on a domain with
an optional host as a prefix, may
be associated with one or more
applications
•
A Route can be associated with
one or more Applications
Friday, November 15, 13
13
19. Cloud Controller
•
•
Interfaces with development tool
requests
•
Maintains the Orgs, Spaces, Services
using CC_DB PostgreSQL database
•
Uses NATS Messaging for interacting
with DEA, UAA, Services and Health
Manager
•
Friday, November 15, 13
Heart of Cloud Foundry
Orchestration
Written using Sinatra Framework
19
20. DEA - Execution Agent
• Manages the Warden
Containers
• Stages the App as a
Droplet
• Run Droplets as App
Instances
Friday, November 15, 13
20
21. Components of DEA
•
Directory Server : Maps
Application Ids to the actual
Application Instances running
inside Warden Containers
•
Stagers
•
•
Take request from Cloud
Controller and create a
Droplet from the Build Pack
Manage the Warden Containers
which run the App Instances
Friday, November 15, 13
21
24. Router
• Routers requests coming
from External entities to
DEA, Cloud Controller,
Services or UAA
• Written in Go language to
be able to serve HTTP and
TCP Requests
Friday, November 15, 13
24
25. Components of the Router
•
Registry : Maintains a Map of URI to the Route
Endpoint
•
Register an App
•
Unregister an App
•
Proxy : Where all the Requests are routed and
passed on to Request Handler
•
Request Handler : Handles the following requests
•
Friday, November 15, 13
Http, TCP and Web socket requests
25
26. Services
• Manages the Service
Lifecycle and connects the
Services and the Apps
• Requests come in from
Cloud controller for
provisioning, un
provisioning of a service
Friday, November 15, 13
26
27. Service Components
•
All the incoming requests are handled by
AsynchronousServiceGateway
•
Requests Handled by ServiceGateway
★
★
Bind/Unbind a provisioned Service Instance to an
Application
★
Create/Get/Update a Service Snapshot
★
Enumerate a Snapshot
★
Friday, November 15, 13
Provision / Un provision an Instance of a Service
Service Migration
27
33. Java Build Pack - Java and Play
Frameworks
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
JRE
OpenJDK
Spring
Play
Play JPA
New Relic
Java
Detection :
Supports Java Application with main() method :
Main-Class attribute set in META-INF/
MANIFEST.MF for the JAR OR java_main_class set
in Build packs’ config/main.yml
Tags : java-main
Play
Detection : The Play start script and the Play
runtime JAR exist in the appropriate subdirectories
Tags : play-framework=<version>
Friday, November 15, 13
33
34. Java Build Pack - Tomcat
Frameworks
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
JRE
OpenJDK
Spring
Play
Play JPA
New Relic
Tomcat
Detection :
Existence of a WEB-INF/ folder in the application directory
and Java Main Class not detected
Tags : tomcat=〈version〉, tomcat-buildpacksupport=〈version〉
Configuration :
repository_root : The URL of the tomcat repository
version
: The version of tomcat to use.
#
Configuration
for
the
Tomcat
container
-‐-‐-‐
version:
7.0.+
repository_root:
"http://download.pivotal.io.s3.amazonaws.com/tomcat"
support:
version:
1.1.+
repository_root:
"http://download.pivotal.io.s3.amazonaws.com/tomcat-‐buildpack-‐support"
Friday, November 15, 13
34
35. Java Build Pack - Groovy
Frameworks
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
JRE
OpenJDK
Spring
Play
Play JPA
New Relic
Groovy
Detection :
•
•
•
A .groovy file exists which has a main() method, or
A .groovy file exists which is not a POGO (a POGO
contains one or more classes), or
A .groovy file exists which has a shebang (#!)
declaration
Tags : groovy=〈version〉
Configuration
repository_root : The URL of the Groovy
repository
version
: The version of Groovy to use.
#
Configuration
for
the
Groovy
container
-‐-‐-‐
version:
2.1.+
repository_root:
"http://download.pivotal.io.s3.amazonaws.com/groovy"
Friday, November 15, 13
35
36. Java Build Pack - Groovy
Frameworks
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
JRE
OpenJDK
Spring
Play
Play JPA
New Relic
Spring Boot ClI : Allows creation of Spring and Java Apps
Detection :
•
•
•
•
A .groovy file exists which has a main() method, or
A .groovy file exists which is not a POGO (a POGO contains one or
more classes), or
A .groovy file exists which has a shebang (#!) declaration
The application does not have a WEB-‐INF subdirectory of its root
directory.
Tags : spring-boot-cli=〈version〉
Configuration
repository_root : The URL of the Spring Boot Cli
repository
version
: The version of Spring Boot Cli to use.
#
Configuration
for
the
Groovy
container
-‐-‐-‐
version:
0.5.0_+
repository_root:
"http://download.pivotal.io.s3.amazonaws.com/spring-‐boot-‐cli"
Friday, November 15, 13
36
37. Java Build Pack - Spring Auto
Reconfig
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
Framework
JRE
OpenJDK
Spring Config
Play
Play JPA
New Relic
Spring Auto Reconfiguration
Framework : Reconfigures the Application to be bound
to Cloud Services
Detection :
•
Existence of a spring-‐core*.jar file in the application
directory
Tags : spring-‐auto-‐reconfiguration=<version>
Configuration
repository_root : Auto Reconfiguration repository
version
: The version of Auto Reconfiguration repository
to use.
-‐-‐-‐
version:
0.+
repository_root:
"http://download.pivotal.io.s3.amazonaws.com/auto-‐reconfiguration"
Friday, November 15, 13
37
38. Java Build Pack -OpenJDK
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
Framework
Spring Config
Play
Play JPA
New Relic
JRE
OpenJDK
-‐-‐-‐
repository_root:
"http:...”
version:
1.7.0_+
memory_sizes:
permgen:
64m..
memory_heuristics:
heap:
75
permgen:
10
stack:
5
native:
10
Friday, November 15, 13
OpenJDK Framework :
Reconfigures the Application to be bound to
Cloud Services
Detection : Unconditional
Tags : openjdk=〈version〉
Configuration
repository_root :
version
:
memory_sizes
:
memory_heuristics
:
38
39. Java Build Pack -OpenJDK Config
File
Containers
Java
Play
Tomcat
Groovy
Spring Boot CLI
Framework
Spring Config
Play
Play JPA
New Relic
JRE
OpenJDK
Friday, November 15, 13
OpenJDK Framework :
-‐-‐-‐
repository_root:
"http:...”
version:
1.7.0_+
memory_sizes:
permgen:
64m..
memory_heuristics:
heap:
75
permgen:
10
stack:
5
native:
10
39
40. Summary
•
•
•
Cloud Foundry is a Polyglot Open Source Paas
•
Avoids vendor lock-in
Friday, November 15, 13
Can be run on Public or Private Cloud
It is Iaas agnostic : Supports vSphere, AWS,
OpenStack
40