CLOUD Lc08 Introduction To CloudFoundry

Transcription

HES-SO Master of Science in EngineeringCloud Computing —Introduction to Cloud FoundryAcademic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryIntroduction Cloud Foundry is an Open Source projectdeveloping software for Platform-as-a-Service Initially developed by VMware and released in2011 Primarily written in Ruby and Go A number of companies offer public PaaScloud services based on Cloud Foundry: Pivotal Web Services IBM Bluemix SAP HANA Cloud Platform CenturyLink AppFog HPE Helion Stackato Swisscom Application Cloud anynines (Avarteq)2appfogCloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryLayeringCloud Foundry Out-of-the-box Cloud Foundry can beArchitecturedeployed on private and public IaaS clouds:Internet Private clouds:Dynamic'Router'The CloudFoundry platform is OpenStackabstracted as a set of large-scale VMware vSpheredistributed services. It uses Cloud Publicclouds:FoundryBoshto operate the underlying Any rovidersAmazon WebServicesVMware, AmazonAWS,OpenStack). VMware vCloud Air, vCloud Director Local machine(for developmentand testing):Componentsare dynamicallydiscoverable Vagrantand looselycoupled, exposing healththroughHTTPendpointsagentsoncan CloudFoundrycan be sodeployedother gits stateCloud&Providersystemstate) (CPI)and act on gInfrastructureSource: Pivotal, Cloud Foundry Technical Overview, technical-overview3Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf9

HES-SO MSECloud FoundrySupported languages and frameworks CloudFoundry supports many languages andframeworks via the Buildpack concept. Buildpacks are scripts for deployingapplications. They build an application(including its dependencies) on the targetserver. There are Buildpacks for various languages(see table), plus Buildpack for precompiled binaries Buildpack for static web files Your favorite language is not supported? Writea Buildpack for it!LanguageFrameworksJavaSpring, Play, RatpackRubyRails, Sinatra, oud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryArchitecture — Developer Droplet Execution Agent(DEA)Usersdeploy appconfigureCloud ControllerWeb interface /command lineRelational DBObject storeNoSQL MailSearch.Developer5Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryArchitecture — Full viewSource: NTT, PaaS Platform Based on Cloud Foundry, ?contents ntr201502fa2.html6Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryHistory 2008-08 A startup company named CloudFoundry develops a PaaS, hosted oncloudfoundry.com Written in Java 2009-08 SpringSource acquires CloudFoundry 2009-08 VMware acquires SpringSource 2011-04 VMware announces beta of anOpen Source project called "Cloud Foundry" PaaS solution Integrates with Java Spring framework,supports also Ruby and Node.js Complete rewrite in Ruby 2012-12 VMware announces to spin out theCloud Foundry project into Pivotal 2013-08 Creation of Cloud Foundry AdvisoryBoard Members: IBM, CenturyLink, Piston, Intel,Pivotal, ActiveState, Stark & Wayne,Canonical, CloudCredo 2013-12 First production release of CloudFoundry 2014-02 Creation of Cloud FoundryFoundation Platinum sponsors: EMC, IBM, HP, Pivotal,Rackspace, SAP, VMware 2015-11 Microsoft announces generalavailability of Cloud Foundry on Azure 2015-12 Cloud Foundry announcescertification program 2013-04 Project hand-over to PivotalSource: Phil Whelan, A Brief History Of Cloud Foundry and Stackato, ory-cloud-foundry-and-stackato7Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSECloud FoundryCertification The Cloud Foundry Foundation runs acertification program for Cloud Foundrybased offerings Ensures portability across vendors All certified offerings are using the same coreCloud Foundry software Products need to recertify annually Vendors having earned the certification as of2015-12: CenturyLink AppFog HPE Helion Cloud Foundry Huawei FusionStage IBM Bluemix Pivotal Cloud Foundry SAP HANA Cloud Platform Swisscom Application Cloud8Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetBOSH CloudFoundry runs on top of an IaaS. BOSHFoundryplatformisinstalls CloudFoundry on the(boshouter shell)as a setIaaSof automaticallylarge-scaleby creating VMs, installingandItconfiguringCloudFoundry packages insideservices.uses CloudVMs. During operations it scales up orosh to theoperatethe underlyingdown parts of CloudFoundry by allocating ore fromfreeingIaaS VMs.providers(e.g.,The systemadministratorBOSH via a remote CLI.mazon accessesAWS, OpenStack). Responsible 'Provided'Service'Instances'Deployment ands are dynamicallydiscoverable (life-cycle management) ofcoupled,Operationsexposinghealth on the IaaSCloudFoundry componentsTP endpointsso agents can Monitoringinformation(appstate & FailureUnderlyingrecoveryInfrastructuree) and acton it. updates Software Health'Manager'Cloud Computing Introduction to Cloud Foundry Academic year Foundry'BOSH'(C) 2015 Marcel Graf9

HES-SO MSECloud FoundryDeployment As an example, a typical CloudFoundrydeployment on AWS uses 23 virtual machines 6 virtual subnets 4 virtual routers 1 VPC10Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetMessaging NATS is a fast internal messaging bus toFoundryplatform ismanage system wide communication via aas a setpublish-and-subscribeof large-scale mechanism.services.It uses Cloud Responsiblefor:osh to operatethe underlying Non-Persistentmessaginge from IaaSproviders (e.g., Pub/Submazon AWS,OpenStack). Queues(app events) Directed messages (INBOX)s are dynamically discoverablecoupled, exposing healthTP endpoints so agents caninformation (app state &e) and act on nderlyingInfrastructureCloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf9

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetDroplet Execution Agent (DEA) Droplet Execution Agents (DEA) are secure andFoundryisfully platformisolated containers.DEAs are responsibleas a setforofanlarge-scaleApps lifecycle: building, starting andstoppingAppsas instructed. They periodicallyservices.It usesCloudabout their state via theosh to broadcastoperate messagesthe underlyingNATS message bus.e from IaaS providers (e.g., Responsible for:mazon AWS, in'Servers' Process discoverables are dynamically File system healthcoupled, exposing NetworkTP endpointsso agents can Memoryinformation(app state & Managing app lifecyclee) and acton it.PaaSDEA'Pool'Service'Broker'Node(s)'Apps' Managing Linux containers (Warden) Monitoring resource ry'BOSH'UnderlyingInfrastructure App log and file streaming DEA heartbeats (NATS to CC, HM)12Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf9

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetBuildpacks Buildpacks are Ruby scripts that rks/plugins,as a setcompileof large-scalethe source code into executablebinaries,andCloudrelease the app to an assignedservices.It usesRuntime components can be cached forosh to DEA.operatethe underlyingfaster execution of subsequent app pushes.e from IaaS providers (e.g., Responsible for:mazon AWS, in'Servers' /bin/compiles are dynamicallydiscoverable /bin/release healthcoupled, exposing ConfigureTP endpointsso dropletagents can Runtime (Ruby/Java/Node/Python)information(app state &Container (Tomcat/Websphere/Jetty)e) and act onit.PaaSDEA'Pool'Service'Broker'Node(s)'Apps' Staging* 'Foundry'BOSH'UnderlyingInfrastructure Application (.WAR, .rb, .js, .py)13Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf9

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetService Broker Service Brokers provide an interface for nativeFoundryand platformexternal 3rdisparty services. Serviceas a setprocessesof large-scalerun on Service Nodes or withexternalas-a-serviceservices.It usesCloud providers (e.g., email,etc.)osh to database,operatemessaging,the underlying Responsible for:e fromIaaS providers (e.g., Advertising service catalogmazon AWS,OpenStack). Makes create/delete/bind/unbind calls toservice 'Provided'Service'Instances' Requests inventoryof existing instances ands are dynamicallydiscoverablefrom cloud controller for caching,coupled,bindingsexposinghealthorphan managementTP endpointsso agentscan SaaS marketplacegatewayinformation(app state& Implementedas HTTP endpoint, writtenUnderlyingin anyInfrastructuree) and actlanguage.on it.14Health'Manager'Cloud Computing Introduction to Cloud Foundry Academic year Foundry'BOSH'(C) 2015 Marcel Graf9

HES-SO MSECloud Foundry ComponentsServices Marketplace The services offered via the Service Brokerdiffer from provider to provider. Typically one finds among the services Relational databases (e.g., MySQL, PostGres) Object stores NoSQL databases (e.g., MongoDB, Redis) In-memory caches (e.g., memcached) Message queues (e.g., RabbitMQ) Typically database services are provided asdedicated instance (think Amazon RDS), not asa multi-tenant database (like GoogleDatastore). A service is not necessarily provided by thePaaS provider, it may be provided by a thirdparty.15Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetCloud Controller The Cloud Controller maintains command andFoundryplatformcontrolsystems,isincluding interface with clientsas a set(CLI,of Weblarge-scaleUI, Spring STS), account andprovisioningservices.It uses control.CloudIt also provides RESTfuldomain objects (apps, services,osh to interfaceoperatetotheunderlyingorganizations, spaces, service instances, usere fromroles,IaaSandproviders(e.g.,more).mazon ResponsibleAWS, OpenStack).for:PaaS Expected App state, state transitions, anddesired convergences are dynamically discoverable Permissions/Authcoupled, exposing health Orgs/Spaces/UsersTP endpoints so agents can Services managementinformation (app state & App placemente) and acton it. Auditing/Journaling and billing rlyingInfrastructure Blob storage16Cloud Computing Introduction to Cloud Foundry Academic year 2015/16(C) 2015 Marcel Graf9

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetHealth Manager Health Manager monitors application uptimeFoundryplatformis NATS message bus forby listeningto theas a setmismatchedof large-scaleapplication states (expected vs.actual).The CloudController publishesservices.It usesCloudthe DEAs publish actualosh to expectedoperatestatetheandunderlyingstate. State mismatches are reported to thee fromCloudIaaSController.providers (e.g.,mazon ResponsibleAWS, OpenStack).for: Maintains the actual state of Provided'Service'Instances' Compares to discoverableexpected states are dynamically Sendssuggestionsto make actual matchcoupled,exposinghealthexpected (cannot make state changes itself –TP endpointssoagentsonly CCcando that!) caninformation (app state &UnderlyingInfrastructuree) and act on it.17Health'Manager'Cloud Computing Introduction to Cloud Foundry Academic year Foundry'BOSH'(C) 2015 Marcel Graf9

HES-SO MSEFoundryCloud Foundry ComponentsctureInternetUser Authorization and Authentication (UAA) andLogin Servers User Authorization and Authentication (UAA)Foundryplatformissecurity and authorizationprovidesidentity,as a setservices.of large-scaleIt manages third party Oauth 2.0accesscredentialsand can provide applicationservices.It usesCloudand identity-as-a-service for appsosh to accessoperatethe underlyingrunning on Cloud Foundry. Composed of: UAAe fromServer,IaaS Commandproviders(e.g.,LineInterface, Library.mazon ResponsibleAWS, OpenStack).for: Token ServerPaaSDynamic'Rou

Cloud'Foundry'BOSH' Build'Packs' Logging' Cloud Foundry Architecture The Cloud Foundry platform is abstracted as a set of large-scale distributed services. It uses Cloud Foundry Bosh to operate the underlying infrastructure from IaaS providers (e.g., VMware, Amazon AWS, OpenStack). Internet Underlying Infrastructure PaaS