forked from mboldt/docs-tiledev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
odb-resource-defaults.html.md.erb
68 lines (51 loc) · 2.6 KB
/
odb-resource-defaults.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
title: Configuring Disk and VM Type Defaults for On-Demand Service Tiles
owner: Ops Manager
---
<p class="note"><strong>Note</strong>: Ops Manager 2.0 and later supports defining VM and disk type defaults and constraints.</p>
This topic describes how tile authors can configure the dropdown menu items for VM types and persistent disk types in their tile.
On-demand service tiles have a configuration pane for each service plan.
Operators use dropdown menus on the plan configuration pane to set the VM type and persistent disk type for each instance of that plan.
Ops Manager populates the menus with options based on the VM and disk options available on the current IaaS.
Setting default values for VMs and disk types helps operators to choose the right resources for on-demand service broker (ODB) services when using on-demand plans.
## <a id="defaults"></a>VM and Persistent Disk Types
The property that defines the VM type options is `vm_type_dropdown`, and the menu options for disk type come from the `disk_type_dropdown` property.
Tile authors do not specify the menu items in the product template.
Because VM and disk options differ by IaaS, Ops Manager uses a best-fit algorithm to match defaults to their closest equivalents on the IaaS, similar to how the **Resource Config** pane handles its **VM Type** and **Persistent Disk Type** options.
If a tile developer does not include a default value for a VM or disk resource, and then an operator configuring the tile does not choose a value from the dropdown, Ops Manager by default sets the resource to the smallest option available on the IaaS.
### <a id="vm-type"></a>Set VM Type Defaults
For `vm_type_dropdown` the resources are `ram`, `ephemeral_disk`, and `cpu`.
Tile authors can also apply `constraints` to any of these resources.
Constraints can include `min` or `power_of_two`.
For example:
```yaml
- name: example_vm_type
type: vm_type_dropdown
configurable: true
resource_definitions:
- name: ram
default: 1024
constraints:
min: 1024
power_of_two: true
- name: ephemeral_disk
default: 1024
- name: cpu
default: 1
```
### <a id="disk-type"></a>Set Persistent Disk Type Defaults
For `disk_type_dropdown` the resource is `persistent_disk`.
Tile authors can also apply `constraints` to this resource.
Constraints can include `min` or `power_of_two`.
For example:
```yaml
- name: example_disk_type_dropdown
type: disk_type_dropdown
configurable: true
resource_definitions:
- name: persistent_disk
default: 2000
constraints:
min: 50
power_of_two: false
```