Transcription
Cloud Foundryand OpenStackRamiro Salas, @ramirosalasAdvisory Architect Pivotal Copyright 2014 Pivotal. All rights reserved.1
Open Source CommunitiesOpenStack - IaaSest. 2010Cloud Foundry - PaaSest. 2011(Free as in Speech, not as in Beer).
What is a PaaS?ApplicationsApplicationsDataDataYou ManageRuntimePaaSYou ManageIaaSYou torageStorageStorageNetworkingNetworkingNetworking
Joshua McKenty
Nova v0.1 waswritten in 17 daysby 5 people.
How are things the same?OpenStack & Cloud FoundryLicenseApache v2.0CommunityVendors, Users, and DevelopersArchitectureAPI-based services and message-passing
Cloud Foundry Foundation
Cloud Foundry Foundation & OpenStack Members
How are things different?OpenStackCloud FoundryLanguagePythonGo and RubyRelease Cycle6 months, integrated2 weeks, parallelGovernanceDedicated FoundationLinux Foundation projectInstallation toolsVariousBOSHCommunication HubIRC (#openstack-dev)Mailing listsSource code & reviewGerritt & Private GitGitHub & pull requestsAdoptionMostly OSS trials and dev/testenvironmentsMostly commercial productiondeployments
Units of ValueIaaS - OpenStack VMs Networks Volumes Images Security Groups, etc.Users Don’t Care About: Hypervisors Real Network Topologies How is the StorageManaged Where are the ImagesStored What Hardware is BeingUsed
Units of ValueIaaS - OpenStack VMs Networks Volumes Images Security Groups, etc.But they still have to careabout: IP addresses Disk sizes VM orchestration OS Lifecycle HA/DR
OpenStack ConstructsGive me a VMinstance nova.servers.create(name "test",image image,flavor flavor,key name "mykey")Give me a Volumevolume create(8192,snapshot id None,source volid None,name VolName,description “MyVolume”,volume type None,user id None,project id None,availability zone az1,metadata None,imageRef None)Similar for Networks, Images, etc.
So a new layer is born: PaaS Focuses exclusively on applications Abstracts resources even further No IPs - Message queues insteadNo middleware configuration - BuildpacksScale automaticallyAll your logs in the same placeDesigned for Cloud Native Apps
Units of ValuePaaS - Cloud Foundry Applications ServicesApps run on ContainersServices run on VMs Containers are transparent Lifecycle is fully managed System changes aredeclarative (manifest.yml) Front-ends, middleware,VMs, etc. all abstracted
Structured vs. Unstructured PaaSUnstructured DevOps controls everyaspect of the deliverable app Filesystem Ports exposed Layers Repositories Orchestration Dependencies Example:Custom-built systems withdifferent pieces like: Docker Kubernetes Mesos
But Often, Containers Alone Aren’t Enough
Structured vs. Unstructured PaaSStructured Developers only specifies appinstances, services to bind, andmemory. PaaS takes care of: Routing Security Filesystem Ports Scheduling High Availability, etc They Don’t have to Careabout the HOW
Cloud Foundry is The world’s leading open source platform-as-a-service. Supported by dozens of major organizations Language and framework agnostic Manages both VMs and containers Orchestrates both applications and data servicesFounded and commercialized by Pivotal Software, Inc.Code donated to Cloud Foundry Foundation in 2015
An (Overly) Simple View of the WorldApplicationsData Services Stateless Run in Containers Horizontally Scalable Disposable No permanent storage Stateful Run in Virtual Machines Multi-tenant Diagonally scalable Durable storage
12Factor.netMethodology for building software that: Use declarative formats for setup automation, tominimize time and cost for new developersjoining the project; Have a clean contract with the underlyingoperating system, offering maximum portabilitybetween execution environments; Are suitable for deployment on modern cloudplatforms, obviating the need for servers andsystems administration; Minimize divergence between development andproduction, enabling continuous deployment formaximum agility; And can scale up without significant changes totooling, architecture, or development practices.
Screen shot of Dev Console – pointing out simpleabstraction Demo Copyright 2014 Pivotal. All rights reserved.23
PCF Demo: cf push
CFArchitecture Copyright 2014 Pivotal. All rights reserved.25
Cloud Foundry: Applications and ServicesServices (virtual machines):managed by “BOSH”Applications (containers):managed by “Runtime”
Why BOSHProvision services,not machinesEnables continuousdeliveryCloud-agnostic viewof Platform OpsHolistic Toolchain for“rule them all"Eliminate bespokeautomation on top ofconfig management
Ops Manager BOSHIaaSBOSHDBDeploy myServicesBOSH DirectorWorker VMsBlobstoreNATSHealthMonitorMessagingHealth ManagerCloud ControllerTarget VM
Pivotal Cloud Foundry ArchitectureEnterprise Cloud FoundryElasticRuntimeCoreCompsService soleDEAHealthManagerDEAEnterpriseSupportService BarBrokerMQService BazBroker .etcBOSHprovisioning / configuration / OpenStack
OpenStack IntegrationBOSH CPI Can use S3 interfaces forblobstore (Swift/Ceph) Uses Glance API to uploadstemcells Interfaces directly with Nova(Cinder and Neutron arecalled via Nova) Credentials obtained viaKeystone
Process flowDEA Pool (Droplet Execution Agent) cfPush AppCloudControllerHealthManagerNATS(message bus)RouterStaging AppsRunning Apps(API)http:// DEA / CellWarden / GardenContainerization
Orgs, Spaces, Users and Quotas
OrganizationsLogical division within a Pivotal CFinstall / Foundation.Each organization has its own usersand assigned quotaUser permissions / roles are specifiedper space within an organizationSub-divided into Spaces
Quotas and PlansDifferent quota limits (e.g. “small”,“enterprise”, “default”, “runaway”)can be assigned per OrganizationQuota defines Total Memory Total # of Services Total # of Routes
SpacesLogical sub-division within anorganizationUsers authorized at an organizationlevel can have different roles perspaceServices and Applications are created/ specified per SpaceSame Service can have differentmeanings per space
Copyright 2014 Pivotal. All rights reserved.37
Overview: Deploying App toCloud Foundry Runtime① Upload appbits andmetadataBlobstorepush appDBServicecredentials app MD② Create and bind servicesCloud ControllerService BrokerNode(s)③ Stage application④ Deploy applicationDEADEADEA which we will depict in a momentRoute⑤ Manage application healthDEA Cloud FoundryElastic Runtime
Stage an ApplicationStaging* /bin/detect /bin/compile /bin/release Configure droplet Runtime (Ruby/Java/Node/Python) Container (Tomcat/Websphere/Jetty) Application (.WAR, .rb, .js, .py) BlobstoreDBCloud ter Release Cloud FoundryElastic Runtime
Deploying an ApplicationBlobstoreCloud loud FoundryElastic Runtime
Under the HoodBuildpacksContainersDroplet ExecutionAgents
BuildpacksDefines the rules to create a fully-containedexecution environment App BuildpackDropletA Droplet is a fully self-sufficient, referentially correctpackage that can be executed in an isolatedenvironment
ContainersIsolated environments within an OS VM that runDroplets according to defined rulesThere can be many Containers per OS VM thusincreasing VM utilization and density
Droplet Execution AgentsVMs that host Containers and can create/destroy themas needed or ordered
Why Containers?VMs are an inefficient level of isolationJ2EEContainerOverheadRAM on Machine!!!VM ead!!!
Why Containers?Containers microservices allow denser packing andlooser coupling of components"""""""""""""""""""""RAM on MachineVM overhead
Microservice Architecture Made TPHTTPAMQP AMQPGraphDB
ResourcesDocumentation: http://docs.cloudfoundry.orgMeetups: http://cloudfoundry.meetup.com/
Pivotal Cloud Foundry Architecture Enterprise Cloud Foundry Service Foo Broker DB Service Bar Broker MQ Service Baz Broker etc Elastic Runtime DEA DEA DEA DEA vCA BOSH provisioning / configuration / orchestration vSphere AWS OpenStack Operations Manager Developer Console Enterprise Support Core Comps Cloud Controller Router Health Manager . OpenStack Integration