play with cloud foundry an open paas shi, tao may 11, 2012

31
Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Upload: victor-cobb

Post on 28-Dec-2015

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Play with Cloud FoundryAn Open PaaS

Shi, Tao

May 11, 2012

Page 2: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

• Overview

• Development Guide

• Deployment Guide

• Resource

• Q&A

Agenda

Page 3: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Cloud Foundry Overview

• What’s Cloud Foundry?

• Languages/Frameworks

• Inner Service

• Logic View

• Architecture

• Disadvantages

Page 4: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Type Vendor

SaaS

PaaS

IaaS

Cloud Computing System

Page 5: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

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.

Page 6: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Languages/Frameworks/Service

Multi-LanguageRuby, Java, Scala, Node.js, Erlang, Python, PHP..

Multi-FrameworkRails, Sinatra, Spring, Grails, Express, Lift

Multi-ServicesMySQL, Postgres, MongoDB, Redis, RabbitMQ

Multi-Cloud, Multi-IaaSPublic Cloud, MicroCloud, Private Cloud

Page 7: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Logic View

Router

Infrastructure

Health Manager

DEA: execution environmentServices: core, ecosystem, etc.

user appsCloud Controller user apps

vmc client STS plugin browser(user app access)

Page 8: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Architecture

Page 9: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Disadvantages

• Limited Services

• Limited File Generate/Access

• Charge Public Cloud

• No Infrastructure in China

• Beta

Page 10: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

• Overview

• Development Guide

• Deployment Guide

• Resource

• Q&A

Agenda

Page 11: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Prepare

• Register

• Install Ruby and RubyGems

• Install VMC (VMware Cloud

Client)

• Install STS (with Cloud

Foundry Plugin)

Page 12: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Spring to Cloud Foundry

• Auto Reconfiguration

• Cloud Namespace

• Spring 3.1 Profiles

Page 13: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Auto Reconfiguration

Two modifications

1. Additional Jar

2. Update Web.xml

BeanFactoryPostProcessor

Examines the application context before

creating beans

Swaps existing beans of matching types

Page 14: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Auto Reconfiguration

Page 15: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Cloud App Setup

Maven

Spring Application-Context

Page 16: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Cloud Namespace

Support Data Source

Other Support

Page 17: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Spring 3.1 Profiles V3.1 adds new support for environments Stand-alone Containers

Page 18: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Cloud Foundry / Public Cloud

Demo: Crawler

Http://www.somesite.com

Crawler

RibbitMQ Instance

Input url

WebApp

ConsumingImage Object

Crawler.cloudfoundry.com

MongoDBPersist

Query

Get urlDom parse

Produce Image Object

Page 19: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Crawler WebApp

ImageUnitRepository ImageUnitGateway

MongoDB RabbitMQ

Crawler.war

Cloud Foundry Services

Page 20: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

• Overview

• Development Guide

• Deployment Guide

• Resource

• Q&A

Agenda

Page 21: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Deployment Guide

• Deploy App

• Update App

• Binding Service to App

• Start/Stop App

• Scale App

Page 22: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Deploy App

• vmc login• vmc target• vmc push• vmc update• vmc create-service• vmc bind-service

Via STSVia VMC

Page 23: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Access Service

• TCP over HTTP tunnel

• Local client

• Remote server

• gem install caldecott

• vmc tunnel your-service

• Mongodb/mysql command Caldecott

Page 24: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Micro Cloud Foundry(BETA)

A cloud packaged as a VMware Virtual MachineUse as a developer sandbox

• Use the services from Junit integration tests

• Deploy your application for functional testing

• Remote debugging from STS

Page 25: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Micro Cloud Foundry Pre-requisites

Minimum 1 GB

RAM

Resources

Virtualization

Clients

Minimum 8 GB

Disk

Internet Connectivity

(w/DHCP is ideal)

VMC STS

Page 26: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Download code Setup EnvironmentDeploy Behind

FirewallSetup Scripts

Apache2 license

Private CloudCloudFoundry.ORG

Your Infrastructure

Page 27: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

• Overview

• Development Guide

• Deployment Guide

• Resource

• Q&A

Agenda

Page 28: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Things to Forget

• First normal form

• Waterfall model

• Single server deployment

• Single language skill

• Build everything from scratch

• Build custom infrastructure

Page 29: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

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

Page 30: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

• Primary Site : cloudfoundry.com• Open Source Site : cloudfoundry.org• Twitter : @cloudfoundry• Blog : blog.cloudfoundry.com• FB : facebook.com/cloudfoundry• Support : support.cloudfoundry.com

Cloud Foundry Resources

Page 31: Play with Cloud Foundry An Open PaaS Shi, Tao May 11, 2012

Q & A