Skip to content

Instantly share code, notes, and snippets.

@friegger
Last active November 29, 2017 13:50
Show Gist options
  • Save friegger/6a06ec0d068b247b82ae344bd9821a59 to your computer and use it in GitHub Desktop.
Save friegger/6a06ec0d068b247b82ae344bd9821a59 to your computer and use it in GitHub Desktop.
Disk with OpenStack and BOSH

Disks with OpenStack and BOSH

How Disks are Used

- separate devices  
  root disk        -> vda -> /  
  ephemeral disk   -> vdb -> /var/vcap/data  
  persistent disk  -> vdc -> /var/vcap/store  
- same device  
  root disk + ephemeral disk -> vda -> / & /var/vcap/data  
  persistent disk            -> vdb -> /var/vcap/store

Where a Disks with given Flavors

Flavor       HV           Cinder
bfv false
root 5       vda 5           -
eph 5        vdb 5           -

bfv false
root 20      vda 20 (rd + eph) -
eph 0        -                 -

bfv true
root 5        -             vda 5
eph 5        vdb 5           -

bfv true     
root 20      -              vda 20 (rd + eph)
eph 0        -               -

Calculation of flavor

  • flavors are infra specific
  • want to use the same manifest on different IaaS
  • specified on instance_group in deployment manifest
  • BOSH calls calculate_vm_cloud_properties, it returns cloud_properties like vm_type containg the flavor which is then given to create_vm
   requirements = {
      'ram' => 2048,
      'cpu' => 2,
      'ephemeral_disk_size' => 10 * 1024,
    }
  • order by min of CPU, RAM, rood disk + ephemeral disk, root disk
  • in boot_from_volume case no flavors with ephemeral disk allowed
  • in boot_from_volume the calculation will decide to specify a custom root disk size, if root disk of picked flavor is too small
  • if no ephemeral disk root disk must accomodate requested ephemeral disk size (including swap) + 3 GB OS

Relevant Files

Agent

CPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment