350 likes | 705 Views
Play with Cloud Foundry. An Open PaaS. Shi, Tao. May 11, 2012. Agenda. Overview Development Guide Deployment Guide Resource Q&A. Cloud Foundry Overview. What’s Cloud Foundry? Languages/Frameworks Inner Service Logic View Architecture Disadvantages. Cloud Computing System.
E N D
Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012
Agenda • Overview • Development Guide • Deployment Guide • Resource • Q&A
Cloud Foundry Overview • What’s Cloud Foundry? • Languages/Frameworks • Inner Service • Logic View • Architecture • Disadvantages
What’s Cloud Foundry? An open platform-as-a-service (PaaS). The system supports multiple frameworks, multiple application infrastructure services and deployment to multiple clouds.
Languages/Frameworks/Service • Multi-Language • Ruby, Java, Scala, Node.js, Erlang, Python, PHP.. • Multi-Framework • Rails, Sinatra, Spring, Grails, Express, Lift • Multi-Services • MySQL, Postgres, MongoDB, Redis, RabbitMQ • Multi-Cloud, Multi-IaaS • Public Cloud, MicroCloud, Private Cloud
Logic View vmc client STS plugin browser (user app access) Router Health Manager Cloud Controller user apps user apps DEA: execution environment Services: core, ecosystem, etc. • Infrastructure
Disadvantages • Limited Services • Limited File Generate/Access • Charge Public Cloud • No Infrastructure in China • Beta
Agenda • Overview • Development Guide • Deployment Guide • Resource • Q&A
Prepare • Register • Install Ruby and RubyGems • Install VMC (VMware Cloud Client) • Install STS (with Cloud Foundry Plugin)
Spring to Cloud Foundry • Auto Reconfiguration • Cloud Namespace • Spring 3.1 Profiles
Auto Reconfiguration • Two modifications • Additional Jar • Update Web.xml • BeanFactoryPostProcessor Examines the application context before creating beans • Swaps existing beans of matching types
Cloud App Setup • Maven • Spring Application-Context
Cloud Namespace • Support Data Source • Other Support
Spring 3.1 Profiles • V3.1 adds new support for environments • Stand-alone Containers
Demo: Crawler Crawler.cloudfoundry.com Http://www.somesite.com Cloud Foundry / Public Cloud Input url MongoDB Consuming Image Object WebApp Query RibbitMQ Instance Persist Get url Dom parse Produce Image Object Crawler
Crawler WebApp • ImageUnitRepository • ImageUnitGateway Crawler.war • MongoDB • RabbitMQ • Cloud Foundry Services
Agenda • Overview • Development Guide • Deployment Guide • Resource • Q&A
Deployment Guide • Deploy App • Update App • Binding Service to App • Start/Stop App • Scale App
Deploy App • vmc login • vmc target • vmc push • vmc update • vmc create-service • vmc bind-service Via VMC Via STS
Access Service • TCPoverHTTPtunnel • Localclient • Remoteserver • gem install caldecott • vmc tunnel your-service • Mongodb/mysql command Caldecott
Micro Cloud Foundry(BETA) A cloud packaged as a VMware Virtual Machine Useasadevelopersandbox •UsetheservicesfromJunitintegrationtests •Deployyourapplicationforfunctionaltesting •RemotedebuggingfromSTS
Micro Cloud Foundry Pre-requisites Minimum1GB RAM InternetConnectivity (w/DHCPisideal) Minimum 8 GB Disk Resources Virtualization Clients STS VMC
Private Cloud CloudFoundry.ORG YourInfrastructure DeployBehind Firewall Setup Environment Download code Setup Scripts Apache2 license
Agenda • Overview • Development Guide • Deployment Guide • Resource • Q&A
Things to Forget • First normal form • Waterfall model • Single server deployment • Single language skill • Build everything from scratch • Build custom infrastructure
Things to Learn • Agile, API Design • UI Design, Javacript, HTML5, CSS3 • A/B Testing • Open Source, Open Standards • Architecture, Distributed Computing • Cloud Platforms and APIs • Multiple types of languages (imperative, object, functional, logic) • Ability to encapsulate domain knowledge in a DSL • Build on the shoulders of giants: reuse, rest APIs • Pick your battles, choose what you need to build yourself to add value • Learn to live in a box (embrace platform limitations) to think outside the box • Use an App Store for distribution
Cloud Foundry Resources • Primary Site : cloudfoundry.com • Open Source Site : cloudfoundry.org • Twitter : @cloudfoundry • Blog : blog.cloudfoundry.com • FB : facebook.com/cloudfoundry • Support : support.cloudfoundry.com