SlideShare una empresa de Scribd logo
1 de 24
Cloud FoundryFrom A Developer’s Perspective  Multi-Language, Multi-Framework PaaS 1
Dealing with applications From a Developer’s Perspective 2
Application Evolution Start with a great idea for an app Build a typical web app as a prototype, major refactor it into v1 Written using Spring, Rails, or Sinatra with scripting around the edges Allow me to scale, learn by doing, experiment with new approaches, etc. At scale, tons of traffic, pushing some limits Extend my app with a backend processing tier Use some services that are shared between my front end and backend components e.g., messaging, KV store, etc. Use some services that are private to each tier e.g., KV store, document store, SQL database etc. Leverage Cloud Foundry scalability and self healing 3
Developer Expectations Write code not tickets… The application is my unit of currency Expect friction free deployment, i.e., the system acts as the architect I manage to the boundaries of my code, no further Don’t force me to learn how to cobble together a middleware stack, and then service it for life I write code because its fun: configuring a kernel, installing packages, writing configs is not fun Choose my own cloud Develop and test on a low cost cloud Deploy into a high SLA cloud Deploy into clouds where my app is needed Don’t want to learn a new model each time I go to a new cloud 4
Typical Web Application 5 Spring web app, Rails, Sinatra, Node.js, etc. Elastic pool of app instances, easy to scale Database accessible by all instances database system load balancer elastic pool app instance app instance
Deploying Web App the Old Way 6 [mysqld] user = foobar port = 3306 basedir = /usr bind-address = 172.58.77.101 key_buffer = 16M thread_stack = 128K thread_cache_size = 8 … [nginx] http.includemime.types; default_type: application/octet-stream; log_format: main ‘$remote_addr - $remote_user []…’ keepalive_timeout 65; [tomcat] <Connector redirectPort=“8443” emptySessionPath…/> <bean id=“sessionFactory” class=“org.springframework…/> [frontend] dependencies: ,[object Object]
rubyfiles: ,[object Object]
core/common/**/*[blah] - blah blah blah mvc web app
Deploying Web App on Cloud Foundry 7 # to target and login to cloud foundry vmctarget http://api.cloudfoundry.com vmc login # to create and boot the app for the first time vmc push myapp –instances 2 –mem 64M –path ../code # to create the database and bind it to the app vmc create-service mysql –name mydb –bind myapp # update live app with new code vmc update myapp –path ../code mvc web app
At Scale – Multi-Node Distributed App 8 system load balancer redis mysql mongodb elastic pool rabbitMQ elastic pool front_end front_end back_end
Complex App on Cloud Foundry 9 # create the front end and backend apps # front end is small but multi-instance vmc push fe –instances 8 –mem 64M –path ../fe_code vmc push be –instances 2 –mem 256M –path ../be_code # create the services and bind per spec vmc create-service mysql –name mysql –bind fe vmc create-service mongodb –name mongo –bind be vmc create-service rabbit –name rabbit –bind fe vmccreate-service redis –name redis –bind fe vmc bind-service redis be vmc bind-service rabbit be # to perform an update of code vmc update fe –path ../new_fe_code vmc update be –path ../new_be_code multi-node, distributed app
Summary Cloud Foundrylets me start small Learn new approaches, frameworks, and services Develop on my cloud or yours CloudFoundrylets me grow my app Multi node distributed systems Built-in scaling at the node level CloudFoundrylets me deploy & run with no friction There is no learning curve. 0 to cloud in 3 clicks Cloud Foundry is my infrastructure architect Cloud Foundry lets me choose my own cloud 10
developer visible architecture From a Developer’s Perspective 11
Applications, Instances, Services, Tools 12 Application Concepts Instances make my application scale. The more instances the more load the app can handle All of the code, libraries, and, data that are needed in order to run my code on a system supplied stack My app is URL addressable and can have multiple URLs, some clouds allow custom domains http://www.foo Services are used to extend an application with higher level functions like a KV store or email gateway Application Tools vmc (command line tool) and STS plugin (IDE) are the primary tools used by developers $ vmc update myapp $ vmc apps $ vm my code
Logical View of Cloud Foundry 13 Infrastructure Abstraction (Cloud Foundry hides this) Servers, networks, storage delivered as software No more wires, boxes, configuring, cooling Cloud FoundryAbstraction Applications, instances, and services Manage to the boundaries of your code Cloud Foundry is your architect user apps user apps client tools Cloud Foundry infrastructure
Cloud Foundry APIs 14 Application Lifecycle API Create, start, stop, update Set URL(s), instance count, memory Get stats, logs, crashes, files Services API Enumerate system services Select and create service instance Bind and unbind service & app(s) Cloud Foundry APIs Also includes Info API for both system and account space Account management API, All APIs are RESTful with JSON payloads.  The vmc CLI app exercises the entire API. The STS plugin provides similar functionality within the STS IDE
The vmc CLI 15 Create app, update app, control app vmc push [appname] [--path] [--url] [--instances N] [--mem] [--no-start] vmc update <appname> [--path PATH] vmc stop <appname> vmc start <appname> vmc target [url] Update app settings, get app information vmcmem <appname> [memsize] vmc map <appname> <url> vmc instances <appname> <num | delta> vmc {crashes, crashlogs, logs} <appname> vmc files <appname> [path] Deal with services, users, and information vmc create-service <service> [--name servicename] [--bind appname] vmc bind-service <servicename> <appname> vmc unbind-service  <servicename> <appname> vmc delete-service <servicename> vmc user, vmcpasswd, vmc login, vmc logout, vmc add-user vmc services, vmc apps, vmc info
What’s under the hood From a Developer’s Perspective 16
Cloud Foundry Internal View 17
Cloud Foundry Logical View 18 vmc client STS plugin browser (user app access) Router Health Manager user apps Cloud Controller user apps DEA: execution environment Services: core, ecosystem, etc. Infrastructure
Cloud Foundry: Router The router receives all traffic from the outside world and maintains the mapping from external URL to internal application instance The router performs this job for all Cloud Foundry APIentry points (typically from vmc or STS) as well as for all application specific traffic The router acts as a load balancer, distributing requests evenly across all instances of a given app 19
Cloud Foundry: Cloud Controller It is responsible for all state changes in the system Ensuring all dependencies are available Binding the application to services Anything that effects users, apps, or services is controlled by the Cloud Controllers Examples : vmc push, vmc instances, vmc create-service, etc. are driven by the Cloud Controller Once staged, the Cloud Controller is responsible for connecting the application to a DEA execution unit 20
Cloud Foundry: Health Manager The Health Manager works closely with the Cloud Controller and DEAs to ensure that applications stay alive and healthy When an app instance crashes, it is the Health Manager that notes this and arranges for a replacement instance If the Health Manager detects rapid and repeated crashes, it declares the app to be in a “flapping” state and does not try to revive the app instances that are sick 21
Cloud Foundry: DEA The system maintains a pool of standby DEAs and these act as the VM-level container for an application DEAs support both single and multi-tenant operation (1 app per DEA VM, or n apps per DEA VM) DEAs provide a secure/constrained OS environment running the application’s app-server and the application code 22

Más contenido relacionado

La actualidad más candente

V mware white paper virtualizing business-critical applications with confidence
V mware white paper  virtualizing business-critical applications with confidenceV mware white paper  virtualizing business-critical applications with confidence
V mware white paper virtualizing business-critical applications with confidence
ReadWrite
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStack
Animesh Singh
 
Cloud foundry architecture and deep dive
Cloud foundry architecture and deep diveCloud foundry architecture and deep dive
Cloud foundry architecture and deep dive
Animesh Singh
 
Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStack
Animesh Singh
 

La actualidad más candente (20)

Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
 
Cloud Foundry Overview
Cloud Foundry OverviewCloud Foundry Overview
Cloud Foundry Overview
 
Cloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and moreCloud Foundry Diego, Lattice, Docker and more
Cloud Foundry Diego, Lattice, Docker and more
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMix
 
Dissecting The PaaS Landscape
Dissecting The PaaS LandscapeDissecting The PaaS Landscape
Dissecting The PaaS Landscape
 
V mware white paper virtualizing business-critical applications with confidence
V mware white paper  virtualizing business-critical applications with confidenceV mware white paper  virtualizing business-critical applications with confidence
V mware white paper virtualizing business-critical applications with confidence
 
Automated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStackAutomated Lifecycle Management - CloudFoundry on OpenStack
Automated Lifecycle Management - CloudFoundry on OpenStack
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 
Introduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application ArchitectureIntroduction to Microservices and Cloud Native Application Architecture
Introduction to Microservices and Cloud Native Application Architecture
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Comparison of Several PaaS Cloud Computing Platforms
Comparison of Several PaaS Cloud Computing PlatformsComparison of Several PaaS Cloud Computing Platforms
Comparison of Several PaaS Cloud Computing Platforms
 
Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven !Cloud Foundry and OpenStack – Marriage Made in Heaven !
Cloud Foundry and OpenStack – Marriage Made in Heaven !
 
An introduction to Cloud Foundry
An introduction to Cloud FoundryAn introduction to Cloud Foundry
An introduction to Cloud Foundry
 
Cloud foundry architecture and deep dive
Cloud foundry architecture and deep diveCloud foundry architecture and deep dive
Cloud foundry architecture and deep dive
 
Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStack
 
Keep Calm and CF Push on Azure
Keep Calm and CF Push on AzureKeep Calm and CF Push on Azure
Keep Calm and CF Push on Azure
 
Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison Java in the Cloud : PaaS Platforms in Comparison
Java in the Cloud : PaaS Platforms in Comparison
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
 

Destacado

Cloud Foundry | How it works
Cloud Foundry | How it worksCloud Foundry | How it works
Cloud Foundry | How it works
Kazuto Kusama
 

Destacado (14)

Apache Servicemix
Apache ServicemixApache Servicemix
Apache Servicemix
 
Principios de diseño de la arquitectura del software
Principios de diseño de la arquitectura del softwarePrincipios de diseño de la arquitectura del software
Principios de diseño de la arquitectura del software
 
Springboot Overview
Springboot  OverviewSpringboot  Overview
Springboot Overview
 
Principios diseño del software
Principios diseño del software Principios diseño del software
Principios diseño del software
 
Run your Java code on Cloud Foundry
Run your Java code on Cloud FoundryRun your Java code on Cloud Foundry
Run your Java code on Cloud Foundry
 
Fluentd meetup logging infrastructure in paa s
Fluentd meetup   logging infrastructure in paa sFluentd meetup   logging infrastructure in paa s
Fluentd meetup logging infrastructure in paa s
 
Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013Cloud Foundry Overview for GITPRO 2013
Cloud Foundry Overview for GITPRO 2013
 
OpenStack Overview: Deployments and the Big Tent, Toronto 2016
OpenStack Overview: Deployments and the Big Tent, Toronto 2016OpenStack Overview: Deployments and the Big Tent, Toronto 2016
OpenStack Overview: Deployments and the Big Tent, Toronto 2016
 
LIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryLIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud Foundry
 
Cloud Native Application Framework
Cloud Native Application FrameworkCloud Native Application Framework
Cloud Native Application Framework
 
Cloud Foundry | How it works
Cloud Foundry | How it worksCloud Foundry | How it works
Cloud Foundry | How it works
 
Cloud foundry presentation
Cloud foundry presentation Cloud foundry presentation
Cloud foundry presentation
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overview
 
Standards ouverts, interopérabilité et logiciel libre - Canada, 2015
Standards ouverts, interopérabilité et logiciel libre - Canada, 2015Standards ouverts, interopérabilité et logiciel libre - Canada, 2015
Standards ouverts, interopérabilité et logiciel libre - Canada, 2015
 

Similar a Cloud Foundry a Developer's Perspective

quickguide-einnovator-4-cloudfoundry
quickguide-einnovator-4-cloudfoundryquickguide-einnovator-4-cloudfoundry
quickguide-einnovator-4-cloudfoundry
jorgesimao71
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
cloud computing and android
cloud computing and androidcloud computing and android
cloud computing and android
Mohit Singh
 

Similar a Cloud Foundry a Developer's Perspective (20)

quickguide-einnovator-4-cloudfoundry
quickguide-einnovator-4-cloudfoundryquickguide-einnovator-4-cloudfoundry
quickguide-einnovator-4-cloudfoundry
 
Harbour IT & VMware - vForum 2010 Wrap
Harbour IT & VMware - vForum 2010 WrapHarbour IT & VMware - vForum 2010 Wrap
Harbour IT & VMware - vForum 2010 Wrap
 
COMPARISON OF OPEN-SOURCE PAAS ARCHITECTURAL COMPONENTS
COMPARISON OF OPEN-SOURCE PAAS ARCHITECTURAL COMPONENTSCOMPARISON OF OPEN-SOURCE PAAS ARCHITECTURAL COMPONENTS
COMPARISON OF OPEN-SOURCE PAAS ARCHITECTURAL COMPONENTS
 
Comparison of open source paas architectural components
Comparison of open source paas architectural componentsComparison of open source paas architectural components
Comparison of open source paas architectural components
 
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on BluemixPHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
GigaSpaces CCF 4 Xap
GigaSpaces CCF 4 XapGigaSpaces CCF 4 Xap
GigaSpaces CCF 4 Xap
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
sveltekit-en.pdf
sveltekit-en.pdfsveltekit-en.pdf
sveltekit-en.pdf
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internals
 
Application Virtualization
Application VirtualizationApplication Virtualization
Application Virtualization
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
Application Model for Cloud Deployment
Application Model for Cloud DeploymentApplication Model for Cloud Deployment
Application Model for Cloud Deployment
 
HPC Cloud Burst Using Docker
HPC Cloud Burst Using DockerHPC Cloud Burst Using Docker
HPC Cloud Burst Using Docker
 
Chapter 6-Remoting
Chapter 6-RemotingChapter 6-Remoting
Chapter 6-Remoting
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
cloud computing and android
cloud computing and androidcloud computing and android
cloud computing and android
 
Full Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeFull Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future Scope
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Cloud Foundry a Developer's Perspective

  • 1. Cloud FoundryFrom A Developer’s Perspective Multi-Language, Multi-Framework PaaS 1
  • 2. Dealing with applications From a Developer’s Perspective 2
  • 3. Application Evolution Start with a great idea for an app Build a typical web app as a prototype, major refactor it into v1 Written using Spring, Rails, or Sinatra with scripting around the edges Allow me to scale, learn by doing, experiment with new approaches, etc. At scale, tons of traffic, pushing some limits Extend my app with a backend processing tier Use some services that are shared between my front end and backend components e.g., messaging, KV store, etc. Use some services that are private to each tier e.g., KV store, document store, SQL database etc. Leverage Cloud Foundry scalability and self healing 3
  • 4. Developer Expectations Write code not tickets… The application is my unit of currency Expect friction free deployment, i.e., the system acts as the architect I manage to the boundaries of my code, no further Don’t force me to learn how to cobble together a middleware stack, and then service it for life I write code because its fun: configuring a kernel, installing packages, writing configs is not fun Choose my own cloud Develop and test on a low cost cloud Deploy into a high SLA cloud Deploy into clouds where my app is needed Don’t want to learn a new model each time I go to a new cloud 4
  • 5. Typical Web Application 5 Spring web app, Rails, Sinatra, Node.js, etc. Elastic pool of app instances, easy to scale Database accessible by all instances database system load balancer elastic pool app instance app instance
  • 6.
  • 7.
  • 8. core/common/**/*[blah] - blah blah blah mvc web app
  • 9. Deploying Web App on Cloud Foundry 7 # to target and login to cloud foundry vmctarget http://api.cloudfoundry.com vmc login # to create and boot the app for the first time vmc push myapp –instances 2 –mem 64M –path ../code # to create the database and bind it to the app vmc create-service mysql –name mydb –bind myapp # update live app with new code vmc update myapp –path ../code mvc web app
  • 10. At Scale – Multi-Node Distributed App 8 system load balancer redis mysql mongodb elastic pool rabbitMQ elastic pool front_end front_end back_end
  • 11. Complex App on Cloud Foundry 9 # create the front end and backend apps # front end is small but multi-instance vmc push fe –instances 8 –mem 64M –path ../fe_code vmc push be –instances 2 –mem 256M –path ../be_code # create the services and bind per spec vmc create-service mysql –name mysql –bind fe vmc create-service mongodb –name mongo –bind be vmc create-service rabbit –name rabbit –bind fe vmccreate-service redis –name redis –bind fe vmc bind-service redis be vmc bind-service rabbit be # to perform an update of code vmc update fe –path ../new_fe_code vmc update be –path ../new_be_code multi-node, distributed app
  • 12. Summary Cloud Foundrylets me start small Learn new approaches, frameworks, and services Develop on my cloud or yours CloudFoundrylets me grow my app Multi node distributed systems Built-in scaling at the node level CloudFoundrylets me deploy & run with no friction There is no learning curve. 0 to cloud in 3 clicks Cloud Foundry is my infrastructure architect Cloud Foundry lets me choose my own cloud 10
  • 13. developer visible architecture From a Developer’s Perspective 11
  • 14. Applications, Instances, Services, Tools 12 Application Concepts Instances make my application scale. The more instances the more load the app can handle All of the code, libraries, and, data that are needed in order to run my code on a system supplied stack My app is URL addressable and can have multiple URLs, some clouds allow custom domains http://www.foo Services are used to extend an application with higher level functions like a KV store or email gateway Application Tools vmc (command line tool) and STS plugin (IDE) are the primary tools used by developers $ vmc update myapp $ vmc apps $ vm my code
  • 15. Logical View of Cloud Foundry 13 Infrastructure Abstraction (Cloud Foundry hides this) Servers, networks, storage delivered as software No more wires, boxes, configuring, cooling Cloud FoundryAbstraction Applications, instances, and services Manage to the boundaries of your code Cloud Foundry is your architect user apps user apps client tools Cloud Foundry infrastructure
  • 16. Cloud Foundry APIs 14 Application Lifecycle API Create, start, stop, update Set URL(s), instance count, memory Get stats, logs, crashes, files Services API Enumerate system services Select and create service instance Bind and unbind service & app(s) Cloud Foundry APIs Also includes Info API for both system and account space Account management API, All APIs are RESTful with JSON payloads. The vmc CLI app exercises the entire API. The STS plugin provides similar functionality within the STS IDE
  • 17. The vmc CLI 15 Create app, update app, control app vmc push [appname] [--path] [--url] [--instances N] [--mem] [--no-start] vmc update <appname> [--path PATH] vmc stop <appname> vmc start <appname> vmc target [url] Update app settings, get app information vmcmem <appname> [memsize] vmc map <appname> <url> vmc instances <appname> <num | delta> vmc {crashes, crashlogs, logs} <appname> vmc files <appname> [path] Deal with services, users, and information vmc create-service <service> [--name servicename] [--bind appname] vmc bind-service <servicename> <appname> vmc unbind-service <servicename> <appname> vmc delete-service <servicename> vmc user, vmcpasswd, vmc login, vmc logout, vmc add-user vmc services, vmc apps, vmc info
  • 18. What’s under the hood From a Developer’s Perspective 16
  • 20. Cloud Foundry Logical View 18 vmc client STS plugin browser (user app access) Router Health Manager user apps Cloud Controller user apps DEA: execution environment Services: core, ecosystem, etc. Infrastructure
  • 21. Cloud Foundry: Router The router receives all traffic from the outside world and maintains the mapping from external URL to internal application instance The router performs this job for all Cloud Foundry APIentry points (typically from vmc or STS) as well as for all application specific traffic The router acts as a load balancer, distributing requests evenly across all instances of a given app 19
  • 22. Cloud Foundry: Cloud Controller It is responsible for all state changes in the system Ensuring all dependencies are available Binding the application to services Anything that effects users, apps, or services is controlled by the Cloud Controllers Examples : vmc push, vmc instances, vmc create-service, etc. are driven by the Cloud Controller Once staged, the Cloud Controller is responsible for connecting the application to a DEA execution unit 20
  • 23. Cloud Foundry: Health Manager The Health Manager works closely with the Cloud Controller and DEAs to ensure that applications stay alive and healthy When an app instance crashes, it is the Health Manager that notes this and arranges for a replacement instance If the Health Manager detects rapid and repeated crashes, it declares the app to be in a “flapping” state and does not try to revive the app instances that are sick 21
  • 24. Cloud Foundry: DEA The system maintains a pool of standby DEAs and these act as the VM-level container for an application DEAs support both single and multi-tenant operation (1 app per DEA VM, or n apps per DEA VM) DEAs provide a secure/constrained OS environment running the application’s app-server and the application code 22
  • 25. Cloud Foundry: Services Services are one of the extensibility planes in Cloud Foundry MySQL, Redis, MongoDB, RabbitMQ, etc. are all examples of services Services may be shared across applications Cloud Foundry abstracts the provisioning aspect of services through a uniform API hosted in the cloud controller The net is that its very easy to take an app and add a service to the app in a uniform way 23