forked from mboldt/docs-tiledev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathodb-resource-defaults.html.md.erb
81 lines (58 loc) · 2.53 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
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: Configuring disk and VM type defaults for on-demand service tiles
owner: Ops Manager
---
You can configure the drop-down menu items for VM types and persistent disk types in your tile.
On-Demand service tiles have a configuration pane for each service plan.
You can use the drop-down menu on the configuration pane to set the VM type and persistent disk type for
each instance of that plan.
Tanzu Operations Manager populates the menu with options that are based on the VM and disk options available
on the current IaaS.
When you set default values for VMs and disk types, it helps you to select the right
resources for on-demand service
broker (ODB) services when you use on-demand plans.
## <a id="defaults"></a>VM and Persistent disk types
The property that defines the VM type options is `vm_type_dropdown` property, and the menu items 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, Tanzu Operations Manager uses a best-fit algorithm to match
defaults to their closest equivalents on the IaaS, similar to how the **Resource Config** pane
handles the **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 you configure the tile and do not choose a value from
the drop-down menu, Tanzu Operations Manager by default sets the resource to the smallest option available on the IaaS.
### <a id="vm-type"></a>Set VM type defaults
For the `vm_type_dropdown` property, 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 the `disk_type_dropdown` property, 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
```