Your SlideShare is downloading. ×
0
Cloud Foundry and OpenStackCloud Foundry, BOSH, and CPIs like OpenStackVadim SpivakCloud Foundry Engineering@vadimspivak  ...
Agenda    Background    Concepts    Contracts    Control    Consistency    Components    Cloud Provider Interface  ...
Background Cloud Foundry BOSH    • Release engineering    • Lifecycle management    • Single tool / Ease of use    • Inf...
Concepts    Source / Blobs    Packages    Jobs    Releases    Stemcells    Deployments                              ...
Source / Blobs    All deployed software    git (submodules)    bosh blobs    bosh sync blobs-rw-r--r-- 1 vspivak staff...
Packages    Source / blobs    Dependencies    Versioning    Pre-packaging    Packaging (compilation)                 ...
Sample Package (Redis)release/packages/redis/spec                       release/packages/redis/packaging ---              ...
Sample Package (Warden)release/packages/warden/spec                               release/packages/warden/packaging ---   ...
Jobs   Packages   Templates   Versioned   Supervision   Monitoring   Lifecycle hooks                      CONFIDENTI...
Sample Job (Redis)release/jobs/vcap_redis/spec --- name: vcap_redis templates:   vcap_redis_ctl: bin/vcap_redis_ctl   vcap...
Sample Job (Redis)release/jobs/vcap_redis/monit check process vcap_redis   with pidfile /var/vcap/sys/run/vcap_redis/vcap_...
Sample Job (Redis)release/jobs/vcap_redis/templates/vcap_redis_ctl #!/bin/bash RUN_DIR=/var/vcap/sys/run/vcap_redis ... ca...
Releases   Packages   Jobs   Versioned   Self contained   Incremental   Published  » bosh create release  » bosh upl...
Stemcells    VM template    BOSH Agent    Versioned    VMBuilder    IaaS Plugin  » bosh upload stemcell  » bosh delet...
Deployments    Release    Networks    Resource pools    Compilation workers    Jobs    Update concurrency    Proper...
Sample Deployment  ---  name: wordpress  release:   name: sample   version: 1  compilation:   workers: 4   network: defaul...
Sample Deployment  networks:   - name: default     subnets:     - reserved:       - 192.0.2.2 - 192.0.2.10       - 192.0.2...
Sample Deployment  resource_pools:   - name: infrastructure     network: default     size: 6     stemcell:       name: bos...
Sample Deployment  jobs:   - name: mysql     template: mysql     instances: 1     resource_pool: infrastructure     persis...
Sample Deployment  properties:   wordpress:     admin: foo@bar.com     port: 8008     servers:       - 192.0.2.30       - ...
Usage  » bosh target http://mydirector:25555  » bosh upload stemcell ~/stemcells/stemcell-0.5.5.tgz  » cd sample_release  ...
Contracts Jobs Releases Cloud Provider Interface                                          CONFIDENTIAL© 2012 VMware, In...
Control Repeatable deployments Predictable rollout                                          CONFIDENTIAL© 2012 VMware, I...
Consistency Dev / Staging / Production BOSH targets                                          CONFIDENTIAL© 2012 VMware, ...
Components    Director / Workers    Agent    Monitor    CLI    NATS    Redis    Database    Blobstore             ...
BOSH: under the hood                BOSH User                                            “BOSH is deployed by BOSH”   bosh...
Cloud Provider InterfaceStemcellcreate_stemcell(image, cloud_properties)delete_stemcell(stemcell)VMcreate_vm(agent_id, ste...
Cloud Provider Interface Agent plugin Bootstrap BOSH Deployer                                          CONFIDENTIAL© 20...
Reference / Q&A Mailing lists    • http://groups.google.com/a/cloudfoundry.org/group/bosh-users    • http://groups.google...
Upcoming SlideShare
Loading in...5
×

Cloud Foundry and OpenStack

7,360

Published on

Published in: Technology, Business
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,360
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
285
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide
  • Concepts- src/blobs/packages/jobsContracts- cpi, job lifecycle, releasesControl:- repeatable deployments, controlled changeConsistency:- same release, multiple targets/environmentsCPI:Challenges:
  • CF – Open PaaS, many frameworks, runtims
  • Transcript of "Cloud Foundry and OpenStack"

    1. 1. Cloud Foundry and OpenStackCloud Foundry, BOSH, and CPIs like OpenStackVadim SpivakCloud Foundry Engineering@vadimspivak © 2012 VMware, Inc. All rights reserved
    2. 2. Agenda Background Concepts Contracts Control Consistency Components Cloud Provider Interface CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 2
    3. 3. Background Cloud Foundry BOSH • Release engineering • Lifecycle management • Single tool / Ease of use • Infrastructure portability CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 3
    4. 4. Concepts Source / Blobs Packages Jobs Releases Stemcells Deployments CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 4
    5. 5. Source / Blobs All deployed software git (submodules) bosh blobs bosh sync blobs-rw-r--r-- 1 vspivak staff 29000 Apr 11 11:16 blob_index.ymldrwxr-xr-x 25 vspivak staff 850 Apr 16 13:07 blobsdrwxr-xr-x 3 vspivak staff 102 Apr 16 12:22 configdrwxr-xr-x 42 vspivak staff 1428 Apr 16 12:22 jobsdrwxr-xr-x 61 vspivak staff 2074 Apr 16 12:22 packagesdrwxr-xr-x 61 vspivak staff 2074 Apr 11 11:16 releasesdrwxr-xr-x 16 vspivak staff 544 Apr 16 13:40 src CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 5
    6. 6. Packages Source / blobs Dependencies Versioning Pre-packaging Packaging (compilation) CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 6
    7. 7. Sample Package (Redis)release/packages/redis/spec release/packages/redis/packaging --- set -e name: redis files: tar zxf redis/redis-2.2.4.tar.gz - redis/redis-2.2.4.tar.gz ( cd redis-2.2.4 make make PREFIX=$BOSH_INSTALL_TARGET install ) CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 7
    8. 8. Sample Package (Warden)release/packages/warden/spec release/packages/warden/packaging --- set -o errexit name: warden dependencies: cp -a * ${BOSH_INSTALL_TARGET} - ruby ( files: set -o errexit - core/warden/**/* cd ${BOSH_INSTALL_TARGET}/warden - core/common/bin/fetch_gems /var/vcap/packages/ruby/bin/bundle --local install -- deployment --without=development test # Unzip base chroot from stemcellrelease/packages/warden/pre_packaging ... set -e env SKIP_DEBOOTSTRAP=true SKIP_APT=true cd ${BUILD_DIR} /var/vcap/packages/ruby/bin/bundle exec rake setup cp -a core/warden . ) ruby core/common/bin/fetch_gems /warden/Gemfile ./warden/Gemfile.lock ./warden/vendor/cache CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 8
    9. 9. Jobs Packages Templates Versioned Supervision Monitoring Lifecycle hooks CONFIDENTIAL@cloudfoundry 9
    10. 10. Sample Job (Redis)release/jobs/vcap_redis/spec --- name: vcap_redis templates: vcap_redis_ctl: bin/vcap_redis_ctl vcap_redis.conf.erb: config/vcap_redis.conf packages: - common - redis CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 10
    11. 11. Sample Job (Redis)release/jobs/vcap_redis/monit check process vcap_redis with pidfile /var/vcap/sys/run/vcap_redis/vcap_redis.pid start program "/var/vcap/jobs/vcap_redis/bin/vcap_redis_ctl start" stop program "/var/vcap/jobs/vcap_redis/bin/vcap_redis_ctl stop" group vcap CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 11
    12. 12. Sample Job (Redis)release/jobs/vcap_redis/templates/vcap_redis_ctl #!/bin/bash RUN_DIR=/var/vcap/sys/run/vcap_redis ... case $1 in start) pid_guard $PIDFILE "VCAP Redis" mkdir -p $RUN_DIR mkdir -p $LOG_DIR echo $$ > $PIDFILE exec /var/vcap/packages/redis/bin/redis-server /var/vcap/jobs/vcap_redis/config/vcap_redis.conf ;; stop) kill_and_wait $PIDFILE ;; *) echo "Usage: vcap_redis_ctl {start|stop}” ;; esac CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 12
    13. 13. Releases Packages Jobs Versioned Self contained Incremental Published » bosh create release » bosh upload release » bosh delete release » bosh releases CONFIDENTIAL@cloudfoundry 13
    14. 14. Stemcells VM template BOSH Agent Versioned VMBuilder IaaS Plugin » bosh upload stemcell » bosh delete stemcell » bosh stemcells CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 14
    15. 15. Deployments Release Networks Resource pools Compilation workers Jobs Update concurrency Properties Cloud properties CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 15
    16. 16. Sample Deployment --- name: wordpress release: name: sample version: 1 compilation: workers: 4 network: default cloud_properties: ram: 2048 disk: 8096 cpu: 2 update: canaries: 1 canary_watch_time: 60000 update_watch_time: 30000 max_in_flight: 4 CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 16
    17. 17. Sample Deployment networks: - name: default subnets: - reserved: - 192.0.2.2 - 192.0.2.10 - 192.0.2.200 - 192.0.2.254 static: - 192.0.2.11 - 192.0.2.100 range: 192.0.2.0/24 gateway: 192.0.2.1 dns: - 192.0.2.245 - 192.0.2.246 cloud_properties: name: VLAN2220 CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 17
    18. 18. Sample Deployment resource_pools: - name: infrastructure network: default size: 6 stemcell: name: bosh-stemcell version: 0.4.6 cloud_properties: cpu: 1 disk: 8192 ram: 4096 CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 18
    19. 19. Sample Deployment jobs: - name: mysql template: mysql instances: 1 resource_pool: infrastructure persistent_disk: 16384 networks: - name: default static_ips: - 192.0.2.20 - name: wordpress template: wordpress instances: 4 resource_pool: infrastructure networks: - name: default static_ips: - 192.0.2.30 - 192.0.2.33 CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 19
    20. 20. Sample Deployment properties: wordpress: admin: foo@bar.com port: 8008 servers: - 192.0.2.30 - 192.0.2.31 - 192.0.2.32 - 192.0.2.33 servername: wp.appcloud14.dev.mozycloud.com db: name: wp user: wordpress pass: w0rdpr3ss auth_key: random key secure_auth_key: random key logged_in_key: random key nonce_key: random key CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 20
    21. 21. Usage » bosh target http://mydirector:25555 » bosh upload stemcell ~/stemcells/stemcell-0.5.5.tgz » cd sample_release » bosh create release » bosh upload release » bosh deployment ~/deployment/sample.yml » vim ~/deployment/sample.yml » bosh deploy CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 21
    22. 22. Contracts Jobs Releases Cloud Provider Interface CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 22
    23. 23. Control Repeatable deployments Predictable rollout CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 23
    24. 24. Consistency Dev / Staging / Production BOSH targets CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 24
    25. 25. Components Director / Workers Agent Monitor CLI NATS Redis Database Blobstore CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 25
    26. 26. BOSH: under the hood BOSH User “BOSH is deployed by BOSH” bosh cli director healthmon cloudfoundry.com db redis nats workers blobs active jobs agent IaaS CPI stemcell disk CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 26
    27. 27. Cloud Provider InterfaceStemcellcreate_stemcell(image, cloud_properties)delete_stemcell(stemcell)VMcreate_vm(agent_id, stemcell, resource_pool, networks, disk_locality, env)delete_vm(vm)reboot_vm(vm)configure_networks(vm, networks)Diskcreate_disk(size, vm_locality)delete_disk(disk)attach_disk(vm, disk)detach_disk(vm, disk) CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 27
    28. 28. Cloud Provider Interface Agent plugin Bootstrap BOSH Deployer CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 28
    29. 29. Reference / Q&A Mailing lists • http://groups.google.com/a/cloudfoundry.org/group/bosh-users • http://groups.google.com/a/cloudfoundry.org/group/bosh-dev File a Bug • http://cloudfoundry.atlassian.net Browse, Fork, Contribute • https://github.com/cloudfoundry/bosh • gerrit-clone ssh://reviews.cloudfoundry.org:29418/bosh.git CONFIDENTIAL© 2012 VMware, Inc. All rights reserved 29
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×