Deploy your Multi-tier Application in Cloud Foundry
-
Upload
cornelia-davis -
Category
Software
-
view
572 -
download
1
description
Transcript of Deploy your Multi-tier Application in Cloud Foundry
![Page 1: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/1.jpg)
1© Copyright 2013 Pivotal. All rights reserved. 1© Copyright 2013 Pivotal. All rights reserved.
Deploying a Multi-tier App in Cloud FoundryA tour
Cornelia DavisCloud Foundry Platform [email protected] | twitter: @cdavisafc | March 2014
![Page 2: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/2.jpg)
2© Copyright 2013 Pivotal. All rights reserved.
Let’s push an app
![Page 3: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/3.jpg)
3© Copyright 2013 Pivotal. All rights reserved.
Overview: Deploying App to Cloud Foundry Runtime
① Upload app bits and metadata
push app
Rout
er② Create and bind services
③ Stage application
④ Deploy application
⑤ Manage application health…which is a whole ‘nother meetup topic
Cloud FoundryRuntime (PaaS)
Blobstore DB
Cloud Controller
Service Broker Node(s)
DEADEA
DEADEA
+ app MD
+ =
Servicecredentials
![Page 4: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/4.jpg)
4© Copyright 2013 Pivotal. All rights reserved.
Software
![Page 5: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/5.jpg)
5© Copyright 2013 Pivotal. All rights reserved.
Software is Changing Industries
$3.5B valuation –Financial Services
$3.5B valuation– Travel & Hospitality
$3.5B valuation – Transportation
$1.1B acquisition by Monsanto – Agriculture
$19B valuation – Entertainment
$3.2B acquisition by Google– Digital Home
![Page 6: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/6.jpg)
6© Copyright 2013 Pivotal. All rights reserved.
Reference Application from VMWare to demonstrate the vFabric SuiteSpring Trader
https://github.com/cf-platform-eng/springtrader-cf
![Page 7: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/7.jpg)
7© Copyright 2013 Pivotal. All rights reserved.
From here …
![Page 8: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/8.jpg)
8© Copyright 2013 Pivotal. All rights reserved.
Agenda
Cross-site scripting JNDI Service Catalog Spring Cloud
Apps and Manifests
Services plans
Auto reconfiguration
![Page 9: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/9.jpg)
9© Copyright 2013 Pivotal. All rights reserved.
Cross-site Scripting
http://springtrader.com/services
http://springtrader.com/web
![Page 10: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/10.jpg)
10© Copyright 2013 Pivotal. All rights reserved.
Cross-site Scripting
http://traderweb.cfapps.io
http://traderservices.cfapps.io
![Page 11: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/11.jpg)
11© Copyright 2013 Pivotal. All rights reserved.
Cross-site Scripting
http://traderfront.cfapps.ioOne war file
This is a hack!!
![Page 12: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/12.jpg)
12© Copyright 2013 Pivotal. All rights reserved.
JNDI Service Instances
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/nanodb" />Old:
![Page 13: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/13.jpg)
13© Copyright 2013 Pivotal. All rights reserved.
Spring Cloud
VCAP_SERVICES locally
cf bind-service traderfront devsql
cf bind-service traderfront stagingsql OR
<cloud:data-source id="dataSource"> <cloud:connection properties="sessionVariables=sql_mode='ANSI'; characterEncoding=UTF-8;defaultTransactionIsolation=2”/> <cloud:pool pool-size="2" max-wait-time="200" /></cloud:data-source>
VCAP_SERVICES={"cleardb-n/a":[{"name":"tradersql","label":"cleardb-n/a","tags":["mysql","relational"],"plan":"spark","credentials":{"jdbcUrl":"jdbc:mysql://baf8a1e6a292a2:[email protected]:3306/ad_595d583f143adee","uri":"mysql://baf8a1e6a292a2:[email protected]:3306/ad_595d583f143adee?reconnect=true","name":"ad_595d583f143adee","hostname":"us-cdbr-east-05.cleardb.net","port":"3306","username":"baf8a1e6a292a2","password":"79581497"}}],"cloudamqp-n/a":[{"name":"tradermessaging","label":"cloudamqp-n/a","tags":["amqp","rabbitmq"],"plan":"lemur","credentials":{"uri":"amqp://klrdpgoo:[email protected]/klrdpgoo"}}]}
New:
![Page 14: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/14.jpg)
14© Copyright 2013 Pivotal. All rights reserved.
(Big-A) Applications and Manifests
http://traderfront.cfapps.ioOne war file
Another war file
![Page 15: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/15.jpg)
15© Copyright 2013 Pivotal. All rights reserved.
(Big-A) Applications and Manifests---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- tradersql- tradermessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
![Page 16: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/16.jpg)
16© Copyright 2013 Pivotal. All rights reserved.
(Big-A) Applications and Manifests---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- tradersql- tradermessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- devsql- devmessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
![Page 17: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/17.jpg)
17© Copyright 2013 Pivotal. All rights reserved.
(Big-A) Applications and Manifests---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- tradersql- tradermessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- devsql- devmessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
---timeout: 180memory: 1Gdomain: cfapps.ioinstances: 1services:- stagingsql- stagingmessagingapplications:- name: traderback path: dist/spring-nanotrader-asynch-services-1.0.1.BUILD-SNAPSHOT.war host: traderback- name: traderfront path: dist/spring-nanotrader-services-1.0.1.BUILD-SNAPSHOT.war host: traderfront
![Page 18: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/18.jpg)
18© Copyright 2013 Pivotal. All rights reserved.
Services Marketplace and Plans
![Page 19: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/19.jpg)
19© Copyright 2013 Pivotal. All rights reserved.
Auto-reconfiguration
<rabbit:connection-factory id="connectionFactory" host="${NANO_RABBIT_HOST:localhost}" port="${NANO_RABBIT_PORT:5672}"/>
Old:
New:<cloud:rabbit-connection-factory id="connectionFactory"/>
DO NOT USE AUTORECONFIGURATION!! (esp. in production)
![Page 20: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/20.jpg)
20© Copyright 2013 Pivotal. All rights reserved.
Pull Requests Welcome!
Cross-site scripting Session State Caching
![Page 21: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/21.jpg)
21© Copyright 2013 Pivotal. All rights reserved.
State, Statelessness and Scale
Cloud Controller Health Manager
Stateless part of your app Stateful part
Browser
CLI
Native App
Mobile App
DEA
DEA
Application Runners (DEA)
Rout
er
![Page 22: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/22.jpg)
22© Copyright 2013 Pivotal. All rights reserved.
… to here
![Page 23: Deploy your Multi-tier Application in Cloud Foundry](https://reader033.fdocuments.in/reader033/viewer/2022061103/53fe08a98d7f72db2d8b4571/html5/thumbnails/23.jpg)
A NEW PLATFORM FOR A NEW ERA