1 © Copyright 2015 EMC Corporation. All rights reserved.
IT’s WHAT’S ON THE STACK THAT MATTERS: CloudFoundry RAGHAVAN N. SRINIVAS @ragss
2 © Copyright 2015 EMC Corporation. All rights reserved.
• Rags (not to Riches) and work for EMC CODE
• Middleware and Application programmer
• Architect and Evangelist
• Part time teaching at UML and writing at InfoQ
• Philosophy: It’s better to have an unanswered question than a unquestioned answer
Who am I?
3 © Copyright 2015 EMC Corporation. All rights reserved.
• Overview and Architecture
• Deploying and Managing CloudFoundry
• Applications and Services
• Health Management – Applications and Platform
• Resources and Summary
Agenda
4 © Copyright 2015 EMC Corporation. All rights reserved.
Business Expectations Exceed IT Capabilities
Cloud
IT Technology Eras
Mainframe Client-Server The exponential increase in business expectations is unsustainable for IT
MILLIONS OF APPS BILLIONS
OF USERS
* Source: Gartner, 2013: “Hunting and Harvesting in a Digital World: The 2013 CIO Agenda” $ $ $ $ $ $
ABILITY OF IT TO DELIVER S/W
STEADY IT BUDGETS*
BUSINESS EXPECTATIONS
5 © Copyright 2015 EMC Corporation. All rights reserved.
PaaS (On Premise & Off Premise)
Traditional IT
Storage Servers
Networking
O/S Middleware
Virtualization
Data Applications
Runtime
You
Man
age
O/S
IaaS
Storage Servers
Networking
Middleware
Virtualization
Data Applications
Runtime
You
Man
age
IaaS
Business Value, Agility & Cost Savings
PaaS
Storage Servers
Networking
Middleware
Virtualization
Data Applications
Runtime
O/S Cloud Foundry
+ OpenStack
You
Man
age
6 © Copyright 2015 EMC Corporation. All rights reserved. 6
• Microservices: a radical departure from traditional monolithic applications
• 12 Factor Linux applications • In both cases, the enterprise is
forced to “think different.”
Microservices Architectures
7 © Copyright 2015 EMC Corporation. All rights reserved.
Provision VM
Install Applica;on Run;me
Deploy Applica;on
Configure Load Balancer
Configure Service Connec;vity
Configure Firewall
cf push
Configure SSL Termina;on cf scale
Application Development – IaaS vs PaaS
8 © Copyright 2015 EMC Corporation. All rights reserved.
DEVELOPERS OPERATORS
App Deployment: 30-90 seconds
target <my cloud> push <my app> bind <my services> scale <my app> +1000
Cloud Deployment: 2-4 hours
provision cloud <Public/Private> provision service <MySQL,Hadoop...> upgrade/update <my cloud> scale <my cloud>
CloudFoundry way
9 © Copyright 2015 EMC Corporation. All rights reserved.
Cloud Foundry Enterprise Capabilities At A Glance
Application Containerization
Monitoring, Logs and Performance as-a-Service
Integrated Services: Data, Mobile, Platform
High Availability and Scaling
Network Isolation and Security Groups
Automatic Middleware Configuration
Simple Service Binding
Automatic IaaS Provisioning
Roles and Policy Management
Running on top of
11 © Copyright 2015 EMC Corporation. All rights reserved.
CloudFoundry Runtime Architecture
Ops Manager UI
Ops Manager Director Operations Manager
Service
Service Broker
Service Nodes
Service Broker
Service Nodes
Service
App Log Aggregator
Login Server
Dynamic Router
Cloud Controller
UAA
Health Manager
DEA Pool
Messaging (NATS)
Apps
Metrics Collec;on
Apps
HA Proxy LB
Elastic Runtime
13 © Copyright 2015 EMC Corporation. All rights reserved.
BOSH DB Blob Store
Worker NATS Health Monitor
CPI
Director CLI
Inner shell Outer shell
Agents
When you deploy Cloud Foundry the following sequence of steps occur: 1. Target a BOSH director using CLI 2. Upload a Stemcell 3. Get a Release from a repo 4. Create a deployment manifest 5. BOSH Deploy Cloud Foundry:
• Prepare deployment • Compile packages • Create and bind VMs • Pull in job configurations • Create needed job
instances – this is where things get pushed live
14 © Copyright 2015 EMC Corporation. All rights reserved.
Message Bus
Behind the Scenes - BOSH
IaaS
DB
BOSH Director
Blobs
Health Monitor
Deploy Worker VMs
Messaging
Target VM Health Manager
Target VM Cloud Controller
Target VM
PaaS Ops
Deployment • Packages
• Blobs • Source
• Jobs • Manifest
16 © Copyright 2015 EMC Corporation. All rights reserved.
Stage an Application Ro
uter
Blobstore DB
DEA Detect Compile Upload No Yes
System Buildpacks
+ =
Cloud Controller
App Ops
Pivotal CF Elas;c Run;me
17 © Copyright 2015 EMC Corporation. All rights reserved.
Application Deployment Overview App Ops
① Upload app bits and metadata
push app
Router
② Create and bind services
③ Stage application
④ Deploy application CloudFoundry Elas;c Run;me
Blobstore DB
Cloud Controller
Service Broker Node(s)
DEA DEA
DEA DEA
+ app MD
+ =
Service credentials
18 © Copyright 2015 EMC Corporation. All rights reserved.
Creating and Binding a Service
Router Cloud Foundry
Run;me (ERS)
DB Service credentials
reserve resources create service (HTTP)
create service (HTTP)
bind service (HTTP)
bind service (HTTP)
obtain connection data
CLI Cloud Controller
Service Broker
Data Service
App Ops
19 © Copyright 2015 EMC Corporation. All rights reserved.
DEA
Apps
Service Broker
Service Nodes Cloud Controller
create
bind
Service Brokers generate connection details and credentials for managed services CC encrypts and stores credentials in CCDB Credentials are exposed to bound applications via VCAP_SERVICES environment variable
connect
Managed Services
20 © Copyright 2015 EMC Corporation. All rights reserved.
VCAP_SERVICES environment variable is visible only to members of the org and space containing the service instance
VCAP_SERVICES=" { "p-mysql": [ { "name": "music-db", "label": "p-mysql", "tags": [ "mysql", "relational” ], "plan": "100mb-dev", "credentials": { "hostname": "192.168.1.147", "port": 3306, "name": "cf_aceae021_7f27_48db_9844_d7c151f29195", "username": "Tr12ZI4hPu4OPJPY", "password": "fuTWBqpGeyvv0qge", "uri": "mysql://Tr12ZI4hPu4OPJPY:[email protected]:3306/ cf_aceae021_7f27_48db_9844_d7c151f29195?reconnect=true” } } ] } "
Managed Services
21 © Copyright 2015 EMC Corporation. All rights reserved.
Health Management Applications and Platform
22 © Copyright 2015 EMC Corporation. All rights reserved.
Multiple Availability Zones for HA requirements
• Application and the Platform itself are automatically balanced across availability zones
– Enhanced availability for applications
– Tolerate significant infrastructure failures with continuous availability
23 © Copyright 2015 EMC Corporation. All rights reserved.
Application Instances and Availability Zones
Router
DEA
DEA
DEA
DEA
DEA
DEA
Zone 1 Zone 2 Application instances are evenly distributed over two availability zones. Losing an AZ keeps instances running and available.
App Ops
CF Elas;c Run;me
24 © Copyright 2015 EMC Corporation. All rights reserved.
Router
Failed Application Instances Replaced
Blobstore Cloud Controller
Health Manager
Actual State Desired State
Messaging (NATS)
DEA DEA DEA
App Ops
CF Elas;c Run;me
25 © Copyright 2015 EMC Corporation. All rights reserved.
Monitoring CF Components
Cloud Controller
Health Monitor
Messaging (NATS)
Collector
DEA
/varz
/varz
/varz
/varz
Customer Monitoring JMX-compatible tool of choice
Datadog (~1.0)
JMX (1.1)
PaaS Ops
CF Elas;c Run;me
26 © Copyright 2015 EMC Corporation. All rights reserved.
Message Bus
Monitoring Processes (Elastic Runtime Example)
IaaS
Health Monitor Health Manager
DEA
Cloud Controller
Responders: pager
email monitoring
…
PaaS Ops
Opera;on Manager
27 © Copyright 2015 EMC Corporation. All rights reserved.
Message Bus
Monitoring VMs (Elastic Runtime Example)
IaaS
Health Monitor Messaging
Cloud Controller
DEA
Responders: pager
email monitoring
resurrector …
BOSH Director
(CPI
)
Actual State Desired State
DEA
PaaS Ops
Opera;on Manager
28 © Copyright 2015 EMC Corporation. All rights reserved.
Log Aggregation
Cloud Controller
Health Monitor
Messaging (NATS)
Syslog Aggregator
DEA
Syslog
Syslog
Syslog
Syslog
Logstash
Splunk
…
• Log files from /var/vcap/sys/log • Support for external syslog endpoints in PCF 1.2
PaaS Ops
Pivotal CF Elas;c Run;me
30 © Copyright 2015 EMC Corporation. All rights reserved.
https://ace.ng.bluemix.net/
http://www.hpcloud.com/products-services/application-paas
http://www.anynines.com/
https://run.pivotal.io/
Resources