Deploying Services
with BOSH
Jeffrey Peckham | Engineer
Cloud Foundry
Who Am I?
•
Jeffrey Peckham
2008-2012 – SRE in Higher Education and eCommerce.
2012 – SRE on Production Cloud Foundry
2013 – Engineer on BOSH
OSCON – 3rd
time attending, 1st
time speaking
What is BOSH?
 A comprehensive service deployment tool.
 Developed originally for Cloud Foundry.
 Deploys distributed software onto various IaaS providers.


What BOSH is not
 It is not a PaaS.
 It is not Pacemaker, Clusterware, or other HA orchestration.
 It is not clever.
Why BOSH?
 Addresses the end-to-end problem of provisioning to running services.
 Designed for updates, provisioning is just a side-effect.
 Fast, predictable deploys that don't suffer from “Configuration Drift”.
Top Down Deployment Strategy
 What do I want to deploy?

 What services make it up?

 How do those services run?

 What software do they need?
Top Down Deployment Strategy
 What do I want to deploy?
- A search indexer
 What services make it up?
- Elastic Search
 How do those services run?
- A Single Elastic Search process.
 What software do they need?
- Java, Elastic Search
Job
Is a process or set of processes that can be configured and monitored.





 What's the simplest thing I can monitor?

How about 'init'?
$ ps ­ef
 UID        PID  PPID  C STIME TTY          TIME CMD
 root         1     0  0 09:10 ?        00:00:01 /sbin/init
 root         2     0  0 09:10 ?        00:00:00 [kthreadd]
 root         3     2  0 09:10 ?        00:00:01 [ksoftirqd/0]
 root         5     2  0 09:10 ?        00:00:00 [kworker/0:0H]
 root         7     2  0 09:10 ?        00:00:00 [kworker/u:0H]
 root         8     2  0 09:10 ?        00:00:00 [migration/0]
Demo: Initial Release and Job
Deploy to a BOSH
 What BOSH?

 Deploy a BOSH
 http://docs.cloudfoundry.com/docs/running/deploying-cf/

 BOSH-Lite (VERY ALPHA)
 https://github.com/cloudfoundry/bosh-lite

 Come talk to us
 https://groups.google.com/a/cloudfoundry.org/forum/#!forum/bosh-users

Stemcell
 A base OS image for deploying services on.

 Currently an Ubuntu based image with an embedded BOSH Agent.

 Knows how to discover location and can phone home.
Deployment Manifest
 A description of a BOSH deployed release.

 Describes What...
 Release
 Resources (Networks, Disks and VMs)
 Services
 Update behavior
 Settings for the Release

Demo: Initial Deploy
What did that do?
 Spun up a VM and monitored init.



 This is where you think, 'Jolly good... who cares?'
Package
 Source Based
 Generates static files only, no templates
 No pre/post apply scripts
 Built on ephemeral VMs
 Packaging script places files in $BOSH_INSTALL_TARGET
Demo: Adding Packages and Exploring an Instance
Demo: Updating a Service and Debugging
Properties
 Variables that can be set at deployment time and used to configure jobs.


 Can be scoped to single jobs or span multiple. Often to describe
relationships (host / port to connect / listen to).
Demo: Introducing Properties
Scaling
 Define the desired instances per job and BOSH will oblige.
Demo: Adding Instances
Rolling updates
 Canary based deployments.
 Tunable timeouts on expected update times.
 Supports OS base image updates.
 Supports rollback as separate deploy*


 *if release version is backwards compatible (may require roll forward)
Demo: Rolling update
Infrastructures Supported
 vSphere
 vCloud
 OpenStack
 AWS

 Experimental
 CloudStack
 Warden (LXC)
Demo: Taking it to a new Infrastructure
Questions?
Thank You
 Jeffrey Peckham
 peckham@pivotallabs.com
 twitter: abic – github: abic
 https://github.com/abic/elasticsearch-boshrelease
 http://docs.cloudfoundry.com
 https://githb.com/cloudfoundry/bosh
 https://groups.google.com/a/cloudfoundry.org/d/forum/bosh-users
 http://www.thisweekincf.com

Deploying your application on open stack using bosh presentation

  • 1.
    Deploying Services with BOSH JeffreyPeckham | Engineer Cloud Foundry
  • 2.
    Who Am I? • JeffreyPeckham 2008-2012 – SRE in Higher Education and eCommerce. 2012 – SRE on Production Cloud Foundry 2013 – Engineer on BOSH OSCON – 3rd time attending, 1st time speaking
  • 3.
    What is BOSH? A comprehensive service deployment tool.  Developed originally for Cloud Foundry.  Deploys distributed software onto various IaaS providers.  
  • 4.
    What BOSH isnot  It is not a PaaS.  It is not Pacemaker, Clusterware, or other HA orchestration.  It is not clever.
  • 5.
    Why BOSH?  Addressesthe end-to-end problem of provisioning to running services.  Designed for updates, provisioning is just a side-effect.  Fast, predictable deploys that don't suffer from “Configuration Drift”.
  • 6.
    Top Down DeploymentStrategy  What do I want to deploy?   What services make it up?   How do those services run?   What software do they need?
  • 7.
    Top Down DeploymentStrategy  What do I want to deploy? - A search indexer  What services make it up? - Elastic Search  How do those services run? - A Single Elastic Search process.  What software do they need? - Java, Elastic Search
  • 8.
    Job Is a processor set of processes that can be configured and monitored.       What's the simplest thing I can monitor? 
  • 9.
    How about 'init'? $ ps ­ef UID        PID  PPID  C STIME TTY          TIME CMD  root         1     0  0 09:10 ?        00:00:01 /sbin/init  root         2     0  0 09:10 ?        00:00:00 [kthreadd]  root         3     2  0 09:10 ?        00:00:01 [ksoftirqd/0]  root         5     2  0 09:10 ?        00:00:00 [kworker/0:0H]  root         7     2  0 09:10 ?        00:00:00 [kworker/u:0H]  root         8     2  0 09:10 ?        00:00:00 [migration/0]
  • 10.
  • 11.
    Deploy to aBOSH  What BOSH?   Deploy a BOSH  http://docs.cloudfoundry.com/docs/running/deploying-cf/   BOSH-Lite (VERY ALPHA)  https://github.com/cloudfoundry/bosh-lite   Come talk to us  https://groups.google.com/a/cloudfoundry.org/forum/#!forum/bosh-users 
  • 12.
    Stemcell  A baseOS image for deploying services on.   Currently an Ubuntu based image with an embedded BOSH Agent.   Knows how to discover location and can phone home.
  • 13.
    Deployment Manifest  Adescription of a BOSH deployed release.   Describes What...  Release  Resources (Networks, Disks and VMs)  Services  Update behavior  Settings for the Release 
  • 14.
  • 15.
    What did thatdo?  Spun up a VM and monitored init.     This is where you think, 'Jolly good... who cares?'
  • 16.
    Package  Source Based Generates static files only, no templates  No pre/post apply scripts  Built on ephemeral VMs  Packaging script places files in $BOSH_INSTALL_TARGET
  • 17.
    Demo: Adding Packagesand Exploring an Instance
  • 18.
    Demo: Updating aService and Debugging
  • 19.
    Properties  Variables thatcan be set at deployment time and used to configure jobs.    Can be scoped to single jobs or span multiple. Often to describe relationships (host / port to connect / listen to).
  • 20.
  • 21.
    Scaling  Define thedesired instances per job and BOSH will oblige.
  • 22.
  • 23.
    Rolling updates  Canarybased deployments.  Tunable timeouts on expected update times.  Supports OS base image updates.  Supports rollback as separate deploy*    *if release version is backwards compatible (may require roll forward)
  • 24.
  • 25.
    Infrastructures Supported  vSphere vCloud  OpenStack  AWS   Experimental  CloudStack  Warden (LXC)
  • 26.
    Demo: Taking itto a new Infrastructure
  • 27.
  • 28.
    Thank You  JeffreyPeckham  peckham@pivotallabs.com  twitter: abic – github: abic  https://github.com/abic/elasticsearch-boshrelease  http://docs.cloudfoundry.com  https://githb.com/cloudfoundry/bosh  https://groups.google.com/a/cloudfoundry.org/d/forum/bosh-users  http://www.thisweekincf.com