- 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
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 - -
- 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 tocreate_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
- https://github.com/cloudfoundry/bosh-agent/blob/master/infrastructure/devicepathresolver/id_device_path_resolver.go
- https://github.com/cloudfoundry/bosh-agent/blob/master/platform/linux_platform.go
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/lib/cloud/openstack/instance_type_mapper.rb
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/spec/unit/instance_type_mapper_spec.rb
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/lib/cloud/openstack/cloud.rb#L811
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/lib/cloud/openstack/cloud.rb#L156
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/lib/cloud/openstack/cloud.rb#L190
- more in
cloud.rb
- https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/src/bosh_openstack_cpi/lib/cloud/openstack/volume_configurator.rb