Skip to content

Commit 853e240

Browse files
authored
Update safe-upgrade-practices.md
updates for publisher and appenable
1 parent 61c48c9 commit 853e240

File tree

1 file changed

+10
-176
lines changed

1 file changed

+10
-176
lines changed

articles/operator-service-manager/safe-upgrade-practices.md

Lines changed: 10 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ Ultimately, the ability for a given service to be upgraded without interruption
5050
When planning for an upgrade using Azure Operator Service Manager, address the following requirements in advance of upgrade execution to optimize the time spent attempting the upgrade.
5151

5252
- Onboard updated artifacts using publisher and/or designer workflows.
53-
- Publisher, artifact store, network service design group (NSDG), and network function design group (NFDG) are immutabe and cannot change.
54-
- Changing one of these resources would require deployment of a new NF via put.
53+
- In most cases, use the existing publisher to host new version artifacts.
54+
- Using an existing publisher supports `helm upgrade` to update an SNS to a different version.
55+
- Using a new publisher requies a `helm delete` on the current SNS and then a `helm install` for the new SNS version.
56+
- Artifact store, network service design group (NSDG), and network function design group (NFDG) are immutabe and cannot change.
57+
- Changing one of these resources requires deployment of a new SNS.
5558
- A new artifact manifest is needed to store the new charts and images.
56-
- For more information, see [onboarding documentation](how-to-manage-artifacts-nexus.md) for details on uploading new charts and images.
59+
- See [onboarding documentation](how-to-manage-artifacts-nexus.md) for details on uploading new charts and images.
5760
- A new NFDV, and optionally network service design version (NSDV), is needed.
58-
- We cover basic changes to the NFDV in the step by step section.
61+
- NFDV changes can be complex, we cover only basic changes in this article.
5962
- New NSDV is only required if a new configuration group schema (CGS) version is being introduced.
6063
- If necessary, new CGS.
6164
- Required if an upgrade introduces new exposed configuration parameters.
@@ -107,209 +110,40 @@ By default, the reput retries nfApps in the declared update order, unless they a
107110
In the NFDV resource, under `deployParametersMappingRuleProfile` there is the property `applicationEnablement` of type enum, which takes values: Unknown, Enabled, or disabled. It can be used to exclude nfApp operations during network function (NF) deployment.
108111

109112
### Publisher changes
110-
For the `applicationEnablement` property, the publisher has two options: either provide a default value or parameterize it.
111-
112-
#### Sample NFDV
113-
The NFDV is used by publisher to set default values for applicationEnablement.
113+
For the `applicationEnablement` property, the publisher has two options: either provide a default value or parameterize it. In the following example, we have provided a default value for `hellotest` which can later be used in an override.
114114

115115
```json
116116
{
117117
"location":"<location>",
118118
"properties": {
119119
"networkFunctionTemplate": {
120120
"networkFunctionApplications": [
121-
{
122-
"artifactProfile": {
123-
"helmArtifactProfile": {
124-
"var":"var"
125-
},
126-
"artifactStore": {
127-
"id": "<artifactStore id>"
128-
}
129-
},
130121
"deployParametersMappingRuleProfile": {
131-
"helmMappingRuleProfile": {
132-
"releaseNamespace": "{deployParameters.role1releasenamespace}",
133-
"releaseName": "{deployParameters.role1releasename}"
134-
},
135122
"applicationEnablement": "Enabled"
136123
},
137-
"artifactType": "HelmPackage",
138-
"dependsOnProfile": "null",
139124
"name": "hellotest"
140-
},
141-
{
142-
"artifactProfile": {
143-
"helmArtifactProfile": {
144-
"var":"var"
145-
},
146-
"artifactStore": {
147-
"id": "<artifactStore id>"
148-
}
149-
},
150-
"deployParametersMappingRuleProfile": {
151-
"helmMappingRuleProfile": {
152-
"releaseNamespace": "{deployParameters.role2releasenamespace}",
153-
"releaseName": "{deployParameters.role2releasename}"
154-
},
155-
"applicationEnablement": "Enabled"
156-
},
157-
"artifactType": "HelmPackage",
158-
"dependsOnProfile": "null",
159-
"name": "hellotest1"
160125
}
161126
],
162127
"nfviType": "AzureArcKubernetes"
163128
},
164-
"description": "null",
165-
"deployParameters": {"type":"object","properties":{"role1releasenamespace":{"type":"string"},"role1releasename":{"type":"string"},"role2releasenamespace":{"type":"string"},"role2releasename":{"type":"string"}},"required":["role1releasenamespace","role1releasename","role2releasenamespace","role2releasename"]},
166-
"networkFunctionType": "ContainerizedNetworkFunction"
167-
}
168-
}
169-
```
170-
171-
#### Sample configuration group schema (CGS) resource
172-
The CGS is used by the publisher to require a `roleOverrideValues` variable to be provided by Operator at run-time. `roleOverrideValues` can include nondefault settings for `applicationEnablement`.
173-
174-
```json
175-
{
176-
"type": "object",
177-
"properties": {
178-
"location": {
179-
"type": "string"
180-
},
181-
"nfviType": {
182-
"type": "string"
183-
},
184-
"nfdvId": {
185-
"type": "string"
186-
},
187-
"helloworld-cnf-config": {
188-
"type": "object",
189-
"properties": {
190-
"role1releasenamespace": {
191-
"type": "string"
192-
},
193-
"role1releasename": {
194-
"type": "string"
195-
},
196-
"role2releasenamespace": {
197-
"type": "string"
198-
},
199-
"role2releasename": {
200-
"type": "string"
201-
},
202-
"roleOverrideValues1": {
203-
"type": "string"
204-
},
205-
"roleOverrideValues2": {
206-
"type": "string"
207-
}
208-
},
209-
"required": [
210-
"role1releasenamespace",
211-
"role1releasename",
212-
"role2releasenamespace",
213-
"role2releasename",
214-
"roleOverrideValues1",
215-
"roleOverrideValues2"
216-
]
217129
}
218-
},
219-
"required": [
220-
"nfviType",
221-
"nfdvId",
222-
"location",
223-
"helloworld-cnf-config"
224-
]
225130
}
226131
```
227132

228133
### Operator changes
229-
Operators inherit default `applicationEnablement` values as defined by the NFDV. If `applicationEnablement` is parameterized in CGS, then it must be passed through the `deploymentValues` property at runtime.
230-
231-
#### Sample configuration group value (CGV) resource
232-
The CGV is used by the operator to set the `roleOverrideValues` variable at run-time. `roleOverrideValues` include nondefault settings for `applicationEnablement`.
134+
Operators inherit default `applicationEnablement` values as defined by the NFDV. If `applicationEnablement` is parameterized, then it can be passed through the `deploymentValues` property at runtime using the CGV. `roleOverrideValues` specifies a nondefault setting for `applicationEnablement`.
233135

234136
```json
235137
{
236138
"location": "<location>",
237139
"nfviType": "AzureArcKubernetes",
238140
"nfdvId": "<nfdv_id>",
239141
"helloworld-cnf-config": {
240-
"role1releasenamespace": "hello-test-releasens",
241-
"role1releasename": "hello-test-release",
242-
"role2releasenamespace": "hello-test-2-releasens",
243-
"role2releasename": "hello-test-2-release",
244-
"roleOverrideValues1": "{\"name\":\"hellotest\",\"deployParametersMappingRuleProfile\":{\"applicationEnablement\":\"Enabled\",\"helmMappingRuleProfile\":{\"releaseName\":\"override-release\",\"releaseNamespace\":\"override-namespace\",\"helmPackageVersion\":\"1.0.0\",\"values\":\"\",\"options\":{\"installOptions\":{\"atomic\":\"true\",\"wait\":\"true\",\"timeout\":\"30\",\"injectArtifactStoreDetails\":\"true\"},\"upgradeOptions\":{\"atomic\":\"true\",\"wait\":\"true\",\"timeout\":\"30\",\"injectArtifactStoreDetails\":\"true\"}}}}}",
245-
"roleOverrideValues2": "{\"name\":\"hellotest1\",\"deployParametersMappingRuleProfile\":{\"applicationEnablement\" : \"Enabled\"}}"
142+
"roleOverrideValues1": "{\"name\":\"hellotest\",\"deployParametersMappingRuleProfile\":{\"applicationEnablement\":\"Disable\"}}",
246143
}
247144
}
248145
```
249146

250-
#### Sample NF ARM template
251-
The NF ARM template is used by operator to submit the `roleOverrideValues` variable, set by CGV, to the resource provider (RP). The operator can change the `applicationEnablement` setting in CGV, as needed, and resubmit the same NF ARM template, to alter behavior between iterations.
252-
253-
```json
254-
{
255-
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
256-
"contentVersion": "1.0.0.0",
257-
"parameters": {
258-
"nameValue": {
259-
"type": "string",
260-
"defaultValue": "HelloWorld"
261-
},
262-
"locationValue": {
263-
"type": "string",
264-
"defaultValue": "eastus"
265-
},
266-
"nfviTypeValue": {
267-
"type": "string",
268-
"defaultValue": "AzureArcKubernetes"
269-
},
270-
"nfviIdValue": {
271-
"type": "string"
272-
},
273-
"config": {
274-
"type": "object",
275-
"defaultValue": {}
276-
},
277-
"nfdvId": {
278-
"type": "string"
279-
}
280-
},
281-
"variables": {
282-
"deploymentValuesValue": "[string(createObject('role1releasenamespace', parameters('config').role1releasenamespace, 'role1releasename',parameters('config').role1releasename, 'role2releasenamespace', parameters('config').role2releasenamespace, 'role2releasename',parameters('config').role2releasename))]",
283-
"nfName": "[concat(parameters('nameValue'), '-CNF')]",
284-
"roleOverrideValues1": "[string(parameters('config').roleOverrideValues1)]",
285-
"roleOverrideValues2": "[string(parameters('config').roleOverrideValues2)]"
286-
},
287-
"resources": [
288-
{
289-
"type": "Microsoft.HybridNetwork/networkFunctions",
290-
"apiVersion": "2023-09-01",
291-
"name": "[variables('nfName')]",
292-
"location": "[parameters('locationValue')]",
293-
"properties": {
294-
"networkFunctionDefinitionVersionResourceReference": {
295-
"id": "[parameters('nfdvId')]",
296-
"idType": "Open"
297-
},
298-
"nfviType": "[parameters('nfviTypeValue')]",
299-
"nfviId": "[parameters('nfviIdValue')]",
300-
"allowSoftwareUpdate": true,
301-
"configurationType": "Open",
302-
"deploymentValues": "[string(variables('deploymentValuesValue'))]",
303-
"roleOverrideValues": [
304-
"[variables('roleOverrideValues1')]",
305-
"[variables('roleOverrideValues2')]"
306-
]
307-
}
308-
}
309-
]
310-
}
311-
```
312-
313147
## Skip nfApps which have no change
314148
The `skipUpgrade` feature is designed to optimize the time taken for CNF upgrades. When the publisher enables this flag in the `roleOverrideValues` under `upgradeOptions`, the AOSM service layer performs certain prechecks, to determine whether an upgrade for a specific `nfApplication` can be skipped. If all precheck criteria are met, the upgrade is skipped for that application. Otherwise, an upgrade is executed at the cluster level.
315149

0 commit comments

Comments
 (0)