forked from mboldt/docs-tiledev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtime-config.html.md.erb
176 lines (132 loc) · 6.38 KB
/
runtime-config.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
title: Managing Runtime Configs
owner: Services
---
This topic explains how to define and manage named runtime configs with your service tile for <%= vars.platform_name %>.
Tile authors can manage runtime configs in the following ways:
+ Add a new runtime config in an existing product tile. See [Add a Runtime Config](#create).
+ Delete a runtime config from a tile. See [Delete a Runtime Config](#delete).
+ Create a tile that only contains a runtime config. See [Create a Runtime Config-Only Tile](#config-only).
For more information about runtime configs, see
[Director Runtime Config](https://bosh.io/docs/runtime-config.html) in Cloud Foundry BOSH documentation.
## <a id="overview"></a>Overview
A runtime config is a section of the tile metadata that defines global deployment configurations.
Tile authors can create tiles that only contain a runtime config or add a runtime config to an existing product tile. When a tile author includes a runtime config as a top-level property in the tile metadata, BOSH applies the runtime config to every VM in the deployment.
For more information about top-level properties, see [Top-Level Properties](./property-template-references.html#top-level).
When operators apply changes to deployments, Ops Manager combines the runtime config information from every tile in the deployment and assigns each named runtime config a unique identifier. Ops Manager creates the identifier using the tile name, a generated GUID, and the runtime config name defined in the metadata.
The identifier follows the following format:
```
TILE_NAME-GUID-RUNTIME_CONFIG_NAME
```
![Runtime Config Unique ID](img/runtime-config-id.png)
## <a id="create"></a>Add a Runtime Config
Tile authors can add `runtime_configs` as a top-level property in tile metadata. In the runtime config section, the tile author defines configuration properties that Ops Manager applies to all deployments. A tile can support any number of runtime configs.
A named runtime config, can contain any number of add-ons. Each add-on can contain any number of jobs.
To add a runtime config to a tile, add the following section to the tile metadata:
```
runtime_configs:
- name: YOUR-RUNTIME-CONFIG
runtime_config: |
releases:
- name: RELEASE
version: RELEASE-VERSION
addons:
- name: YOUR-ADDON-NAME
jobs:
- name:YOUR-RUNTIME-CONFIG-JOB
release: RELEASE
properties:
YOUR-PROPERTY:
...
```
Where:
* `YOUR-RUNTIME-CONFIG` is the name of the runtime config.
* `RELEASE` is the release used for the runtime config.
* `RELEASE-VERSION` is the version of the release.
* `YOUR-ADDON-NAME` is the name of the add-on that contains the runtime config job.
* `YOUR-RUNTIME-CONFIG-JOB` is the name of the job the runtime config describes.
* `YOUR-PROPERTY` are the properties used in the job.
For more information about runtime config keys, see
[Director Runtime Config](https://bosh.io/docs/runtime-config.html) in Cloud Foundry BOSH documentation.
For more information about top-level properties in the tile manifest, see [Top-Level Properties](./property-template-references.html#top-level).
<p class="note"><strong>Note:</strong> The names you choose must be unique across a deployment. <%= vars.company_name %> recommends appending your product name or another unique identifier to each of the named items in the <code>runtime_configs</code> section.</p>
## <a id="delete"></a>Delete a Runtime Config
Tile authors can remove an existing runtime config from a tile.
When the operator upgrades the tile, Ops Manager detects the missing reference and deletes the runtime config.
To delete a runtime config from a tile, remove the `runtime_configs` section from the tile metadata.
For example, to delete a runtime config to a tile you remove the following section:
```
runtime_configs:
- name: YOUR-RUNTIME-CONFIG
runtime_config: |
releases:
- name: RELEASE
version: RELEASE-VERSION
addons:
- name: YOUR-ADDON-NAME
jobs:
- name:YOUR-RUNTIME-CONFIG-JOB
release: RELEASE
properties:
YOUR-PROPERTY:
...
```
## <a id="config-only"></a>Create a Runtime Config Tile
In Ops Manager, a runtime config tile appears as a tile with minimal configuration options. Runtime config tiles contain no stemcell, network, availability zone (AZ), or resource config information. You might create a runtime config tile if you want global deployment configurations to be applied to all VMs in deployment and do not any other functionality.
For a runtime config tile, tile authors are not required to define the following top-level properties:
* `post_deploy_errands`
* `pre_delete_errands`
* `job_types`
![Runtime Config Tile on the Ops Manager Installation Dashboard](img/runtime-config-dashboard.png)
### <a id="example"></a>Example Runtime Config-Only Tile
The following example shows a runtime config tile with minimal configuration:
```
---
name: runtime-config-only-example-product
product_version: "3.4"
minimum_version_for_upgrade: "2.0"
metadata_version: "2.0"
label: 'Runtime Config Only Example Product'
description: An example product to demonstrate runtime config features
rank: 1
service_broker: false # Default value
stemcell_criteria:
os: xenial 97
version: STEMCELL-VERSION
releases:
- name: os-conf
file: os-conf
version: '15'
post_deploy_errands: []
pre_delete_errands: []
form_types:
- name: example_form
label: 'Example form'
description: 'An example form'
property_inputs:
- reference: .properties.example_string
label: 'Example string'
property_blueprints:
- name: example_string
type: string
configurable: true
default: Pizza
job_types: []
runtime_configs:
- name: example-runtime-config
runtime_config: |
releases:
- name: os-conf
version: 15
addons:
- name: login
jobs:
- name: login-banner
release: os-conf
properties:
login_banner:
text: |
(( .properties.example_string.value )).
```
In the runtime config example above, the `login-banner` job prints a banner when a user logs into any VM in the deployment. The operator can use the default value defined in the `form_types` section of the metadata or configure the banner by editing the **Example string** value in Ops Manager.
![Runtime Config Tile Information](img/runtime-config-tile.png)