More Related Content
Similar to Scala dayssrinivas v3 (20)
Scala dayssrinivas v3
- 1. 1© Copyright 2015 EMC Corporation. All rights reserved.
cf push: Push your Scala/Play
apps to Cloud Foundry
RAGHAVAN N. SRINIVAS @ragss
- 2. 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. 3© Copyright 2015 EMC Corporation. All rights reserved.
• Overview and Architecture
• Applications and Services
• Evolving Data Schemas
• Demos
• Resources and Summary
Agenda
- 4. 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. 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
YouManage
O/S
IaaS
Storage
Servers
Networking
Middleware
Virtualization
Data
Applications
Runtime
YouManage
IaaS
Business
Value,
Agility
&
Cost
Savings
PaaS
Storage
Servers
Networking
Middleware
Virtualization
Data
Applications
Runtime
O/S Cloud
Foundry
+
OpenStack
You
Manage
- 6. 6© Copyright 2015 EMC Corporation. All rights reserved.
• 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. 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
bind-‐service
Application Development – IaaS vs PaaS
cf
scale
- 8. 8© 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
- 9. 9© Copyright 2015 EMC Corporation. All rights reserved.
Removing Developer and Operator
Constrains
BUILD
APPLICATION
PUSH FIRST
RELEASE
MAINTAIN
APPLICATION
UPDATE
APPLICATIONS
RETIRE
APPLICATIONS
• Auto-detect frameworks
• Link to PaaS
• Self-service deploy
• Dynamic routing
• CI/CD
• Elastic scale
• Integrated HA
• Autoscaling and APM
• Log aggregation
• Policy and Auth
• A/B versioning
• Live upgrades
• Self-service
removal
- 10. 10© Copyright 2015 EMC Corporation. All rights reserved.
Gold
Silver
Cloud Foundry Foundation
- 11. 11© Copyright 2015 EMC Corporation. All rights reserved.
Cloud Foundry 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
- 12. 12© Copyright 2015 EMC Corporation. All rights reserved.
BOSH DB
Blob
Store
Worker NATS
Health
Monitor
CPI
DirectorCLI
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
- 13. 13© 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 VMHealth Manager
Target VMCloud Controller
Target VM
PaaS
Ops
Deployment
• Packages
• Blobs
• Source
• Jobs
• Manifest
- 15. 15© Copyright 2015 EMC Corporation. All rights reserved.
Stage an Application
Router
Blobstore DB
DEA
Detect Compile Upload
NoYes
System
Buildpacks
+ =
Cloud
Controller
App
Ops
Pivotal
CF
Elas;c
Run;me
- 16. 16© 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
Cloud
Foundry
Elas;c
Run;me
Blobstore DB
Cloud
Controller
Service
Broker
Node(s)
DEA
DEA
DEA
DEA
+ app MD
+ =
Service
credentials
- 17. 17© 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
- 18. 18© 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
- 19. 19© 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:fuTWBqpGeyvv0qge@192.168.1.147:3306/
cf_aceae021_7f27_48db_9844_d7c151f29195?reconnect=true”
}
}
]
} "
Managed Services
- 20. 20© Copyright 2015 EMC Corporation. All rights reserved.
Evolving Schemas with evolutions
- 21. 21© Copyright 2015 EMC Corporation. All rights reserved.
• Scripts written in plain old SQL
• Evolutions to default database at conf/evolutions/
default(1.sql, 2.sql, …)!
# --- !Ups!
CREATE TABLE User (!
);!
# --- !Downs!
DROP TABLE User;!
Evolving Data Schemas
- 24. 24© Copyright 2015 EMC Corporation. All rights reserved.
Ÿ Sign up for the CF and BOSH mailing lists.
Ÿ Learn how to write 12-factor applications.
Ÿ Free workshop and roadshows. CFAD!
Ÿ Register for the next Cloud Foundry Summit (May)
Ÿ Try out Pivotal Web Services (http://run.pivotal.io)
Call for Action
- 25. 25© 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