After receiving multiple requests for a way to specify IaaS properties for certain persistent disks I wanted to share some proposed changes before BOSH team implements them.
The name of this new feature is disk pools. They would work similarly to how resource pools work for VMs.
Disk pools would solve following use cases (I'm sure each IaaS has its own disk configuration that can be exposed):
- AWS SSD disks (iops requests)
- vSphere thin provisioned disks
Here are the proposed changes to the deployment manifest (let's say this is for AWS):
```
resource_pools:
- name: fast_machines
cloud_properties:
instance_type: m3.x2large
# disk_pools is optionally specified
disk_pools: # OR persistent_disk_pools: <-------------------- new
- name: fast_disks
cloud_properties:
volume_type: gp2
jobs:
- name: mydb
templates: [ mysql ]
instances: 1
resource_pool: fast_machines
persistent_disk: 3_000
persistent_disk_pool: fast_disks # OR disk_pool <-------------------- new
networks: [ {...} ]
properties: {}
- name: backup
persistent_disk: 10_000
# no persistent_disk_pool key provided so CPI will pick default settings (this is for backwards compatibility)
...
```
An alternative format for jobs with persistent disk (looks slightly cleaner):
```
- name: mydb
persistent_disk:
size: 3000
disk_pool: fast_disks # <-------------------- new
```
From the CPI perspective create_disk method would have to accept cloud_properties (just like create_vm takes cloud_properties of the resource pool).
We will be starting to work on disk pool feature within few weeks in collaboration with Piston. Let us know what you guys think.