Skip to content

Commit 198e34e

Browse files
authored
Merge pull request #301840 from msftadam/patch-84
Update configuration-guide.md
2 parents dd5f532 + 00508a6 commit 198e34e

File tree

1 file changed

+91
-24
lines changed

1 file changed

+91
-24
lines changed

articles/operator-service-manager/configuration-guide.md

Lines changed: 91 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,82 @@ ms.topic: best-practice
88
ms.service: azure-operator-service-manager
99
---
1010

11-
# Azure Operator Service Manager best practices for configuration groups
12-
This article provides guidelines that NF vendors, telco operators, and their partners can follow to optimize the design of configuration group schemes and the operation of configuration group values. Keep these practices in mind when you onboard and deploy your NFs.
11+
# Workload configuration management
12+
This article provides Azure Operator Service Manager (AOSM) guidelines to optimize the design of configuration group schemas (CGS) and the operation of configuration group values (CGV). NF vendors, telco operators, and their partners should keep these practices in mind when onboarding and deploying NFs.
13+
14+
## What is JSON schema?
15+
JSON Schema is an Internet Engineering Task Force (IETF) standard providing a format for what JSON data is required for a given application and how to interact with it. Applying such standards for a JSON document lets you enforce consistency and data validity across JSON data
16+
17+
### Where is JSON schema used?
18+
* AOSM service uses JSON schema notation as a meta-schema within CGS `ConfigurationGroupSchemaPropertiesFormat` object `schemaDefinition` properties.
19+
* AOSM service allows the designer and publisher to specify the JSON schema where operator must provide data (JSON Values) when instantiating an SNS/NF.
20+
* AOSM service allows the meta-schema properties be optional or required. Where a property is marked required, it must be specified in the values Json.
21+
22+
### What JSON keywords are supported?
23+
For the CGS meta-schema, AOSM implements supports for JSON standard keywords on a type by type basis.
24+
25+
* For object types, keyword supported is limited by filter policy. See JSON Schema - [object](https://json-schema.org/understanding-json-schema/reference/object)
26+
* For string types, keyword support isn't limited or filtered. See JSON Schema - [string](https://json-schema.org/understanding-json-schema/reference/string)
27+
* For numeric types, keyword support isn't limited or filtered. See JSON Schema - [numeric](https://json-schema.org/understanding-json-schema/reference/numeric)
28+
29+
## Optional and Required fields
30+
A property is declared optional by including a `required` keyword, which omits the optional property. If the `required` keyword isn't specified, then all properties are considered required. At least one required property type is needed to support an optional property type.
31+
32+
```json
33+
{
34+
"type": "object",
35+
"properties": {
36+
"abc": {
37+
"type": "integer",
38+
"default": 30
39+
},
40+
"xyz": {
41+
"type": "string",
42+
"default": "abc123"
43+
}
44+
}
45+
"required": ["abc"]
46+
}
47+
```
48+
49+
50+
## Defaults Values in JSON Schema
51+
For optional properties, AOSM implements a custom method of default value handling. When a default value is defined in CGS meta-schema, AOSM uses that value where the property is missing or undefined in the input CGV data. AOSM validator logic essentially hydrates the CGV value with the default value when no value is provided by operator.
52+
53+
### How to define defaults
54+
Defaults must be specified either inside properties or inside items of array. The following example demonstrates defaults with integer and trying property types.
55+
56+
```json
57+
{
58+
"type": "object",
59+
"properties": {
60+
"abc": {
61+
"type": "integer",
62+
"default": 30
63+
},
64+
"xyz": {
65+
"type": "string",
66+
"default": "abc123"
67+
}
68+
}
69+
}
70+
```
71+
72+
### Rules for defining defaults
73+
The following rules are applied when validating a default value. Consider these rules when using default values to ensure expected outcomes:
74+
75+
* A default value shouldn't be applied to a required property.
76+
* A default value is evaluated in top-down order, from where the keyword is first seen.
77+
* Where a property value exists in the input CGV, only children of those properties are evaluated for defaults.
78+
* Where a property value doesn't exist in the input CGV, it's evaluated for a default, along with any children.
79+
* Where a property value is type object, and neither it or it's key exist in the input CGV, then no defaults for the object are evaluated.
1380

1481
## Configuration Group Schema considerations
1582
We recommend that you always start with a single CGS for the entire NF. If there are site-specific or instance-specific parameters, we still recommend that you keep them in a single CGS. We recommend splitting into multiple CGSs when there are multiple components (rarely NFs, more commonly, infrastructure) or configurations that are shared across multiple NFs. The number of CGSs defines the number of CGVs.
1683

1784
### Scenario
1885

19-
- FluentD, Kibana, and Splunk (common third-party components) are always deployed for all NFs within an NSD. We recommend grouping these components into a single NFDG.
86+
- FluentD, Kibana, and Splunk (common third-party components) are always deployed for all NFs within a network service design (NSD). We recommend grouping these components into a single network function design group (NFDG).
2087
- NSD has multiple NFs that all share a few configurations (deployment location, publisher name, and a few chart configurations).
2188

2289
In this scenario, we recommend that you use a single global CGS to expose the common NF and third-party component configurations. You can define NF-specific CGS as needed.
@@ -32,43 +99,43 @@ In this scenario, we recommend that you use a single global CGS to expose the co
3299

33100
CGS payload:
34101

35-
<pre>
102+
```json
36103
{
37-
  "type": "object",
38-
  "properties": {
39-
    "abc": {
40-
    "type": "integer",
41-
    <b>"default": 30</b>
42-
    },
43-
    "xyz": {
44-
    "type": "integer",
45-
    <b>"default": 40</b>
46-
    },
47-
    "qwe": {
48-
    "type": "integer" //doesn't have defaults
49-
    }
50-
  }
51-
  "required": "qwe"
104+
"type": "object",
105+
"properties": {
106+
"abc": {
107+
"type": "integer",
108+
"default": 30
109+
},
110+
"xyz": {
111+
"type": "integer",
112+
"default": 40
113+
},
114+
"qwe": {
115+
"type": "integer"
116+
}
117+
}
118+
"required": "qwe"
52119
}
53-
</pre>
120+
```
54121

55122
Corresponding CGV payload passed by the operator:
56123

57-
<pre>
124+
```json
58125
{
59126
"qwe": 20
60127
}
61-
</pre>
128+
```
62129

63130
Resulting CGV payload generated by Azure Operator Service Manager:
64131

65-
<pre>
132+
```json
66133
{
67134
"abc": 30,
68135
"xyz": 40,
69136
"qwe": 20
70137
}
71-
</pre>
138+
```
72139

73140
## Configuration Group Values considerations
74141

0 commit comments

Comments
 (0)