Skip to content

Commit 9b62cdf

Browse files
committed
describe how to manage identities for Cluster Manager and reorganize page to include Powershell examples
1 parent f6b3e44 commit 9b62cdf

File tree

1 file changed

+166
-63
lines changed

1 file changed

+166
-63
lines changed

articles/operator-nexus/howto-cluster-manager.md

Lines changed: 166 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ The role assignment can be done via the Azure portal:
7171

7272
## Create a Cluster Manager
7373

74-
### Create the Cluster Manager using Azure CLI:
74+
Use the below commands to create a Cluster Manager.
7575

76-
Use the `az networkcloud clustermanager create` command to create a Cluster Manager. This command creates a new Cluster Manager or updates the properties of the Cluster Manager if it exists. If you have multiple Azure subscriptions, select the appropriate subscription ID using the [az account set](/cli/azure/account#az-account-set) command.
76+
### [Azure CLI](#tab/azure-cli)
7777

78-
```azurecli
78+
```azurecli-interactive
7979
az networkcloud clustermanager create \
8080
--name "$CLUSTER_MANAGER_NAME" \
8181
--location "$LOCATION" \
@@ -87,34 +87,54 @@ az networkcloud clustermanager create \
8787
--subscription "$SUB_ID"
8888
```
8989

90-
- **Arguments**
91-
- **--name -n [Required]** - The name of the Cluster Manager.
92-
- **--fabric-controller-id [Required]** - The resource ID of the Network Fabric Controller that is associated with the Cluster Manager.
93-
- **--resource-group -g [Required]** - Name of resource group. You can configure the default resource group using `az configure --defaults group=<name>`.
94-
- **--analytics-workspace-id** - The resource ID of the Log Analytics Workspace that is used for the logs collection
95-
- **--location -l** - Location. Azure region where the Cluster Manager is created. Values from: `az account list -locations`. You can configure the default location using `az configure --defaults location="$LOCATION"`.
96-
- **--managed-resource-group-configuration** - The configuration of the managed resource group associated with the resource.
97-
- Usage: --managed-resource-group-configuration location=XX name=XX
98-
- location: The region of the managed resource group. If not specified, the region of the
99-
parent resource is chosen.
100-
- name: The name for the managed resource group. If not specified, a unique name is
101-
automatically generated.
102-
- **wait/--no-wait** - Wait for command to complete or don't wait for the long-running operation to finish.
103-
- **--tags** - Space-separated tags: key[=value] [key[=value]...]. Use '' to clear existing tags
104-
- **--subscription** - Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
105-
- **--mi-system-assigned** - Enable System-assigned managed identity. Once added, the Identity can only be removed via the API call at this time.
106-
- **--mi-user-assigned** - Space-separated resource IDs of the User-assigned managed identities to be added. Once added, the Identity can only be removed via the API call at this time.
107-
108-
### Create the Cluster Manager using Azure Resource Manager template editor:
109-
110-
An alternate way to create a Cluster Manager is with the ARM template editor.
111-
112-
In order to create the cluster this way, you need to provide a template file (clusterManager.jsonc) and a parameter file (clusterManager.parameters.jsonc).
90+
Arguments:
91+
- **--name -n [Required]** - The name of the Cluster Manager.
92+
- **--fabric-controller-id [Required]** - The resource ID of the Network Fabric Controller that is associated with the Cluster Manager.
93+
- **--resource-group -g [Required]** - Name of resource group. You can configure the default resource group using `az configure --defaults group=<name>`.
94+
- **--analytics-workspace-id** - The resource ID of the Log Analytics Workspace that is used for the logs collection
95+
- **--location -l** - Location. Azure region where the Cluster Manager is created. Values from: `az account list -locations`. You can configure the default location using `az configure --defaults location="$LOCATION"`.
96+
- **--managed-resource-group-configuration** - The configuration of the managed resource group associated with the resource.
97+
- Usage: --managed-resource-group-configuration location=XX name=XX
98+
- location: The region of the managed resource group. If not specified, the region of the
99+
parent resource is chosen.
100+
- name: The name for the managed resource group. If not specified, a unique name is
101+
automatically generated.
102+
- **wait/--no-wait** - Wait for command to complete or don't wait for the long-running operation to finish.
103+
- **--tags** - Space-separated tags: key[=value] [key[=value]...]. Use '' to clear existing tags
104+
- **--subscription** - Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
105+
- **--mi-system-assigned** - Enable System-assigned managed identity.
106+
- **--mi-user-assigned** - Space-separated resource IDs of the User-assigned managed identities to be added.
107+
- **--if-match**/**if-none-match** - Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. The ETag is returned as the resource property once the resource is created and can be used on the update operations.
113108

114-
You can find examples of these two files here:
109+
### [Azure PowerShell](#tab/azure-powershell)
110+
111+
```azurepowershell-interactive
112+
$tagHash = @{
113+
tag1 = "true"
114+
tag2 = "false"
115+
}
116+
117+
New-AzNetworkCloudClusterManager -Name "$CLUSTER_MANAGER_NAME -Location $LOCATION -ResourceGroupName $CLUSTER_MANAGER_RG -SubscriptionId $SUB_ID -AnalyticsWorkspaceId $LAW_NAME -ManagedResourceGroupConfigurationName $MRG_NAME -ManagedResourceGroupConfigurationLocation $MRG_LOCATION -FabricControllerId $NFC_ID -Tag $tagHash
118+
```
115119

116-
[clusterManager.jsonc](./clusterManager-jsonc-example.md) ,
117-
[clusterManager.parameters.jsonc](./clusterManager-parameters-jsonc-example.md)
120+
Parameters:
121+
- **-Name** - The name of the cluster manager.
122+
- **-ResourceGroupName** - The name of the resource group.
123+
- **-SubscriptionId** - The ID of the target subscription.
124+
- **-FabricControllerId** - The resource ID of the fabric controller that has one to one mapping with the cluster manager.
125+
- **-Location** - The geo-location where the resource lives.
126+
- **-AnalyticsWorkspaceId** - The resource ID of the Log Analytics workspace that is used for the logs collection.
127+
- **-ManagedResourceGroupConfigurationLocation** - The location of the managed resource group. If not specified, the location of the parent resource is chosen.
128+
- **-ManagedResourceGroupConfigurationName** - The name for the managed resource group. If not specified, the unique name is automatically generated.
129+
- **-Tag** - Hashtable of Resource tags.
130+
131+
### [ARM Template](#tab/template)
132+
133+
To create a Cluster Manager via ARM Template, you need to provide a template file (clusterManager.jsonc) and a parameter file (clusterManager.parameters.jsonc).
134+
135+
You can find examples of these two files here:
136+
- [clusterManager.jsonc](./clusterManager-jsonc-example.md)
137+
- [clusterManager.parameters.jsonc](./clusterManager-parameters-jsonc-example.md)
118138

119139
>[!NOTE]
120140
>To get the correct formatting, copy the raw code file. The values within the clusterManager.parameters.jsonc file are customer specific and may not be a complete list. Please update the value fields for your specific environment.
@@ -132,70 +152,140 @@ You can find examples of these two files here:
132152
1. Make sure all Instance Details are correct.
133153
1. Click Review + create.
134154

155+
---
135156

136157
## List/show Cluster Manager(s)
137158

138159
List and show commands are used to get a list of existing Cluster Managers or the properties of a specific Cluster Manager.
139160

140-
### List Cluster Managers in resource group
161+
### [Azure CLI](#tab/azure-cli)
141162

142163
This command lists the Cluster Managers in the specified Resource group.
143164

144-
```azurecli
165+
```azurecli-interactive
145166
az networkcloud clustermanager list --resource-group "$CLUSTER_MANAGER_RG"
146167
```
147168

148-
### List Cluster Managers in subscription
149-
150169
This command lists the Cluster Managers in the specified subscription.
151170

152-
```azurecli
171+
```azurecli-interactive
153172
az networkcloud clustermanager list --subscription "$SUB_ID"
154173
```
155174

156-
### Show Cluster Manager properties
157-
158-
This command lists the properties of the specified Cluster Manager.
175+
This command shows the properties of the specified Cluster Manager.
159176

160-
```azurecli
177+
```azurecli-interactive
161178
az networkcloud clustermanager show \
162179
--name "$CLUSTER_MANAGER_NAME" \
163180
--resource-group "$CLUSTER_MANAGER_RG" \
164181
--subscription "$SUB_ID"
165182
```
166183

167-
### List/show command arguments
184+
### [Azure PowerShell](#tab/azure-powershell)
168185

169-
- **--name -n** - The name of the Cluster Manager.
170-
- **--IDs** - One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource ID' arguments.
171-
- **--resource-group -g** - Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
172-
- **--subscription** - Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
186+
This command lists the Cluster Managers in the specified Resource group.
187+
188+
```azurepowershell-interactive
189+
Get-AzNetworkCloudClusterManager -ResourceGroupName "$CLUSTER_MANAGER_RG"
190+
```
191+
192+
This command lists the Cluster Managers in the specified subscription.
193+
194+
```azurepowershell-interactive
195+
Get-AzNetworkCloudClusterManager -SubscriptionId "$SUB_ID"
196+
```
197+
198+
This command shows the properties of the specified Cluster Manager in Json format.
199+
200+
```azurepowershell-interactive
201+
Get-AzNetworkCloudClusterManager -Name "$CLUSTER_MANAGER_NAME" -ResourceGroupName "$CLUSTER_MANAGER_RG" -SubscriptionId "$SUB_ID" | ConvertTo-Json
202+
```
203+
204+
---
173205

174206
## Update Cluster Manager
175207

176208
This command is used to patch properties of the provided Cluster Manager, or update the tags assigned to the Cluster Manager. Properties and tag updates can be done independently.
177209

178-
```azurecli
210+
### [Azure CLI](#tab/azure-cli)
211+
212+
This command updates the Cluster Managers in the specified Resource group.
213+
214+
```azurecli-interactive
179215
az networkcloud clustermanager update \
180216
--name "$CLUSTER_MANAGER_NAME" \
181217
--tags $TAG_KEY1="$TAG_VALUE1" $TAG_KEY2="$TAG_VALUE2" \
182218
--resource-group "$CLUSTER_MANAGER_RG" \
183219
--subscription "$SUB_ID"
184220
```
185221

186-
- **Arguments**
187-
- **--tags** - TSpace-separated tags: key[=value] [key[=value] ...]. Use '' to clear existing tags.
188-
- **--name -n** - The name of the Cluster Manager.
189-
- **--IDs** - One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource ID' arguments.
190-
- **--resource-group -g** - Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
191-
- **--subscription** - Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
192-
- **--mi-system-assigned** - Enable System-assigned managed identity. Once added, the Identity can only be removed via the API call at this time.
193-
- **--mi-user-assigned** - Space-separated resource IDs of the User-assigned managed identities to be added. Once added, the Identity can only be removed via the API call at this time.
222+
### [Azure PowerShell](#tab/azure-powershell)
194223

195-
### Update Cluster Manager Identities via APIs
224+
```azurepowershell-interactive
225+
$tagHash = @{
226+
tag1 = "true"
227+
tag2 = "false"
228+
}
196229
197-
Cluster Manager managed identities can be assigned via CLI. The un-assignment of the identities can be done via API calls.
198-
Note, `<APIVersion>` is the API version 2024-07-01 or newer.
230+
Update-AzNetworkCloudClusterManager -Name "$CLUSTER_MANAGER_NAME -ResourceGroupName $CLUSTER_MANAGER_RG -SubscriptionId $SUB_ID -Tag $tagHash
231+
```
232+
233+
### Update Cluster Manager Identities
234+
235+
Cluster Manager identity can be managed via CLI using `az networkcloud clustermanager identity` commands.
236+
237+
### [Azure CLI](#tab/azure-cli)
238+
239+
This command shows the currently assigned identities:
240+
241+
```azurecli-interactive
242+
az networkcloud clustermanager identity show \
243+
--name "$CLUSTER_MANAGER_NAME" \
244+
--resource-group "$CLUSTER_MANAGER_RG" \
245+
--subscription "$SUB_ID"
246+
```
247+
248+
This command adds a new user-assigned identity:
249+
250+
```azurecli-interactive
251+
az networkcloud clustermanager identity assign \
252+
--name "$CLUSTER_MANAGER_NAME" \
253+
--resource-group "$CLUSTER_MANAGER_RG" \
254+
--subscription "$SUB_ID"
255+
--mi-user-assigned "$UAI_RESOURCE_ID"
256+
```
257+
258+
This command add a system-assigned identity:
259+
260+
```azurecli-interactive
261+
az networkcloud clustermanager identity assign \
262+
--name "$CLUSTER_MANAGER_NAME" \
263+
--resource-group "$CLUSTER_MANAGER_RG" \
264+
--subscription "$SUB_ID"
265+
--mi-system-assigned
266+
```
267+
268+
This command removed the earlier added user-assigned identity:
269+
270+
```azurecli-interactive
271+
az networkcloud clustermanager identity remove \
272+
--name "$CLUSTER_MANAGER_NAME" \
273+
--resource-group "$CLUSTER_MANAGER_RG" \
274+
--subscription "$SUB_ID"
275+
--mi-user-assigned "$UAI_RESOURCE_ID"
276+
```
277+
278+
This command removes the earlier added system-assigned identity:
279+
280+
```azurecli-interactive
281+
az networkcloud clustermanager identity remove \
282+
--name "$CLUSTER_MANAGER_NAME" \
283+
--resource-group "$CLUSTER_MANAGER_RG" \
284+
--subscription "$SUB_ID"
285+
--mi-system-assigned
286+
```
287+
288+
### [Azure APIs](#tab/azure-api)
199289

200290
- To remove all managed identities, execute:
201291

@@ -257,28 +347,41 @@ Note, `<APIVersion>` is the API version 2024-07-01 or newer.
257347
}
258348
```
259349

350+
---
351+
260352
## Delete Cluster Manager
261353

262354
This command is used to Delete the provided Cluster Manager.
263355

264356
> [!Warning]
265357
> A Cluster Manager that has an existing associated Network Fabric Controller, or any Clusters that reference this Cluster Manager may not be deleted.
266358
267-
```azurecli
359+
### [Azure CLI](#tab/azure-cli)
360+
361+
```azurecli-interactive
268362
az networkcloud clustermanager delete \
269363
--name "$CLUSTER_MANAGER_NAME" \
270364
--resource-group "$CLUSTER_MANAGER_RG" \
271365
--subscription "$SUB_ID"
272366
```
273367

274-
- **Arguments**
275-
- **--no-wait** - Don't wait for the long-running operation to complete.
276-
- **--yes -y** - Don't prompt for confirmation.
277-
- **--name -n** - The name of the Cluster Manager.
278-
- **--IDs** - One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource ID' arguments.
279-
- **--resource-group -g** - Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
280-
- **--subscription** - Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
368+
### [Azure PowerShell](#tab/azure-powershell)
369+
370+
```azurepowershell-interactive
371+
$tagHash = @{
372+
tag1 = "true"
373+
tag2 = "false"
374+
}
375+
376+
Remove-AzNetworkCloudClusterManager -Name "$CLUSTER_MANAGER_NAME -ResourceGroupName $CLUSTER_MANAGER_RG -SubscriptionId $SUB_ID
377+
```
281378

282379
## Next steps
283380

284381
After you successfully created the Network Fabric Controller and the Cluster Manager, the next step is to create a [Network Fabric](./howto-configure-network-fabric.md).
382+
383+
## Useful links
384+
385+
- [NetworkCloud REST APIs Reference](https://learn.microsoft.com/en-us/rest/api/networkcloud/)
386+
- [NetworkCloud PowerShell Reference](https://learn.microsoft.com/en-us/powershell/module/az.networkcloud/)
387+

0 commit comments

Comments
 (0)