Click here to load reader
Upload
rafe
View
363
Download
0
Embed Size (px)
DESCRIPTION
用 BOSH 自动部署大规模 云平台 Cloud Foundry. Henry Zhang, VMWare, China @ 张轩宁的围脖. Jacky Li, VMWare, China. 演讲内容. Cloud Foundry 云平台简介 Cloud Foundry 架构 Cloud Foundry 部署模型 BOSH 工作原理 用 BOSH 自动化部署 Cloud Foundry 用 BOSH 实现 Cloud Foundry 弹性 BOSH 应用实例. Cloud Foundry 云平台简介. 应用的复杂度 : 开发. - PowerPoint PPT Presentation
Citation preview
BOSHCloud FoundryHenry Zhang, VMWare, China@
Jacky Li, VMWare, China
Cloud FoundryCloud FoundryCloud FoundryBOSHBOSHCloud FoundryBOSHCloud FoundryBOSH
Cloud Foundry
Sound architecture: future proofing without overdoingUnit and integration testsResponding to changing business needsConfusing technology landscape:
Choosing the right hardware, operating system, web serverMonitoring applicationsResponding to scalability needsDealing with hardware- and system-level failuresUpgrading without substantial down time
ImplementationFunctional logicImplementation overhead
SaaSSoftware as a Service
PaaSPlatform as a Service
IaaSInfrastructure as a Service
Application Service InterfaceCloud Foundry PaaSData ServicesCloud Provider Interface
Cloud Provider InterfaceApplication Service InterfaceData ServicesApache2 licenseMicro CloudsCloud Foundry PaaS
Cloud Foundry
Cloud Foundry Hardware (CPU, Memory, Storage, Network)Infrastructure as a ServiceOuter Shell (BOSH)Inner Shell (CF)Clients
Cloud Foundry Inner ShellRoutersCloudControllersAppAppHealthManagerExecution Agents (DEA) PoolMessagingDevelopersStagersServices
Cloud FoundryApp meta data
Cloud Foundry
Cloud Foundry uaaccdbnatshealth manager
Cloud Foundry 1- OS
Cloud Foundry 2-
500 5,000 VMs40+ unique node types75+ unique software packages75+ unique environmentsSmall teamCloudFoundry.com
dev_setup
(ubuntu 10.04)
Cloud Foundry1
BOSH
IaaS (CPI)Cloudfoundry.comCloud Foundry2
BOSH
BOSH is a recursive definition of
BOSH Outter SHellBOSH?
Cloud FoundryCloud Foundry, Gerrit, Jenkins, Wordpress, MySQL,
http://boshdb.com
BOSH
BOSHCloud Foundry
BOSH
BOSH1BOSH CLIOperationStaff
BOSH BOSHBOSH CLIBOSH
BOSH2BOSH CLIIaaSOperationStaff
BOSH CPICPI ( Cloud Provider Interface) IaaSBOSHCPIIaaS
BOSH3Inner Shell. . .BOSH CLI
VMOperationStaff
VM
VM
VMBOSHCPIInner Shell
IaaS
BOSH CPI
BOSH4Inner Shell. . .BOSH CLI
VMStemcellOperationStaff
VM
VM
VMStemcellDeployment manifest: IP/
IaaS
BOSH CPI
BOSH5Inner Shell. . .BOSH CLIStemcellDeploymentOperationStaffAgent
IaaS
BOSH CPI
BOSH6Inner Shell. . .BOSH CLIStemcellDeploymentOperationStaffAgentBOSHIaaS
BOSH CPI
BOSH7Inner Shell. . .BOSH CLIStemcellReleaseDeploymentOperationStaffRelease
IaaS
BOSH CPI
Cloud Foundry
(Stateless)
Cloud Controller: v1v2, Message BusCloud Controller v1Cloud Controller v2 while removing v1 VMsDestroyRouter / LBIncoming HTTP Requests
CanariesEventual consistency
(stateless)VMVM(stateful)VMVM
Stateful VM
VM
BOSHCloud Foundry(vSphere)
BOSH
BOSH6
BOSHBOSH CLI Ubuntu 10.04)Micro BOSH (VM)BOSH (6VMs)
BOSHCLI
- 64-bit Ubuntu 10.04 LTS, better in ISO format.vSphere V4.1 or V5.x, vSphere clientvCenter (installed on a Win2008 R2 64bit or a Win2003 server, physical or virtual machine)
1* Cloud Foundry
# of nodesOSCan be physical machineBOSH CLI1UbuntuYvCenter+vSphere Client1Win2008Y, can be split into two nodesmicro BOSH1UbuntuNBOSH6UbuntuNCloud Foundry34*UbuntuN, see notesTotal:43
2
4GB1 vCPU, 4 x 43 = 172 GB RAM, 1 x 43 = 43 vCPU 6 8 CPU32GB RAM.
256MB1 8 CPU16GB RAM.CPU
4VLANIPvSphere Internet
VLANNodesManagement VLANHypervisors and NFS storageCF VLANBOSH VMs, and VMs of cloud foundryService VLANFor LB, dual-home routers Public VLANFor LB, incoming requests
(2)
(3) vSphere
Cluster NFSvSpherevCenterClustervSphereNFS mount pointvSphere
vSpherevSpherevSpherevSphereNFS
2 vSphere
BOSH CLIUbuntu 10.04RubyBOSH CLI
Internet
Micro BOSH BOSH CLIBosh_deployerMicro BOSH, vCenterMicro BOSH
Internet
DEMO: Stemcell
$ bosh public stemcells$ bosh download public stemcell micro-bosh-stemcell-0.1.0.tgz
BOSH Micro BOSH BOSH 6 VMs)6Resource Pools
Pool NameSizeConfigurationJobssmall3RAM:512MB, CPU:1, DISK:2GBnats, redis, health_monitormedium2RAM:1GB, CPU: 1, DISK: 8GBpostgres, blobstoredirector1RAM:2GB, CPU: 2, DISK: 8GBdirector
BOSH 2 jobjobResource Pool
JobResource_poolIPnatssmall10.60.98.120postgresmedium10.60.98.119redissmall10.60.98.118directordirector10.60.98.117blob_storemedium10.60.98.116health_monitorsmall10.60.98.115
BOSH 3 deployment manifestymlgitHub
Cloud FoundryBOSH Cloud Foundry 34+ VMs)Resource Pools
Pool NameSizeConfigurationJobssmall32RAM:1GB, CPU: 1, DISK: 8GBNats router,ccdb_postgresuaadbvcap_redisUaa30jobsmedium4RAM:2GB, CPU: 2, DISK: 16GBdebian_nfs_servercloud_controllerdea
Cloud Foundry 2 job
. . . . . .
Cloud Foundry3 deployment manifestgitHubCloud Foundry
DEMOCloud Foundry releaseCreate releaseUpload releaseDeploy CF
BOSHCloud Foundry (vCenter)
BOSHCloud Foundry (BOSH CLI)
BOSHagent*
Cloud Foundry
Cloud Foundry Cloud FoundryCloud Foundry
BOSHDEABOSHServiceCloud Foundry IaaSDEAIaaSDEAIaaSSvcBOSH
BOSHDEABOSHServiceCloud Foundry IaaSDEAIaaSDEAIaaSSvcBOSH
BOSHCloud Foundry deployment manifestdeaservicesResource pool BOSH update
Cloud Foundry2deayml
BOSHCloud Foundry
*Bosh
Bosh
**
*bosh*
*Bosh*
BOSHCloud Foundry
BOSH
BOSH
BOSH
BOSH
Cloud Foundry
http://cndocs.cloudfoundry.com/deploy/vSphere.html
BOSHCloud Foundry
@cloudfoundry
http://www.cloudfoundry.cn/
http://cnblog.cloudfoundry.com/
http://cloudfoundry.csdn.net/
http://cndocs.cloudfoundry.com/
http://u.youku.com/CloudFoundryCN Cloud Foundry
Cloud Foundryhttp://cloudfoundry.com/signupCFCN
Thank You!
*Cloud computing as most vendors describe it breaks down into three fundamental layers. Youve probably seen this before, so well be brief.
At the top, we have SaaS, or Software as a Service. This is layer that faces consumers and has been around the longest. The .com buzz in the 90s was an early form of SaaS. Instead of installing software onto a computer, we interact with a server via a web browser. Instead of Outlook on a desktop, we use GMail in a browser.
At the bottom, we have Infrastructure as a Service. This is about moving away from physical machines in a data center to virtualized compute resources. Need a new server? Avoid the P.O. and just buy access to someone elses compute resources. Amazons EC2 is king in the public space, VMwares vSphere is dominate in the enterprise and Open Stack is the new incumbent.
So if SaaS targets consumers and MBAs, IaaS targets sysadmins, what about developers? Thats where PaaS or Platform as a Service fits in. PaaS is the youngest of these layers and makes it easy to deploy applications without installing an operating system, application server or database servers. PaaS is what this talk is about.**Staging: creating a runnable application, bundler, modify a DB cofig. Like bookstoreWe stick the user/pass connection, you dont this. Works for Java
Packaged cache foo packaged in rails
Blobstore where the app is ready to run with all of its depndecies, its packaged up in the blob store and DEA fetch it for execution
App meta data CC tells the DEA tells this is a java app*Multiple node typesMultiple instances of most node type
*Single node deployment model*Multi node deployment model*CPI ( Cloud Provider Interface) IaaSBOSHCPIIaaS
*BOSHCPIInner Shell
*StemcellDeployment manifest: IP/*Agent
*AgentBOSH
*Release
***
+---------------------------------+-------------------------------------------------------+| Name | Url |+---------------------------------+-------------------------------------------------------+| bosh-stemcell-0.5.2.tgz | https://blob.cfblob.com/rest/objects/4e4e78bca31e1... || bosh-stemcell-aws-0.5.1.tgz | https://blob.cfblob.com/rest/objects/4e4e78bca21e1... || bosh-stemcell-vsphere-0.6.4.tgz | https://blob.cfblob.com/rest/objects/4e4e78bca31e1... || micro-bosh-stemcell-0.1.0.tgz | https://blob.cfblob.com/rest/objects/4e4e78bca51e1... |+---------------------------------+-------------------------------------------------------+To download use 'bosh download public stemcell'.For full url use --full.
*vCenter view of Cloud Foundry*Command:bosh vms**If all DEAs are fully loaded, so we scale up with increasing number of DEA nodes*If all DEAs are fully loaded, so we scale up with increasing number of DEA nodes
*Update yml file to reflect the system changes, then do a command:
$ bosh update*