7. Structure, Frameworks, and Opinions
● Structure - coherent form or organization
● Framework - a basic structure underlying a system,
concept, or text.
● Opinions - Specific Implementation of Something
9. Cloud Foundry gives companies the speed,
simplicity and control they need to develop and
deploy applications faster and easier.
10.
11. • Platform As a Service
– Polyglot Runtime supporting multiple languages
and frameworks
– Choice of IaaS Providers
– Choice of Application Services
17. Cloud Foundry
Contract: 12 Factor App
Contract: BOSH Release
Contract: Cloud Provider Interface
Culture
Dev
Dev IT
Ops
Applications
Runtime Platform
Infrastructure Automation
Infrastructure
IT
Ops
IT
Ops
Tools
BOSH
19. Automate App Deployments
Step 1 - Upload
Upload application files
via the Platform
Controller API
Step 2 - Stage
Take application files and
package with other
dependencies into the
container file
Step 3 - Distribute
Platform controller
schedules (assigns) the
container to cluster cell
Step 4 - Run
Assigned cluster cell starts
application using provided
metadata and informs the
platform load balancer/router
that application traffic can be
routed to container endpoint
20. Elastic Runtime High Level Architecture
Cloud Foundry Elastic Runtime
Dynamic Router
OAuth 2.0 Server (UAA)
CELL
Garden
Build Packs
Login Server
CC & CC Bridge
Blob Store
BBS/etcd
Sys Log
ServiceBrokers
Collector App Log
ROUTING
AUTHENTICATION
APP LIFECYCLE
APP STORAGE
& EXECUTION
MESSAGING
METRICS & LOGGING
Cloud Foundry BOSH
BBS Converger
21. Elastic Runtime
What You Care About
• Cloud Controller
• Applications
• Buildpacks
• Services
• Service Brokers
• Routing
• Health Management
• Loggregator
Cloud Foundry Elastic Runtime
Dynamic Router
APP HOSTS
App
Build Packs
Loggregator
ServiceBrokers
ROUTING
AUTHENTICATION
APP STORAGE
& EXECUTION
METRICS & LOGGING
Cloud Foundry BOSH
Cloud Controller
App AppApp
22. Applications
Source code and application frameworks used by developers to
create application
– Java/Spring
– Ruby/Rails
– JavaScript for Node.js
– .Net
– others
23. Cloud Controller
• Restful API to allow clients to access platform functionality
• Several Clients exist to call functionality
– Command Line Interface
– Apps Manager
– IDE Plugins
25. Cloud Foundry CLI
• CLI is a RESTful client to Cloud Controller
• Commands Structured as CF <<command>> <<parameters>>
• Built in Architecture for Plugin extensions
• Getting help
– cf –h returns available commands
– cf <<command>> -h returns help for a specific command
• Includes ability to write plugins to extend
26. Buildpacks
• A Buildpack is a combination of scripts that will combine the application
with the frameworks and runtimes necessary to deploy
• Written as scripts that:
– Detect if buildpack should be applied
– Compile container file by combining application code and defined
runtime components
– Release describe how app container can be deployed to an assigned
container host
• Installed into a Cloud Foundry instance or loaded from an external
location
27. • Monitor applications to determine version, current state, and number of instances
and status via health checks
• On changes Determine desired application state and instances from cloud
controller and converges to desired state
Health Management
28. Services
• Services are an add on that can be provisioned to provide
service an application
– Databases (MySQL, Mongo, Redis) and Rabbit MQ
• Marketplace service instances are created and bound using a
Service Broker
• Bound services connection information is placed in
application environment variable
29. Service Broker
• Restful endpoint that provides contract allowing self service
creation and binding to apps by authorized users
– create
– delete
– bind
– unbind
– catalog
30. • Router shapes and routes all external system traffic
(HTTP/API/TCP)
– maintains a dynamic routing table for each load-balanced
app instance
• URL Routes to applications consist of domain, host, and
optionally a path
• Applications are either assigned route based upon application
name or defined host
• Allows extension through Route Services
Router and URL Routes
31. • Applications write logs to STDOUT and STDERR
• Relevant Cloud Foundry component events added to
application stream
• Log events collected, collated, and expose via API and the
firehose
• API Allows application users and operators to:
– Tail their application logs
– Dump a recent set of application logs
– Continually drain their application logs to 3rd party log
archive and analysis service
Loggregator
33. What Is BOSH?
• BOSH is an open source tool chain for release
engineering, deployment, and lifecycle
management of large-scale distributed services.
• BOSH was specifically developed to facilitate the
deployment of Cloud Foundry
• BOSH Interacts with IaaS via Cloud Provider
Interface (CPI)
34. BOSH Architecture
DB Blob Store
Worker NATS
Health
Monitor
CPI
DirectorCLI
Inner shell
Outer shell
Agents
38. Stemcell
• Base OS System
• BOSH Agent
• Same for all Infrastructures
• No specific info about software to be installed
• Wrapped in IaaS packaging that allows fast cloning
▪ vSphere - VMDK
▪ AWS – AMI
▪ Google Compute - Image