Skip to content

Commit 0b28988

Browse files
Shaan SapraRyan Moran
Shaan Sapra
authored and
Ryan Moran
committed
Document how to migrate tile syslog into OpsManager
[#161267411] Tile authors should be able to write migrations to retain operator's syslog settings when converting to consistent syslog Signed-off-by: Ryan Moran <[email protected]>
1 parent f38a3d5 commit 0b28988

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed
+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Migrating Existing Syslog Configuration to OpsManager
3+
owner: Ops Manager
4+
---
5+
6+
<strong><%= modified_date %></strong>
7+
8+
This topic explains how to migrate existing syslog properties that are defined by a tile into the syslog form provided by OpsManager.
9+
10+
## <a id="syslog-data-model"></a>Syslog Data Model
11+
12+
<table>
13+
<tr>
14+
<th>Syslog parameter</th>
15+
<th>Data Type</th>
16+
<th>Required</th>
17+
<th>Notes</th>
18+
</tr>
19+
<tr>
20+
<td>enabled</td>
21+
<td>boolean</td>
22+
<td>No</td>
23+
<td>Defaults to false</td>
24+
</tr>
25+
<tr>
26+
<td>address</td>
27+
<td>string</td>
28+
<td>Yes</td>
29+
<td>Must be a valid network address</td>
30+
</tr>
31+
<tr>
32+
<td>port</td>
33+
<td>integer</td>
34+
<td>Yes</td>
35+
<td></td>
36+
</tr>
37+
<tr>
38+
<td>transport_protocol</td>
39+
<td>string</td>
40+
<td>No</td>
41+
<td>Valid values include tcp and udp. Defaults to tcp.</td>
42+
</tr>
43+
<tr>
44+
<td>tls_enabled</td>
45+
<td>boolean</td>
46+
<td>No</td>
47+
<td>Defaults to false.</td>
48+
</tr>
49+
<tr>
50+
<td>ssl_ca_certificate</td>
51+
<td>string</td>
52+
<td>No, unless tls_enabled is true</td>
53+
<td>Defaults to false.</td>
54+
</tr>
55+
<tr>
56+
<td>permitted_peer</td>
57+
<td>boolean</td>
58+
<td>No, unless tls_enabled is true</td>
59+
<td>Defaults to false.</td>
60+
</tr>
61+
<tr>
62+
<td>queue_size</td>
63+
<td>integer</td>
64+
<td>No</td>
65+
<td>Defaults to 100,000.</td>
66+
</tr>
67+
<tr>
68+
<td>forward_debug_logs</td>
69+
<td>boolean</td>
70+
<td>No</td>
71+
<td>Defaults to false.</td>
72+
</tr>
73+
</table>
74+
75+
## <a id="javascript"></a> Use the JavaScript Migration Process
76+
77+
Tile authors can write a JavaScript migration to move their existing syslog properties into the syslog form provided by OpsManager. After a successful migration, Ops Manager will present the migrated syslog properties in the Syslog form of the tile.
78+
79+
1. Use the following example to write the JavaScript migration.
80+
Save the JavaScript file to the `PRODUCT/migrations/v1` directory of your .pivotal tile.
81+
82+
```js
83+
exports.migrate = function(input) {
84+
input.syslog_configuration = {
85+
enabled: true,
86+
address: input.properties['.PROPERTY-REFERENCE.EXAMPLE-ADDRESS'],
87+
port: input.properties['.PROPERTY-REFERENCE.EXAMPLE-PORT'],
88+
transport_protocol: input.properties['.PROPERTY-REFERENCE.EXAMPLE-PROTOCOL']
89+
};
90+
return input;
91+
};
92+
```
93+
In the code block above, replace the example text as follows:
94+
* `PROPERTY-REFERENCE`: Replace with the property reference that corresponds to the metadata file, such as `properties`. See [Tile Upgrades](./tile-upgrades.html#import) for more information about migrating properties.
95+
* `EXAMPLE-ADDRESS`: Replace with the property name of the address.
96+
* `EXAMPLE-PORT`: Replace with the property name of the port.
97+
* `EXAMPLE-PROTOCOL`: Replace with the property name of the transport protocol.
98+
99+
1. Remove any form types that allowed operators to configure tile-specific syslog configuration. Enabling the Ops Manager syslog feature will provide your tile with its own form.
100+
101+
1. Remove the syslog BOSH release from your tile. Ops Manager will ensure that this release is automatically injected into the instance groups of your product.
102+
103+
1. Remove any syslog configuration properties from your deployment manifest. Ops Manager will include those properties when it injects the syslog release into the product.
104+
105+
1. Mark all existing syslog configuration properties in your product as non-configurable. This will ensure that operators do not try to update them when they will have no outward functionality. You may want to update the description for these properties to state that they are deprecated and are no longer used to configure syslog.
106+
107+
1. Run a [test deploy](./testing.html) of your tile. Ensure that the syslog properties that were originally managed by your product are successfully migrated into the Ops Manager syslog configuration. You can see the configuration on the "Syslog" form or by visiting the `/api/v0/staged/products/PRODUCT-GUID/syslog_configuration` API endpoint.
108+
109+
1. At a later point, in a subsequent version of your product, you will want to remove all of the deprecated syslog configuration properties.

0 commit comments

Comments
 (0)