SlideShare uma empresa Scribd logo
1 de 58
CloudFoundry: Elastic Architecture
       Design and Deploy Based on
       OpenStack
                                                     郭峰 (Golfen Guo)
                                                     @教授也是浮云
                                                     golfen.guo@emc.com

                Cloud Platform and Application Lab, EMC Labs China




© Copyright 2012 EMC Corporation. All rights reserved.                    1
EMC Labs China

     Advanced Technology
   Research and Development
                                                           University
                                                          Collaboration
                                                                               Vision
                Big Data Lab                                                  Become an elite
                                                                                research and
                                                                                  advanced
                                                                            technology institute
                                                             Industry
        Cloud Infrastructure                                                       in China
                                                         Standards Office
          and System Lab                                                               -
                                                                             Become the model
                                                                            for future EMC Labs
         Cloud Platform and                                                      worldwide
          Applications Lab                                 IP Portfolio
                                                          Development




© Copyright 2012 EMC Corporation. All rights reserved.                                             2
Agenda
 • What is PaaS
 • CloudFoundry Overview
 • Elastic Architecture in CloudFoundry
 • Introduce to BOSH
 • CPI and OpenStack
 • Deploy PaaS with BOSH




© Copyright 2012 EMC Corporation. All rights reserved.   3
What is PaaS? (from Search Cloud
Computing)
   • Platform as a Service (PaaS) is a way to rent hardware, operating
   systems, storage and network capacity over the Internet.

   • The service delivery model allows the customer to rent virtualized
   servers and associated services for running existing applications or
   developing and testing new ones.


                                                         RENT, not BUILD one!

                                           Virtual Server and Associated Service




© Copyright 2012 EMC Corporation. All rights reserved.                             4
How PaaS Benefit Us?

         Before:                                         Now:




© Copyright 2012 EMC Corporation. All rights reserved.          5
How PaaS Benefit Us? (Cont.)
  From Accelerating your Journey to Application Transformation, EMC World
  2012
                                                         PaaS powered




                                                                                                               You Manage
                            Traditional IT                                 IaaS                                                PaaS


                                                           You Manage
                              Applications                              Applications                                        Applications
 Agility and                                                                Data
                                  Data                                                                                          Data
Cost Savings




                                                                                         Managed by Platform




                                                                                                                                             Managed by Platform
                                                                          Runtime
               You Manage




                                Runtime                                                                                       Runtime
                              Middleware                                Middleware                                          Middleware
                                  O/S                                       O/S                                                 O/S
                              Virtualization                            Virtualization                                      Virtualization
                                Servers                                   Servers                                             Servers
                                Storage                                   Storage                                             Storage
                              Networking                                Networking                                          Networking




  © Copyright 2012 EMC Corporation. All rights reserved.                                                                                                           6
Cloud Foundry – The Open PaaS




© Copyright 2012 EMC Corporation. All rights reserved.   7
PaaS in Action…
 Another analogy from Mark Lucovsky,

   Every one knows, “Hello World”:

              $ cat hw.c
              #include <stdio.h>
              main() {
                 printf(“Hello Worldn”);
              }




                      $ cc hw.c; ./a.out




© Copyright 2012 EMC Corporation. All rights reserved.   8
PaaS in Action... (Cont. )
    “Hello World” in the Cloud:

              $ cat hw.rb
              require 'rubygems'
              require 'sinatra'

              $hits = 0
              get '/' do
                $hits = $hits + 1
                "Hello World - #{$hits}"
              end



                      $ vmc push hw




© Copyright 2012 EMC Corporation. All rights reserved.   9
Scale App On Demand
Implement a Scalability “Hello World” in Cloud:

   Step 1: Scale instance to 10:

   $ vmc instances hw 10

   Step 2: Change the codes:

   get '/' do
     $hits = $redis.incr(‘hits’)
     "Hello World - #{$hits}"                            Redis
   end

   Step 3: bind Redis service to App:

   $ vmc create-service redis –bind hw


© Copyright 2012 EMC Corporation. All rights reserved.           10
Scale App On Demand(Cont.)
From Cloud Foundry Launch Event, April, 2011             PaaS powered




© Copyright 2012 EMC Corporation. All rights reserved.                  11
Simplify Deployment
                                                         [mysqld]
                                                         user = foobar
                                                         port = 3306
      Before:                                            basedir = /usr
                                                         bind-address = 172.58.77.101
                                                         key_buffer = 16M
                                                         thread_stack = 128K
                                                         thread_cache_size = 8
                                                         …

                                                         [nginx]
                                                         http.include mime.types;
                                                         default_type: application/octet-stream;
      Web App                                            log_format: main ‘$remote_addr - $remote_user []…’
                                                         keepalive_timeout 65;

                                                         [tomcat]
                                                         <Connector redirectPort=‚8443‛ emptySessionPath…/>
                                                         <bean id=‚sessionFactory‛ class=‚org.springframework…/>

                                                         [frontend]
                                                         dependencies:
                                                         - mysqlclient
                                                         - ruby
                                                         files:
                                                         - core/app/fe/**/*
                                                         - core/common/**/*

                                                         [blah]
                                                         - blah blah blah




© Copyright 2012 EMC Corporation. All rights reserved.                                                             12
Simplify Deployment (Cont.)

      Now:
                                                         # to target and login to cloud foundry
                                                         vmc target http://api.cloudfoundry.com
                                                         vmc login

     Web App                                             # to create and boot the app for the first time
                                                         vmc push myapp –instances 2 –mem 64M –path ../code

                                                         # to create the database and bind it to the app
                                                         vmc create-service mysql –name mydb –bind myapp

                                                         # update live app with new code
                                                         vmc update myapp –path ../code




© Copyright 2012 EMC Corporation. All rights reserved.                                                        13
First Touch CloudFoundry
          prompt>       gem install vmc
          prompt>       vmc target api.cloudfoundry.com
          prompt>       vmc login
          prompt>       vmc push

          Would you like to deploy from the current directory? [Yn] Yes
            Application Name: hello
            Application Deployed URL: 'hello.cloudfoundry.com'? hello-bob.cloudfoundry.com
            Detected a Sinatra Application, is this correct? [Yn] Yes
            Memory Reservation [Default:128M] (64M, 128M, 256M, 512M or 1G) (Press Enter to take
          default)
            Would you like to bind any services to 'hello'? [yN]: No
            Uploading Application:
               Checking for available resources: OK
               Packing application: OK
            Uploading (0K): OK
            Push Status: OK
            Staging Application: OK
            Starting Application: OK




© Copyright 2012 EMC Corporation. All rights reserved.                                             14
First Touch CloudFoundry(Cont.)
                                                         Upload your app
                                                                Memory of each instance


                                                                   Change served instances
                        Your apps deployed
                                                            Start, stop, update, restart

                                                             Services of current app




                   Your all created services                Information of app




© Copyright 2012 EMC Corporation. All rights reserved.                                     15
PaaS Architecture Pattern




                                                         MySQL
                                                                           RabbitMQ
                                                                 MongoDB


                                                                                      Redis




© Copyright 2012 EMC Corporation. All rights reserved.                                        16
PaaS Architecture Pattern (Cont. )




© Copyright 2012 EMC Corporation. All rights reserved.   17
PaaS Architecture Pattern (Cont. )




© Copyright 2012 EMC Corporation. All rights reserved.   18
Conclusion
 Abstract to three layers:
 • Routers for finding right endpoint of Apps
 • Runtime for Apps
 • Services provided by platform, consumed by
   Apps




© Copyright 2012 EMC Corporation. All rights reserved.   19
The Keys of Design…
 • Elastic
 • Failover/System Robust
 • Resource Recycling




© Copyright 2012 EMC Corporation. All rights reserved.   20
Elastic Architecture in CloudFoundry
                                       Sends droplet

          Design principals:
                                      heart beats and
                                       exit messages

          1. Each components can be run standalone;
                                                Router

          2. Each components can be scale-out, and notify the peersand     with
                                                 Router
                                                               Registers
             message;
                                  Registers and
                                   unregisters                  unregisters


          3. The components communicate only with message or RESTful API.
                                                                                                           Routes droplet
                                                                     Routes REST API
                                                                                                             requests
                                                                         requests
                                              Droplet change
                                               notifications



          Self-government and LooseController     Cloud Couples : Stop, Find)
                                                 Droplet
                                                Cloud                 Orchestrates
                   Health Manager    start/stop          Controller (Start,        Droplet Execution
                                     requests

          • Easy to add new components. eg Stager, UAA, ACM…;                        Agent (DEA)



          • Easy to evolve each component. eg. CC_ng, Router v2…
                  Periodically scans            Persists droplets
                           for consistency                     and provisioned                                   Guest applications
                                                                                     Advertise
                                                                  services                                          consume
                                                  Cloud                               Service
                                                 Controller
                                                                         Provision and
                                                 Database
                                                                          unprovision




                                                                             Service "A"
                                                                                                  Provision          Service
                                                                                                     and               "A"
                                                                          Provisioning Agent
                                                                                                 unprovision




© Copyright 2012 EMC Corporation. All rights reserved.                                                                                21
Elastic Architecture in CloudFoundry
                                        Sends droplet                                                                 A request comes…
                                       heart beats and
                                        exit messages


                                                                                               Router
                                                                                                Router

                                                                Registers and                                                Registers and
                                                                 unregisters                                                  unregisters




                                                                                                                  Routes droplet
                                                                        Routes REST API
                                                                                                                    requests
                                                                            requests
                                               Droplet change
                                                notifications

                                                  Droplet
                                                                 Cloud Controller             Orchestrates
                           Health Manager        start/stop        Cloud Controller         (Start, Stop, Find)           Droplet Execution
                                                 requests
                                                                                                                            Agent (DEA)



                          Periodically scans                     Persists droplets
                           for consistency                       and provisioned                                        Guest applications
                                                                                           Advertise
                                                                     services                                              consume
                                                   Cloud                                    Service
                                                  Controller
                                                                            Provision and
                                                  Database
                                                                             unprovision




                                                                                   Service "A"
                                                                                                         Provision          Service
                                                                                                            and               "A"
                                                                                Provisioning Agent
                                                                                                        unprovision




© Copyright 2012 EMC Corporation. All rights reserved.                                                                                        22
Pluggable Runtime Support
 Refers to https://github.com/cloudfoundry/vcap-staging

   • stager -> vcap-staging                                               klass = StagingPlugin.load_plugin_for(plugin_name)
                                                                          plugin = klass.from_file(config_path)
                                                                          plugin.stage_application



                                                                                                                   App
                  Stager                                 StagingPlugin                   Start    Stop
                                                                                         Script   Script        Server


                        PHP                    Rails3          Java_Web          Play             …


                    extends StagingPlugin




© Copyright 2012 EMC Corporation. All rights reserved.                                                                         23
Pluggable Runtime Support (Cont.)
 So what we need to do is…
   • Extends Class StagingPlugin in
     Common.rb



                                                         Line3 ~ Line 62, 59 lines of
                                                         codes to support PHP. 




© Copyright 2012 EMC Corporation. All rights reserved.                                  24
Pluggable Runtime Support (Cont.)
 Key methods to rewrite:
   • stage_application
   • start_command
   • startup_script
   • stop_command
   • stop_script




© Copyright 2012 EMC Corporation. All rights reserved.   25
Pluggable Services Support
 Refers to a nice presentation by Nicholas Kushmerick
 Cloud Foundry Services in last forum:
      • Service advertisement
              • Service Gateway -> Cloud Controller
                       • POST /services/v1/offerings

                       • DELETE /services/v1/offerings/:label
      • Instance management
              • Cloud Controller -> Service Gateway
                       • Provision:            POST /gateway/v1/configurations

                       • Bind:                   POST /gateway/v1/configurations/:id/handles

                       • Unbind:                DELETE /gateway/v1/configurations/:id/handles/:handle

                       • Unprovision: DELETE /gateway/v1/configurations/:id



© Copyright 2012 EMC Corporation. All rights reserved.                                                  26
But …
 • Modular Design
 • Version Tolerance
 • Flexible Runtime/Service
 • Elastic Architecture

         Trade Off                                • Many kinds of nodes
                                                  • Many nodes each kind
                                        Complex deployment process like other
                                                 distribution system

© Copyright 2012 EMC Corporation. All rights reserved.                          27
Practical problem at CloudFoundry.com
    40+ unique node types
    75+ unique software packages
    500-5,000 VMs
    2x/week cf.com updates
    24*7*365 non-stop operation
    No-downtime deployments
    Reliable ,robust ,repeatable
    deployments ,updates , capacity
    adjustments
    Small teams manage many
    instances



© Copyright 2012 EMC Corporation. All rights reserved.   28
How to deploy CloudFoundry?




© Copyright 2012 EMC Corporation. All rights reserved.   29
CloudFoundry BOSH
    CloudFoundry BOSH is an open source tool-chain for release
    engineering, deployment, and lifecycle management of large scale distributed
    services
      – Prescriptive way of creating releases and managing systems and services
      – It is not a collection of shell scripts, not a pile of Perl
    Built to deploy and manage production-class, large scale clusters
      – Production grade Cloud Foundry clusters: 500+ VMs, 40+ jobs, 75+ packages
      – Multi-node, multi-tier, complex clusters
    Built for DevOps usage and scale by a crack team of veterans
      – A project, not a product: command line interface, YAML, etc.
      – Continuous improvement, iterative development, rough edges



            https://github.com/cloudfoundry/bosh

© Copyright 2012 EMC Corporation. All rights reserved.                             30
CloudFoundry BOSH (Cont.)
    Built from the need to operate cloudfoundry.com
        – Over 40 different types of VMs
        – Hundreds of running instances of VMs
        – Pushing at least 2 changes per week
    End-to-end management
        – Release engineering
        – Deployment
        – Lifecycle management
    Generic solution
        – Any service
        – Any cloud
        – Any operating system




© Copyright 2012 EMC Corporation. All rights reserved.   31
BOSH Architecture
1. Upload Stemcell
         1.        CLI      -> Director
         2.        Director -> Blobstore
2. Upload Release
         1.        CLI      -> Director
         2.        Director -> Blobstore
3. Deploy
         1.        CLI      -> Director
         2.        Director -> A
         3.        Agent -> B
         4.        Agent -> C




© Copyright 2012 EMC Corporation. All rights reserved.   32
BOSH Concepts
    Stemcell
        – VM template
        – BOSH Agent
        – IaaS Plugin

    Release
        – Jobs

    Job
        – Packages
        – Templates (scripts, confs)
        – Monitoring

    Package
        – Source/blobs
        – Dependencies
        – Packaging (scripts)




© Copyright 2012 EMC Corporation. All rights reserved.   33
IaaS Neutral


     vSphere: battle tested implement                                                     AWS: code complete


                                                         Cloud Foundry BOSH


                                                Cloud Provider Interface(CPI)




                                                          OpenStack: testable release   https://github.com/piston/
                                                                                        openstack-bosh-cpi



© Copyright 2012 EMC Corporation. All rights reserved.                                                               34
Cloud Provider Interface
    Stemcell
        – create_stemcell (image, cloud_properties)
        – delete_stemcell (stemcell)
    VM
        –    create_vm (agent_id, stemcell, resource_pool, networks, disk_locality, env)
        –    delete_vm (vm)
        –    reboot_vm (vm)
        –    configure_networks (vm, networks)
    Disk
        –    create_disk (size, vm_locality)
        –    delete_disk (disk)
        –    attach_disk (vm, disk)
        –    detach_disk (vm, disk)



© Copyright 2012 EMC Corporation. All rights reserved.                                     35
Cloud Provider Interface (Cont.)
For OpenStack
    Stemcell
        – create_stemcell
                                                                                    …
        – delete_stemcell
                                                         Cloud Provider Interface
    VM
        –    create_vm
        –    delete_vm
        –    reboot_vm                                   OpenStack                  VM
                                                                                    VM
                                                         Image Service               VM
        –    configure_networks                                                        VM
                                                                                        VM
    Disk
        –    create_disk                                 OpenStack
        –    delete_disk                                 Compute
        –    attach_disk
        –    detach_disk


© Copyright 2012 EMC Corporation. All rights reserved.                                       36
Deploy PaaS with BOSH
                                                                       Sends droplet
                                                                      heart beats and
                                                                       exit messages


                                                                                                                              Router
                                                                                                                               Router

                                                                                               Registers and                                                Registers and
                                                                                                unregisters                                                  unregisters




            CLI                                                                                        Routes REST API
                                                                                                                                                 Routes droplet
                                                                                                                                                   requests
                                                                                                           requests
                                                                              Droplet change
                                                                               notifications

                                                                                 Droplet
                                                                                                Cloud Controller             Orchestrates
                                                         Health Manager         start/stop        Cloud Controller         (Start, Stop, Find)           Droplet Execution
                                                                                requests
                                                                                                                                                           Agent (DEA)



                                                         Periodically scans                     Persists droplets
                                                          for consistency                       and provisioned                                        Guest applications
                                                                                                                          Advertise
                                                                                                    services                                              consume
                                                                                  Cloud                                    Service
                                                                                 Controller
                                                                                                           Provision and
                                                                                 Database
                                                                                                            unprovision




                                                                                                                  Service "A"
                                                                                                                                        Provision          Service
                                                                                                                                           and               "A"
                                                                                                               Provisioning Agent
                                                                                                                                       unprovision



          BOSH

                                                                                                               IaaS




© Copyright 2012 EMC Corporation. All rights reserved.                                                                                                                       37
Deployments
    Release
    Network
    Resource pools
    Jobs
    Properties
    Update concurrency
    Compilation workers
    Cloud properties

© Copyright 2012 EMC Corporation. All rights reserved.   38
Deployments for CloudFoundy
Cloudfoundry.yml
name: cloudfoundry

release:
    name: cloudfoundry
    version: 89.1-dev

compilation:
    workers: 4
    network: default
    cloud_properties:
      ram: 1024
      disk: 2048
      cpu: 2

update:
    canaries: 1
    canary_watch_time: 3000-90000
    update_watch_time: 3000-90000
    max_in_flight: 2
    max_errors: 1




© Copyright 2012 EMC Corporation. All rights reserved.   39
Deployments for CloudFoundy (Cont.)
Cloudfoundry.yml
networks:
  - name: default
    subnets:
    - static:
      - 192.168.2.50 - 192.168.2.89
      range: 192.168.2.0/24
      gateway: 192.168.2.1
      dns:
      - 10.254.174.10
      cloud_properties:
        name: PrivateNetwork
- name: lb
    subnets:
    - static:
      - 192.168.2.90 - 192.168.2.99
      range: 192.168.2.0/24
      gateway: 192.168.2.1
      dns:
      - 10.254.174.10
      cloud_properties:
        name: PrivateNetwork



© Copyright 2012 EMC Corporation. All rights reserved.   40
Deployments for CloudFoundy (Cont.)
Cloudfoundry.yml
resource_pools:

   - name: infrastructure
     network: default
     size: 29
     stemcell:
       name: bosh-stemcell
       version: 0.6.2
     cloud_properties:
       ram: 256
       disk: 2048
       cpu: 1
     env:
       bosh:
          password:




© Copyright 2012 EMC Corporation. All rights reserved.   41
Deployments for CloudFoundy (Cont.)
Cloudfoundry.yml
jobs:

   - name: cloud_controller
     template: cloud_controller
     instances: 1
     resource_pool: infrastructure
     networks:
     - name: default
       static_ips:
       - 192.168.2.60

   - name: nats
     template: nats
     instances: 1
     resource_pool: infrastructure
     networks:
     - name: default
       static_ips:
       - 192.168.2.52




© Copyright 2012 EMC Corporation. All rights reserved.   42
Deployments(CloudFoundy)
Cloudfoundry.yml

        properties:
            domain: cflocal.com

                env: {}

                networks:
                  apps: default
                  management: default

                nats:
                  user: nats
                  password: aaa3ij3122
                  address: 192.168.2.52
                  port: 4222




© Copyright 2012 EMC Corporation. All rights reserved.   43
Use Case
                                                               bosh deployment
                            bosh target cf
                                                                    cf.yml




                Bug report to Dev                                  git pull




                                                         Run                     bosh upload release




                            Done!                                 bosh deploy




© Copyright 2012 EMC Corporation. All rights reserved.                                                 44
Acknowledgments



        VMware China R&D Center                          Network & Information Center,
                                                           Shanghai Jiao Tong Univ.




            CloudFoundry Community                              Piston Community
           http://www.cloudfoundry.org                   https://github.com/piston/open
                                                                  stack-bosh-cpi




© Copyright 2012 EMC Corporation. All rights reserved.                                    45
Q&A


© Copyright 2012 EMC Corporation. All rights reserved.         46
Backup Slides




© Copyright 2012 EMC Corporation. All rights reserved.   47
Management Path– vmc info

                                                                                 db
                                                         cloud controller




                                                               nats         health manager
                   router



                                                                      dea



                  service                                app   app



© Copyright 2012 EMC Corporation. All rights reserved.                                       48
Deployment Path– vmc push

                                                                                 db
                                                         cloud controller




                                                               nats         health manager
                   router



                                                                      dea



                  service                                app   app



© Copyright 2012 EMC Corporation. All rights reserved.                                       49
Data Path– Client Request

                                                                                 db
                                                         cloud controller




                                                               nats         health manager
                   router



                                                                      dea



                  service                                app   app



© Copyright 2012 EMC Corporation. All rights reserved.                                       50
Evolving Cloud Foundry - Kernel
                     uaa                   stager

                                                                                    db
                                            Package      cloud controller
                                             cache                     v2
                                                                        v2




                                                                  nats         health manager
                                                                         v2                v2
                                                                                            v2
                   router                                                v2
                                       v2


                                                               warden    dea


                                                                                    caldecott
                  service                                app      app



© Copyright 2012 EMC Corporation. All rights reserved.                                           51
How to write a custom service?
   • Public API for advertising services
     and managing service instances                            Cloud
   • Endpoints:                                               Controll
       – Cloud Controller                                        er
       – Service Gateway
         (one per service)
   • REST / JSON / HTTP(S)
                                                         MySQL
                                                         Gatewa MongoD
                                                            y      B
                                                                Gatewa
                                                                   y



© Copyright 2012 EMC Corporation. All rights reserved.                   52
How to write a custom service? (Cont.)
   Step 1: Service advertisement

   Service Gateway -> Cloud Controller, two methods:
    POST /services/v1/offerings
    DELETE /services/v1/offerings/:label
                    :label => 'mysql-5.1'
                    :url => 'http://12.34.56.78:4321',
                    :plans => ['free', 'bronze', 'silver', 'gold']
                    :tags => ['mysql', 'mysql-5.1', 'database']
                    :active => true,
                    :description => 'MySQL database service'
                    :acls => {
                      :wildcards => '*@vmware.com',
                      :plans => {
                        :bronze => {
                          :users => ['joe@vmware.com', 'jane@vmware.com']
                        }
                      }
                    }




© Copyright 2012 EMC Corporation. All rights reserved.                      53
How to write a custom service? (Cont.)
   Step 2: Instance management

   Cloud Controller -> Service Gateway, four methods:

    Provision:       POST /gateway/v1/configs
    Bind:              POST /gateway/v1/configs/:id/handles
    Unbind:       DELETE
   /gateway/v1/configs/:id/handles/:handle
    Unprovision: DELETE /gateway/v1/configs/:id




© Copyright 2012 EMC Corporation. All rights reserved.         54
Reference implementation
                    Develope                                   A
                                                            vmc create-service postgresql
                    r
                                                                vmc, STS
                                                               B
                                             POST /services/v1/configurations


                                                                                     Cloud Controller
                                                           C         G         H
                                                      {host: 12.34.56.78, port: 3456,
                                            POST /gateway/v1/configurations
                                                                       VCAP_SERVICES = [postgres:
                                                       db: abc123, user: pqr456}
                                                                        {host: 12.34.56.78, port: 3456,
                                                                         db: abc123, user: pqr456}]
                                                         Service Gateway
                                              F
                                              D
      Private API
                {host:                12.34.56.78, port: 3456,                              App
                                       NATS: provision                        SELECT *
                                db: abc123, user: pqr456}
              E                                                               FROM FOO

           CREATE DATABASE abc123
           CREATE ROLE pqr456
                                                                                    I    GET /foo/bar
                                                           Service Node
                                                         (eg, PostgreSQL)
              Service
         (eg, PostgreSQL)                     host 12.34.56.78
                                                                                                        End
                                                                                                        Users


© Copyright 2012 EMC Corporation. All rights reserved.                                                          55
For legacy service – Service Broker
   • Cloud Foundry users may already have existing services
        • Legacy database that hasn’t / won’t / can’t be moved
        CloudFoundry.com
        • Services not yet supported
   • Service Broker exposes an arbitrary legacy service instance to Cloud
   Foundry so that it can be used just like any other instance




© Copyright 2012 EMC Corporation. All rights reserved.                      56
For legacy service – Service Broker
(Cont.)                      B
                          D                                          register hrdb {host: 87.65.43.21,
                                                                      port: 6543, db: def123, user: stu456}
                   vmc create-service hrdb

                           vmc, STS                          Cloud Controller               Service Broker
                                                                                             Admin Tools
                      E                                  H
POST /services/v1/configurations VCAP_SERVICES = [hrdb:
                                         POST /gateway/v1/configurations     G
                                  {host: 87.65.43.21, port:6543,
                                   db: def123, user: stu456}] port: 6543,
                                           {host: 87.65.43.21,
                                                                                                   C
                                                                         F
                                                          POST /broker/v1/configuration
                                            db: def123, user: stu456}

            Service Gateway                                        App                              Connecti
                                                                                                       on
                                                                                                     Details
                                                                                     Service Broker
                                                                                                                  A
              Core Service
                                                                                                  CREATE DATABASE def123
            (eg, PostgreSQL)                                                                      CREATE USER stu456
                                                                                 SELECT *
                                                                                 FROM FOO     Brokered Service
          host 12.34.56.78
                                                                                               (eg, Oracle DB)
                                                               GET /foo/bar      I




© Copyright 2012 EMC Corporation. All rights reserved.                                                                     57
CloudFoundry Elastic Architecture on OpenStack

Mais conteúdo relacionado

Mais procurados

IBM Softlayer Bluemix Marketplace
IBM Softlayer Bluemix MarketplaceIBM Softlayer Bluemix Marketplace
IBM Softlayer Bluemix MarketplaceSimon Baker
 
EMC's IT's Cloud Transformation, Thomas Becker, EMC
EMC's IT's Cloud Transformation, Thomas Becker, EMCEMC's IT's Cloud Transformation, Thomas Becker, EMC
EMC's IT's Cloud Transformation, Thomas Becker, EMCCloudOps Summit
 
Oracle Public Cloud: Oracle Java Cloud Service, by Nino Guarnacci
Oracle Public Cloud: Oracle Java Cloud Service, by Nino GuarnacciOracle Public Cloud: Oracle Java Cloud Service, by Nino Guarnacci
Oracle Public Cloud: Oracle Java Cloud Service, by Nino GuarnacciCodemotion
 
The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)Florian Georg
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Oracle cloud strategy
Oracle cloud strategyOracle cloud strategy
Oracle cloud strategyAgora Group
 
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...Club Cloud des Partenaires
 
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Christophe Lucas
 
IBM Multicloud Management on the OpenShift Container Platform
IBM Multicloud Management on theOpenShift Container PlatformIBM Multicloud Management on theOpenShift Container Platform
IBM Multicloud Management on the OpenShift Container PlatformMichael Elder
 
IBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorIBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorAnna Landolfi
 
Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)rachgregs
 
IBM Private Cloud Solutions with IBM i
IBM Private Cloud Solutions with IBM iIBM Private Cloud Solutions with IBM i
IBM Private Cloud Solutions with IBM iLuca Comparini
 
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...PT Datacomm Diangraha
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixIBM
 
Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleCloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Oracle Cloud Reference Architecture
Oracle Cloud Reference ArchitectureOracle Cloud Reference Architecture
Oracle Cloud Reference ArchitectureBob Rhubart
 
Cloud Orchestrator - IBM Software Defined Environment Event
Cloud Orchestrator - IBM Software Defined Environment EventCloud Orchestrator - IBM Software Defined Environment Event
Cloud Orchestrator - IBM Software Defined Environment EventDenny Muktar
 
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...Eduardo Patrocinio
 

Mais procurados (20)

IBM Softlayer Bluemix Marketplace
IBM Softlayer Bluemix MarketplaceIBM Softlayer Bluemix Marketplace
IBM Softlayer Bluemix Marketplace
 
EMC's IT's Cloud Transformation, Thomas Becker, EMC
EMC's IT's Cloud Transformation, Thomas Becker, EMCEMC's IT's Cloud Transformation, Thomas Becker, EMC
EMC's IT's Cloud Transformation, Thomas Becker, EMC
 
Oracle Public Cloud: Oracle Java Cloud Service, by Nino Guarnacci
Oracle Public Cloud: Oracle Java Cloud Service, by Nino GuarnacciOracle Public Cloud: Oracle Java Cloud Service, by Nino Guarnacci
Oracle Public Cloud: Oracle Java Cloud Service, by Nino Guarnacci
 
The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)The IBM Open Cloud Architecture (and Platform)
The IBM Open Cloud Architecture (and Platform)
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Oracle cloud strategy
Oracle cloud strategyOracle cloud strategy
Oracle cloud strategy
 
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...
2012.05.11 - Cloud Builders - RV des Experts - Forum du Club Cloud des Parten...
 
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
 
IBM Multicloud Management on the OpenShift Container Platform
IBM Multicloud Management on theOpenShift Container PlatformIBM Multicloud Management on theOpenShift Container Platform
IBM Multicloud Management on the OpenShift Container Platform
 
IBM SmartCloud Orchestrator
IBM SmartCloud OrchestratorIBM SmartCloud Orchestrator
IBM SmartCloud Orchestrator
 
Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)Oracle Cloud Computing Strategy (EMO)
Oracle Cloud Computing Strategy (EMO)
 
IBM Private Cloud Solutions with IBM i
IBM Private Cloud Solutions with IBM iIBM Private Cloud Solutions with IBM i
IBM Private Cloud Solutions with IBM i
 
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...
Creating Microservices Application with IBM Cloud Private (ICP) - ICP Archite...
 
IBM Bluemix
IBM BluemixIBM Bluemix
IBM Bluemix
 
cloud computing
cloud computing cloud computing
cloud computing
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleCloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Oracle Cloud Reference Architecture
Oracle Cloud Reference ArchitectureOracle Cloud Reference Architecture
Oracle Cloud Reference Architecture
 
Cloud Orchestrator - IBM Software Defined Environment Event
Cloud Orchestrator - IBM Software Defined Environment EventCloud Orchestrator - IBM Software Defined Environment Event
Cloud Orchestrator - IBM Software Defined Environment Event
 
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
 

Semelhante a CloudFoundry Elastic Architecture on OpenStack

WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012Arun Gupta
 
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012Eric D. Boyd
 
Transform Microsoft Application Environment With EMC Information Infrastructure
Transform Microsoft Application Environment With EMC Information InfrastructureTransform Microsoft Application Environment With EMC Information Infrastructure
Transform Microsoft Application Environment With EMC Information InfrastructureEMC Forum India
 
Cloud Computing and VCE
Cloud Computing and VCECloud Computing and VCE
Cloud Computing and VCECenk Ersoy
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleBob Rhubart
 
Research ON Big Data
Research ON Big DataResearch ON Big Data
Research ON Big Datamysqlops
 
Research on big data
Research on big dataResearch on big data
Research on big dataRoby Chen
 
Cloud Architectures for Alpha Dogs!
Cloud Architectures for Alpha Dogs!Cloud Architectures for Alpha Dogs!
Cloud Architectures for Alpha Dogs!Vikas Gupta
 
Tech editors conf tucker yen-jacoby revised final for may 24 2012
Tech editors conf tucker yen-jacoby revised final  for may 24 2012Tech editors conf tucker yen-jacoby revised final  for may 24 2012
Tech editors conf tucker yen-jacoby revised final for may 24 2012Cisco Public Relations
 
Solving the IO Bottleneck
Solving the IO BottleneckSolving the IO Bottleneck
Solving the IO BottleneckIMEX Research
 
Solving io bottleneck
Solving io bottleneckSolving io bottleneck
Solving io bottleneckAnil Vasudeva
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...Eucalyptus Systems, Inc.
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...Eucalyptus Systems, Inc.
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...Eucalyptus Systems, Inc.
 
OSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesOSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesMatt Ray
 
Hanu cloud computing expertise
Hanu cloud computing expertiseHanu cloud computing expertise
Hanu cloud computing expertiseHanu Software
 
Distributed Block-level Storage Management for OpenStack, by Danile lee
Distributed Block-level Storage Management for OpenStack, by Danile leeDistributed Block-level Storage Management for OpenStack, by Danile lee
Distributed Block-level Storage Management for OpenStack, by Danile leeHui Cheng
 
Danile lee -open stackblocklevelstorage
Danile lee -open stackblocklevelstorageDanile lee -open stackblocklevelstorage
Danile lee -open stackblocklevelstorageOpenCity Community
 
Community Clouds - Shared Infrastructure as a Service
Community Clouds - Shared Infrastructure as a ServiceCommunity Clouds - Shared Infrastructure as a Service
Community Clouds - Shared Infrastructure as a ServiceHarold Teunissen
 

Semelhante a CloudFoundry Elastic Architecture on OpenStack (20)

WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
WebLogic 12c Developer Deep Dive at Oracle Develop India 2012
 
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012
Moving Web Apps to the Cloud - Iowa User Group Tour, Feb 2012
 
102 1630 1700
102 1630 1700102 1630 1700
102 1630 1700
 
Transform Microsoft Application Environment With EMC Information Infrastructure
Transform Microsoft Application Environment With EMC Information InfrastructureTransform Microsoft Application Environment With EMC Information Infrastructure
Transform Microsoft Application Environment With EMC Information Infrastructure
 
Cloud Computing and VCE
Cloud Computing and VCECloud Computing and VCE
Cloud Computing and VCE
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT Simple
 
Research ON Big Data
Research ON Big DataResearch ON Big Data
Research ON Big Data
 
Research on big data
Research on big dataResearch on big data
Research on big data
 
Cloud Architectures for Alpha Dogs!
Cloud Architectures for Alpha Dogs!Cloud Architectures for Alpha Dogs!
Cloud Architectures for Alpha Dogs!
 
Tech editors conf tucker yen-jacoby revised final for may 24 2012
Tech editors conf tucker yen-jacoby revised final  for may 24 2012Tech editors conf tucker yen-jacoby revised final  for may 24 2012
Tech editors conf tucker yen-jacoby revised final for may 24 2012
 
Solving the IO Bottleneck
Solving the IO BottleneckSolving the IO Bottleneck
Solving the IO Bottleneck
 
Solving io bottleneck
Solving io bottleneckSolving io bottleneck
Solving io bottleneck
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
 
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
How to Transform Enterprise Applications to On-premise Clouds with Wipro and ...
 
OSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesOSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best Practices
 
Hanu cloud computing expertise
Hanu cloud computing expertiseHanu cloud computing expertise
Hanu cloud computing expertise
 
Distributed Block-level Storage Management for OpenStack, by Danile lee
Distributed Block-level Storage Management for OpenStack, by Danile leeDistributed Block-level Storage Management for OpenStack, by Danile lee
Distributed Block-level Storage Management for OpenStack, by Danile lee
 
Danile lee -open stackblocklevelstorage
Danile lee -open stackblocklevelstorageDanile lee -open stackblocklevelstorage
Danile lee -open stackblocklevelstorage
 
Community Clouds - Shared Infrastructure as a Service
Community Clouds - Shared Infrastructure as a ServiceCommunity Clouds - Shared Infrastructure as a Service
Community Clouds - Shared Infrastructure as a Service
 

Mais de OpenCity Community

Mais de OpenCity Community (20)

开源讲义.pdf
开源讲义.pdf开源讲义.pdf
开源讲义.pdf
 
物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf
 
2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf
 
社会化研发
社会化研发社会化研发
社会化研发
 
Containers & CaaS
Containers & CaaSContainers & CaaS
Containers & CaaS
 
OaaS:Open as a Strategy
OaaS:Open as a StrategyOaaS:Open as a Strategy
OaaS:Open as a Strategy
 
Hello openstack 2014
Hello openstack 2014Hello openstack 2014
Hello openstack 2014
 
Docker openstack-2014
Docker openstack-2014Docker openstack-2014
Docker openstack-2014
 
Learn OpenStack from trystack.cn
Learn OpenStack from trystack.cnLearn OpenStack from trystack.cn
Learn OpenStack from trystack.cn
 
OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508
 
OpenStack ecosystem
OpenStack ecosystemOpenStack ecosystem
OpenStack ecosystem
 
How to master OpenStack in 2 hours
How to master OpenStack in 2 hoursHow to master OpenStack in 2 hours
How to master OpenStack in 2 hours
 
Learn OpenStack from trystack.cn ——Folsom in practice
Learn OpenStack from trystack.cn  ——Folsom in practiceLearn OpenStack from trystack.cn  ——Folsom in practice
Learn OpenStack from trystack.cn ——Folsom in practice
 
Quantum Networks
Quantum NetworksQuantum Networks
Quantum Networks
 
云计算思考
云计算思考云计算思考
云计算思考
 
Openstorage Openstack
Openstorage OpenstackOpenstorage Openstack
Openstorage Openstack
 
Openstack的研究与实践
Openstack的研究与实践Openstack的研究与实践
Openstack的研究与实践
 
Open Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex YangOpen Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex Yang
 
Nova与虚拟机管理
Nova与虚拟机管理Nova与虚拟机管理
Nova与虚拟机管理
 
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

CloudFoundry Elastic Architecture on OpenStack

  • 1. CloudFoundry: Elastic Architecture Design and Deploy Based on OpenStack 郭峰 (Golfen Guo) @教授也是浮云 golfen.guo@emc.com Cloud Platform and Application Lab, EMC Labs China © Copyright 2012 EMC Corporation. All rights reserved. 1
  • 2. EMC Labs China Advanced Technology Research and Development University Collaboration Vision Big Data Lab Become an elite research and advanced technology institute Industry Cloud Infrastructure in China Standards Office and System Lab - Become the model for future EMC Labs Cloud Platform and worldwide Applications Lab IP Portfolio Development © Copyright 2012 EMC Corporation. All rights reserved. 2
  • 3. Agenda • What is PaaS • CloudFoundry Overview • Elastic Architecture in CloudFoundry • Introduce to BOSH • CPI and OpenStack • Deploy PaaS with BOSH © Copyright 2012 EMC Corporation. All rights reserved. 3
  • 4. What is PaaS? (from Search Cloud Computing) • Platform as a Service (PaaS) is a way to rent hardware, operating systems, storage and network capacity over the Internet. • The service delivery model allows the customer to rent virtualized servers and associated services for running existing applications or developing and testing new ones. RENT, not BUILD one! Virtual Server and Associated Service © Copyright 2012 EMC Corporation. All rights reserved. 4
  • 5. How PaaS Benefit Us? Before: Now: © Copyright 2012 EMC Corporation. All rights reserved. 5
  • 6. How PaaS Benefit Us? (Cont.) From Accelerating your Journey to Application Transformation, EMC World 2012 PaaS powered You Manage Traditional IT IaaS PaaS You Manage Applications Applications Applications Agility and Data Data Data Cost Savings Managed by Platform Managed by Platform Runtime You Manage Runtime Runtime Middleware Middleware Middleware O/S O/S O/S Virtualization Virtualization Virtualization Servers Servers Servers Storage Storage Storage Networking Networking Networking © Copyright 2012 EMC Corporation. All rights reserved. 6
  • 7. Cloud Foundry – The Open PaaS © Copyright 2012 EMC Corporation. All rights reserved. 7
  • 8. PaaS in Action… Another analogy from Mark Lucovsky, Every one knows, “Hello World”: $ cat hw.c #include <stdio.h> main() { printf(“Hello Worldn”); } $ cc hw.c; ./a.out © Copyright 2012 EMC Corporation. All rights reserved. 8
  • 9. PaaS in Action... (Cont. ) “Hello World” in the Cloud: $ cat hw.rb require 'rubygems' require 'sinatra' $hits = 0 get '/' do $hits = $hits + 1 "Hello World - #{$hits}" end $ vmc push hw © Copyright 2012 EMC Corporation. All rights reserved. 9
  • 10. Scale App On Demand Implement a Scalability “Hello World” in Cloud: Step 1: Scale instance to 10: $ vmc instances hw 10 Step 2: Change the codes: get '/' do $hits = $redis.incr(‘hits’) "Hello World - #{$hits}" Redis end Step 3: bind Redis service to App: $ vmc create-service redis –bind hw © Copyright 2012 EMC Corporation. All rights reserved. 10
  • 11. Scale App On Demand(Cont.) From Cloud Foundry Launch Event, April, 2011 PaaS powered © Copyright 2012 EMC Corporation. All rights reserved. 11
  • 12. Simplify Deployment [mysqld] user = foobar port = 3306 Before: basedir = /usr bind-address = 172.58.77.101 key_buffer = 16M thread_stack = 128K thread_cache_size = 8 … [nginx] http.include mime.types; default_type: application/octet-stream; Web App log_format: main ‘$remote_addr - $remote_user []…’ keepalive_timeout 65; [tomcat] <Connector redirectPort=‚8443‛ emptySessionPath…/> <bean id=‚sessionFactory‛ class=‚org.springframework…/> [frontend] dependencies: - mysqlclient - ruby files: - core/app/fe/**/* - core/common/**/* [blah] - blah blah blah © Copyright 2012 EMC Corporation. All rights reserved. 12
  • 13. Simplify Deployment (Cont.) Now: # to target and login to cloud foundry vmc target http://api.cloudfoundry.com vmc login Web App # to create and boot the app for the first time vmc push myapp –instances 2 –mem 64M –path ../code # to create the database and bind it to the app vmc create-service mysql –name mydb –bind myapp # update live app with new code vmc update myapp –path ../code © Copyright 2012 EMC Corporation. All rights reserved. 13
  • 14. First Touch CloudFoundry prompt> gem install vmc prompt> vmc target api.cloudfoundry.com prompt> vmc login prompt> vmc push Would you like to deploy from the current directory? [Yn] Yes Application Name: hello Application Deployed URL: 'hello.cloudfoundry.com'? hello-bob.cloudfoundry.com Detected a Sinatra Application, is this correct? [Yn] Yes Memory Reservation [Default:128M] (64M, 128M, 256M, 512M or 1G) (Press Enter to take default) Would you like to bind any services to 'hello'? [yN]: No Uploading Application: Checking for available resources: OK Packing application: OK Uploading (0K): OK Push Status: OK Staging Application: OK Starting Application: OK © Copyright 2012 EMC Corporation. All rights reserved. 14
  • 15. First Touch CloudFoundry(Cont.) Upload your app Memory of each instance Change served instances Your apps deployed Start, stop, update, restart Services of current app Your all created services Information of app © Copyright 2012 EMC Corporation. All rights reserved. 15
  • 16. PaaS Architecture Pattern MySQL RabbitMQ MongoDB Redis © Copyright 2012 EMC Corporation. All rights reserved. 16
  • 17. PaaS Architecture Pattern (Cont. ) © Copyright 2012 EMC Corporation. All rights reserved. 17
  • 18. PaaS Architecture Pattern (Cont. ) © Copyright 2012 EMC Corporation. All rights reserved. 18
  • 19. Conclusion Abstract to three layers: • Routers for finding right endpoint of Apps • Runtime for Apps • Services provided by platform, consumed by Apps © Copyright 2012 EMC Corporation. All rights reserved. 19
  • 20. The Keys of Design… • Elastic • Failover/System Robust • Resource Recycling © Copyright 2012 EMC Corporation. All rights reserved. 20
  • 21. Elastic Architecture in CloudFoundry Sends droplet Design principals: heart beats and exit messages 1. Each components can be run standalone; Router 2. Each components can be scale-out, and notify the peersand with Router Registers message; Registers and unregisters unregisters 3. The components communicate only with message or RESTful API. Routes droplet Routes REST API requests requests Droplet change notifications Self-government and LooseController Cloud Couples : Stop, Find) Droplet Cloud Orchestrates Health Manager start/stop Controller (Start, Droplet Execution requests • Easy to add new components. eg Stager, UAA, ACM…; Agent (DEA) • Easy to evolve each component. eg. CC_ng, Router v2… Periodically scans Persists droplets for consistency and provisioned Guest applications Advertise services consume Cloud Service Controller Provision and Database unprovision Service "A" Provision Service and "A" Provisioning Agent unprovision © Copyright 2012 EMC Corporation. All rights reserved. 21
  • 22. Elastic Architecture in CloudFoundry Sends droplet A request comes… heart beats and exit messages Router Router Registers and Registers and unregisters unregisters Routes droplet Routes REST API requests requests Droplet change notifications Droplet Cloud Controller Orchestrates Health Manager start/stop Cloud Controller (Start, Stop, Find) Droplet Execution requests Agent (DEA) Periodically scans Persists droplets for consistency and provisioned Guest applications Advertise services consume Cloud Service Controller Provision and Database unprovision Service "A" Provision Service and "A" Provisioning Agent unprovision © Copyright 2012 EMC Corporation. All rights reserved. 22
  • 23. Pluggable Runtime Support Refers to https://github.com/cloudfoundry/vcap-staging • stager -> vcap-staging klass = StagingPlugin.load_plugin_for(plugin_name) plugin = klass.from_file(config_path) plugin.stage_application App Stager StagingPlugin Start Stop Script Script Server PHP Rails3 Java_Web Play … extends StagingPlugin © Copyright 2012 EMC Corporation. All rights reserved. 23
  • 24. Pluggable Runtime Support (Cont.) So what we need to do is… • Extends Class StagingPlugin in Common.rb Line3 ~ Line 62, 59 lines of codes to support PHP.  © Copyright 2012 EMC Corporation. All rights reserved. 24
  • 25. Pluggable Runtime Support (Cont.) Key methods to rewrite: • stage_application • start_command • startup_script • stop_command • stop_script © Copyright 2012 EMC Corporation. All rights reserved. 25
  • 26. Pluggable Services Support Refers to a nice presentation by Nicholas Kushmerick Cloud Foundry Services in last forum: • Service advertisement • Service Gateway -> Cloud Controller • POST /services/v1/offerings • DELETE /services/v1/offerings/:label • Instance management • Cloud Controller -> Service Gateway • Provision: POST /gateway/v1/configurations • Bind: POST /gateway/v1/configurations/:id/handles • Unbind: DELETE /gateway/v1/configurations/:id/handles/:handle • Unprovision: DELETE /gateway/v1/configurations/:id © Copyright 2012 EMC Corporation. All rights reserved. 26
  • 27. But … • Modular Design • Version Tolerance • Flexible Runtime/Service • Elastic Architecture Trade Off • Many kinds of nodes • Many nodes each kind Complex deployment process like other distribution system © Copyright 2012 EMC Corporation. All rights reserved. 27
  • 28. Practical problem at CloudFoundry.com 40+ unique node types 75+ unique software packages 500-5,000 VMs 2x/week cf.com updates 24*7*365 non-stop operation No-downtime deployments Reliable ,robust ,repeatable deployments ,updates , capacity adjustments Small teams manage many instances © Copyright 2012 EMC Corporation. All rights reserved. 28
  • 29. How to deploy CloudFoundry? © Copyright 2012 EMC Corporation. All rights reserved. 29
  • 30. CloudFoundry BOSH CloudFoundry BOSH is an open source tool-chain for release engineering, deployment, and lifecycle management of large scale distributed services – Prescriptive way of creating releases and managing systems and services – It is not a collection of shell scripts, not a pile of Perl Built to deploy and manage production-class, large scale clusters – Production grade Cloud Foundry clusters: 500+ VMs, 40+ jobs, 75+ packages – Multi-node, multi-tier, complex clusters Built for DevOps usage and scale by a crack team of veterans – A project, not a product: command line interface, YAML, etc. – Continuous improvement, iterative development, rough edges https://github.com/cloudfoundry/bosh © Copyright 2012 EMC Corporation. All rights reserved. 30
  • 31. CloudFoundry BOSH (Cont.) Built from the need to operate cloudfoundry.com – Over 40 different types of VMs – Hundreds of running instances of VMs – Pushing at least 2 changes per week End-to-end management – Release engineering – Deployment – Lifecycle management Generic solution – Any service – Any cloud – Any operating system © Copyright 2012 EMC Corporation. All rights reserved. 31
  • 32. BOSH Architecture 1. Upload Stemcell 1. CLI -> Director 2. Director -> Blobstore 2. Upload Release 1. CLI -> Director 2. Director -> Blobstore 3. Deploy 1. CLI -> Director 2. Director -> A 3. Agent -> B 4. Agent -> C © Copyright 2012 EMC Corporation. All rights reserved. 32
  • 33. BOSH Concepts Stemcell – VM template – BOSH Agent – IaaS Plugin Release – Jobs Job – Packages – Templates (scripts, confs) – Monitoring Package – Source/blobs – Dependencies – Packaging (scripts) © Copyright 2012 EMC Corporation. All rights reserved. 33
  • 34. IaaS Neutral vSphere: battle tested implement AWS: code complete Cloud Foundry BOSH Cloud Provider Interface(CPI) OpenStack: testable release https://github.com/piston/ openstack-bosh-cpi © Copyright 2012 EMC Corporation. All rights reserved. 34
  • 35. Cloud Provider Interface Stemcell – create_stemcell (image, cloud_properties) – delete_stemcell (stemcell) VM – create_vm (agent_id, stemcell, resource_pool, networks, disk_locality, env) – delete_vm (vm) – reboot_vm (vm) – configure_networks (vm, networks) Disk – create_disk (size, vm_locality) – delete_disk (disk) – attach_disk (vm, disk) – detach_disk (vm, disk) © Copyright 2012 EMC Corporation. All rights reserved. 35
  • 36. Cloud Provider Interface (Cont.) For OpenStack Stemcell – create_stemcell … – delete_stemcell Cloud Provider Interface VM – create_vm – delete_vm – reboot_vm OpenStack VM VM Image Service VM – configure_networks VM VM Disk – create_disk OpenStack – delete_disk Compute – attach_disk – detach_disk © Copyright 2012 EMC Corporation. All rights reserved. 36
  • 37. Deploy PaaS with BOSH Sends droplet heart beats and exit messages Router Router Registers and Registers and unregisters unregisters CLI Routes REST API Routes droplet requests requests Droplet change notifications Droplet Cloud Controller Orchestrates Health Manager start/stop Cloud Controller (Start, Stop, Find) Droplet Execution requests Agent (DEA) Periodically scans Persists droplets for consistency and provisioned Guest applications Advertise services consume Cloud Service Controller Provision and Database unprovision Service "A" Provision Service and "A" Provisioning Agent unprovision BOSH IaaS © Copyright 2012 EMC Corporation. All rights reserved. 37
  • 38. Deployments Release Network Resource pools Jobs Properties Update concurrency Compilation workers Cloud properties © Copyright 2012 EMC Corporation. All rights reserved. 38
  • 39. Deployments for CloudFoundy Cloudfoundry.yml name: cloudfoundry release: name: cloudfoundry version: 89.1-dev compilation: workers: 4 network: default cloud_properties: ram: 1024 disk: 2048 cpu: 2 update: canaries: 1 canary_watch_time: 3000-90000 update_watch_time: 3000-90000 max_in_flight: 2 max_errors: 1 © Copyright 2012 EMC Corporation. All rights reserved. 39
  • 40. Deployments for CloudFoundy (Cont.) Cloudfoundry.yml networks: - name: default subnets: - static: - 192.168.2.50 - 192.168.2.89 range: 192.168.2.0/24 gateway: 192.168.2.1 dns: - 10.254.174.10 cloud_properties: name: PrivateNetwork - name: lb subnets: - static: - 192.168.2.90 - 192.168.2.99 range: 192.168.2.0/24 gateway: 192.168.2.1 dns: - 10.254.174.10 cloud_properties: name: PrivateNetwork © Copyright 2012 EMC Corporation. All rights reserved. 40
  • 41. Deployments for CloudFoundy (Cont.) Cloudfoundry.yml resource_pools: - name: infrastructure network: default size: 29 stemcell: name: bosh-stemcell version: 0.6.2 cloud_properties: ram: 256 disk: 2048 cpu: 1 env: bosh: password: © Copyright 2012 EMC Corporation. All rights reserved. 41
  • 42. Deployments for CloudFoundy (Cont.) Cloudfoundry.yml jobs: - name: cloud_controller template: cloud_controller instances: 1 resource_pool: infrastructure networks: - name: default static_ips: - 192.168.2.60 - name: nats template: nats instances: 1 resource_pool: infrastructure networks: - name: default static_ips: - 192.168.2.52 © Copyright 2012 EMC Corporation. All rights reserved. 42
  • 43. Deployments(CloudFoundy) Cloudfoundry.yml properties: domain: cflocal.com env: {} networks: apps: default management: default nats: user: nats password: aaa3ij3122 address: 192.168.2.52 port: 4222 © Copyright 2012 EMC Corporation. All rights reserved. 43
  • 44. Use Case bosh deployment bosh target cf cf.yml Bug report to Dev git pull Run bosh upload release Done! bosh deploy © Copyright 2012 EMC Corporation. All rights reserved. 44
  • 45. Acknowledgments VMware China R&D Center Network & Information Center, Shanghai Jiao Tong Univ. CloudFoundry Community Piston Community http://www.cloudfoundry.org https://github.com/piston/open stack-bosh-cpi © Copyright 2012 EMC Corporation. All rights reserved. 45
  • 46. Q&A © Copyright 2012 EMC Corporation. All rights reserved. 46
  • 47. Backup Slides © Copyright 2012 EMC Corporation. All rights reserved. 47
  • 48. Management Path– vmc info db cloud controller nats health manager router dea service app app © Copyright 2012 EMC Corporation. All rights reserved. 48
  • 49. Deployment Path– vmc push db cloud controller nats health manager router dea service app app © Copyright 2012 EMC Corporation. All rights reserved. 49
  • 50. Data Path– Client Request db cloud controller nats health manager router dea service app app © Copyright 2012 EMC Corporation. All rights reserved. 50
  • 51. Evolving Cloud Foundry - Kernel uaa stager db Package cloud controller cache v2 v2 nats health manager v2 v2 v2 router v2 v2 warden dea caldecott service app app © Copyright 2012 EMC Corporation. All rights reserved. 51
  • 52. How to write a custom service? • Public API for advertising services and managing service instances Cloud • Endpoints: Controll – Cloud Controller er – Service Gateway (one per service) • REST / JSON / HTTP(S) MySQL Gatewa MongoD y B Gatewa y © Copyright 2012 EMC Corporation. All rights reserved. 52
  • 53. How to write a custom service? (Cont.) Step 1: Service advertisement Service Gateway -> Cloud Controller, two methods:  POST /services/v1/offerings  DELETE /services/v1/offerings/:label :label => 'mysql-5.1' :url => 'http://12.34.56.78:4321', :plans => ['free', 'bronze', 'silver', 'gold'] :tags => ['mysql', 'mysql-5.1', 'database'] :active => true, :description => 'MySQL database service' :acls => { :wildcards => '*@vmware.com', :plans => { :bronze => { :users => ['joe@vmware.com', 'jane@vmware.com'] } } } © Copyright 2012 EMC Corporation. All rights reserved. 53
  • 54. How to write a custom service? (Cont.) Step 2: Instance management Cloud Controller -> Service Gateway, four methods:  Provision: POST /gateway/v1/configs  Bind: POST /gateway/v1/configs/:id/handles  Unbind: DELETE /gateway/v1/configs/:id/handles/:handle  Unprovision: DELETE /gateway/v1/configs/:id © Copyright 2012 EMC Corporation. All rights reserved. 54
  • 55. Reference implementation Develope A vmc create-service postgresql r vmc, STS B POST /services/v1/configurations Cloud Controller C G H {host: 12.34.56.78, port: 3456, POST /gateway/v1/configurations VCAP_SERVICES = [postgres: db: abc123, user: pqr456} {host: 12.34.56.78, port: 3456, db: abc123, user: pqr456}] Service Gateway F D Private API {host: 12.34.56.78, port: 3456, App NATS: provision SELECT * db: abc123, user: pqr456} E FROM FOO CREATE DATABASE abc123 CREATE ROLE pqr456 I GET /foo/bar Service Node (eg, PostgreSQL) Service (eg, PostgreSQL) host 12.34.56.78 End Users © Copyright 2012 EMC Corporation. All rights reserved. 55
  • 56. For legacy service – Service Broker • Cloud Foundry users may already have existing services • Legacy database that hasn’t / won’t / can’t be moved CloudFoundry.com • Services not yet supported • Service Broker exposes an arbitrary legacy service instance to Cloud Foundry so that it can be used just like any other instance © Copyright 2012 EMC Corporation. All rights reserved. 56
  • 57. For legacy service – Service Broker (Cont.) B D register hrdb {host: 87.65.43.21, port: 6543, db: def123, user: stu456} vmc create-service hrdb vmc, STS Cloud Controller Service Broker Admin Tools E H POST /services/v1/configurations VCAP_SERVICES = [hrdb: POST /gateway/v1/configurations G {host: 87.65.43.21, port:6543, db: def123, user: stu456}] port: 6543, {host: 87.65.43.21, C F POST /broker/v1/configuration db: def123, user: stu456} Service Gateway App Connecti on Details Service Broker A Core Service CREATE DATABASE def123 (eg, PostgreSQL) CREATE USER stu456 SELECT * FROM FOO Brokered Service host 12.34.56.78 (eg, Oracle DB) GET /foo/bar I © Copyright 2012 EMC Corporation. All rights reserved. 57

Notas do Editor

  1. 为什么写脚本繁琐?一个实际的PaaS平台上,遇到的实际的问题。很多很多原因造成了用脚本配置的复杂性。CloudFoundry 越来越复杂。更多的node type和software packages.CloudFoundry本身就很复杂,最微小的集群也很麻烦。节点很多。需要管理VM。雪上加霜。更新频繁,不间断服务。写脚本的时候不能出问题。测试环境的脚本和线上的还不一样。不断的调整,调整容量。纵向扩展和软件关系比较小,横向比较大。团队很小CloudFoundry的理想是成为PaaS平台的Linux。部署,运维成为麻烦阻碍CloudFoundry成为PaaS平台的Linux绊脚石,自己吃苦就算了,不能让用户也写繁琐的脚本,必须要解决这个问题。
  2. 回顾:我们曾经如何部署CouldFoundry。使用脚本,CloudFoundry提供了一个安装脚本。使用部署工具,CloudFoundry以前是使用Chef使用这些工具有一些不便的地方,就是要写脚本对于CloudFoundry来说,写脚本太繁琐了
  3. 前面说了 写脚本的方式太繁琐,有没有一个办法来解决上面的问题?BOSH自我介绍今天的主题是BOSH的架构和实践。BOSH是CloudFoundry的部署运维工具,在今年4月满周岁的正式发布。有什么问题随时打断。BOSH是胡扯。是BOSH Outer Shell的首字母缩写。BOSH不是一个CloudFoundry的组件。Initially the B stood for a code name which we deprecated soon after. For the compleetepictur, the Cloud Foundry PaaS (vcap) is the inner shell. Bosh是一个工具。可以打包,部署,运维 分布式系统。不仅仅是部署,还包括管理。不仅仅是CloudFoundry,所有的分布式系统。使用他,发布工程师打一个包,部署工程师写一个配置文件,一条命令部署到分布式系统,运维也是改改配置,一条命令不是简单的一组脚本,他有很多功能是脚本很难完成的,比如跨Cloud。Repeatable。复杂:环境复杂。大集群。多节点。多软件。多任务。简单:使用简单。只要会简单的CLI,YAML配置就可以不断持续的更新
  4. 背景系统架构中模块很多。很多模块,各有关系,写脚本乱规模很大。执行比较困难。出错什么的处理起来费力。变化很快。不是一劳永逸,扩容更新很频繁。功能,解决方案。对软件提供一个从头到脚的运维工具发布。打包成一个Release。部署。使用Bosh deploy。运维。使用修改配置。Bosh log,ssh,deploy之类。通用的不限于CloudFoundry, 任何分布式系统都可以。最适合的是系统平台类。比如一个云服务。不限于vmware。现在Vmware,AWS,OpenStack都支持不限操作系统,任意操作系统都是支持的。现在主要是Linux,版本是Ubuntu10.4
  5. 对 BOSH 有了一个大致的印象后。看一下BOSH的架构。1.看圈2.但我们部署一个应用的时候。上传一个模板。(模板就是虚拟机模板,里面有Agent和虚拟机的插件)通过CLI告诉Director说我要上传一个模板Director把模板送到BlobStore里面上传一个Release通过CLI告诉Director说我要上传一个ReleaseRelease会下载一些依赖包。Director把Release送到BlobStore里面部署通过CLI告诉Director说我要部署Director将包从BlobStore取出编译编译完放回去通过A创建一个VM。使用Stemcell作为模板通过B。VM上的Agent部署这个应用其他流程
  6. 刚刚提到了一些的概念。StemCell,Release解释 StemCell是集成了BOSH_Agent的虚拟机模板。给CloudFoundry用的stemcell是一个ubunutu的版本。可以使用CLI来上传。BOSH Director用他来创建VM。当创建Vm的时候,要传入Network和存储的配置,还有Blobstroe的位置。Release是Job的集合。可以理解为一个文件夹,里面什么都有。这个文件夹是发布工程师搞的。Job就是一个服务。比如Mysql,可能有多个实例。Job包含Package+运维的脚本. 比如我一个Myql的Job里面可以有两个package,一个是MysqlServer还有一个是Mysql的Client.Job还有配置文件和启动的脚本。可以让一个Job跑多个进程。PackageSource/blobsPackaging Script编译期
  7. BOSH在SHELL外面,VM 在 SHELL里面。BOSH是如何来实现跨虚拟机平台的呢?是通过CPI。将一些常用的虚拟机操作抽象出来,形成一套简单的接口,然后再分别加以实现。vSphere:真刀真枪的实现,支持4.2和5.0两个版本。有成千上万的部署使用到了。AWS:逐步完善,已经可以使用。在论坛上看到。有很多人已经部署过了。OpenStack:积极的进展。有Vmware和合作伙伴piston cloud开发。这个公司是个专门做OpenStack的公司。现在关于OpenStack有越来越多的资料。已经有了可以测试的版本。piston cloud希望将这部被代码集成在自己的企业版本里面,作为新项目提交到OpenStack的官方外围。https://github.com/piston/openstack-bosh-cpihttps://github.com/drnic/bosh-getting-started/blob/master/create-a-bosh/creating-a-micro-bosh-from-stemcell-openstack.md
  8. https://github.com/cloudfoundry/bosh/blob/master/cpi/lib/cloud.rb.CPI非常的精简。上面列出的就是全部,没有省略。当配置一台虚拟机的时候。Stemcell是模板相关的。可以create来上传一个模板。VM是VM相关的。可以create_vm来create一个vm.需要传入一个stemcell作为参数,虚拟机就是从那个模板clone出来的通过configure_network配置网卡。Disk是存储相关的。通过create创建,attach来连接到VM上。Create disk的时候在哪个存储上?最后可以通过reboot_vm来重启动vm。
  9.    @openstack=Fog::Compute.new(openstack_params)      @glance=Fog::Image.new(openstack_params)http://fog.io/0.8.1/compute/OpenStack Image Service Developer Guide API 1.0Stemcellcreate_stemcell(image, cloud_properties) @glance.images.createdelete_stemcell(stemcell) @openstack.images.get(stemcell_id) .destroyVMcreate_vm(agent_id, stemcell, resource_pool, networks, disk_locality, env) @openstack.images.find { |i| i.id ==stemcell_id }         server =@openstack.servers.create(server_params)delete_vm(vm) = @openstack.servers.get(server_id)  server.destroyreboot_vm(vm) openstack.servers.get(server_id)  soft_reboot(server)configure_networks(vm, networks)@openstack.servers.get(server_id) network_configurator.configure(@openstack, server)Diskcreate_disk(size, vm_locality)  volume = @openstack.volumes.create(volume_params)delete_disk(disk) @openstack.volumes.get(disk_id) destroyattach_disk(vm, disk) volume.attach(server.id, dev_name)detach_disk(vm, disk) volume.detach(server.id, volume.id)
  10. 眼见为实,耳听为虚,直接来实践。部署一个CloudFoundry集群CloudFoundry本身很复杂。就不深入结构。有哪些package ,哪些Jobs,哪些release灌入概念
  11. Stemcells and Packages是静态的,可以是别人已经发布好的。需要使用Deployment配置文件将他们和我们自己的环境结合在一起。配置文件 主要 是这样的。Release:名称版本Network:网络环境。网卡,ip访问Resource pool: VM的池,默认的CPU和内存,磁盘大小。Job:希望使用的Job:实例的个数,网络和存储,机器配置 自定义。部署的时候替换成Properties。每一个Job可以定义一种组件,如Mysql,NighxProperties:填充模板的变量