Skip to content

Commit fc365f6

Browse files
digot007dingmeng-xueLei Jin
authored
Made changes in the registration to onboard nodes to Azure Arc (#15021)
* Made changes in the registration to onboard nodes to Azure Arc Registering On-Premises Azure Stack HCI with Azure will also make the nodes in the cluster Azure Arc enabled. * Change default EnableAzureArcServer to $false Change EnableAzureArcServer to $false. We will make it default behaviour by S187 release. * Updated Az.StackHCI BreakingChangeIssues.csv Updated Az.StackHCI BreakingChangeIssues.csv as per recommendation * Update BreakingChangeIssues.csv * Remove serializedcmdlets for StackHCI since it is install in preview Co-authored-by: Dingmeng Xue <[email protected]> Co-authored-by: Lei Jin <[email protected]>
1 parent d74f46b commit fc365f6

File tree

6 files changed

+1048
-1618
lines changed

6 files changed

+1048
-1618
lines changed

src/StackHCI/Az.StackHCI.psm1

Lines changed: 976 additions & 138 deletions
Large diffs are not rendered by default.

src/StackHCI/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Made changes in the registration to onboard nodes to Azure Arc.
22+
- Registering On-Premises Azure Stack HCI with Azure will also make the nodes in the cluster Azure Arc enabled.
2123

2224
## Version 0.6.0
2325
* Fixed addition of assigned roles list.

src/StackHCI/help/Register-AzStackHCI.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Register-AzStackHCI [-SubscriptionId] <String> [[-Region] <String>] [[-ResourceN
1717
[[-Tag] <Hashtable>] [[-TenantId] <String>] [[-ResourceGroupName] <String>] [[-ArmAccessToken] <String>]
1818
[[-GraphAccessToken] <String>] [[-AccountId] <String>] [[-EnvironmentName] <String>]
1919
[[-ComputerName] <String>] [[-CertificateThumbprint] <String>] [-RepairRegistration]
20-
[-UseDeviceAuthentication] [[-Credential] <PSCredential>] [<CommonParameters>]
20+
[-UseDeviceAuthentication] [-EnableAzureArcServer] [[-Credential] <PSCredential>] [<CommonParameters>]
2121
```
2222

2323
## DESCRIPTION
@@ -149,6 +149,21 @@ Accept pipeline input: False
149149
Accept wildcard characters: False
150150
```
151151
152+
### -EnableAzureArcServer
153+
Specifying this parameter to $false will skip registering the cluster nodes with Arc for servers.
154+
155+
```yaml
156+
Type: System.Management.Automation.SwitchParameter
157+
Parameter Sets: (All)
158+
Aliases:
159+
160+
Required: False
161+
Position: Named
162+
Default value: True
163+
Accept pipeline input: False
164+
Accept wildcard characters: False
165+
```
166+
152167
### -EnvironmentName
153168
Specifies the Azure Environment.
154169
Default is AzureCloud.

src/StackHCI/help/Unregister-AzStackHCI.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ The registered information available on the cluster is used to unregister the cl
1616
```
1717
Unregister-AzStackHCI [[-SubscriptionId] <String>] [[-ResourceName] <String>] [[-TenantId] <String>]
1818
[[-ResourceGroupName] <String>] [[-ArmAccessToken] <String>] [[-GraphAccessToken] <String>]
19-
[[-AccountId] <String>] [[-EnvironmentName] <String>] [[-ComputerName] <String>] [-UseDeviceAuthentication]
20-
[[-Credential] <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
19+
[[-AccountId] <String>] [[-EnvironmentName] <String>] [[-Region] <String>] [[-ComputerName] <String>]
20+
[-UseDeviceAuthentication] [-DisableOnlyAzureArcServer] [[-Credential] <PSCredential>] [-Force] [-WhatIf]
21+
[-Confirm] [<CommonParameters>]
2122
```
2223

2324
## DESCRIPTION
@@ -31,27 +32,31 @@ The registered information available on the cluster is used to unregister the cl
3132
C:\PS\>Unregister-AzStackHCI
3233
Result: Success
3334
```
35+
3436
Invoking on one of the cluster node
3537

3638
### EXAMPLE 2
3739
```powershell
3840
C:\PS\>Unregister-AzStackHCI -ComputerName ClusterNode1
3941
Result: Success
4042
```
43+
4144
Invoking from the management node
4245

4346
### EXAMPLE 3
4447
```powershell
4548
C:\PS\>Unregister-AzStackHCI -SubscriptionId "12a0f531-56cb-4340-9501-257726d741fd" -ArmAccessToken etyer..ere= -GraphAccessToken acyee..rerrer -AccountId [email protected] -ResourceName DemoHCICluster3 -ResourceGroupName DemoHCIRG -Confirm:$False
4649
Result: Success
4750
```
51+
4852
Invoking from WAC
4953

5054
### EXAMPLE 4
5155
```powershell
5256
C:\PS\>Unregister-AzStackHCI -SubscriptionId "12a0f531-56cb-4340-9501-257726d741fd" -ResourceName HciCluster1 -TenantId "c31c0dbb-ce27-4c78-ad26-a5f717c14557" -ResourceGroupName HciClusterRG -ArmAccessToken eerrer..ere= -GraphAccessToken acee..rerrer -AccountId [email protected] -EnvironmentName AzureCloud -ComputerName node1hci -Credential Get-Credential
5357
Result: Success
5458
```
59+
5560
Invoking with all the parameters
5661

5762
## PARAMETERS
@@ -97,7 +102,7 @@ Parameter Sets: (All)
97102
Aliases:
98103

99104
Required: False
100-
Position: 9
105+
Position: 10
101106
Default value: None
102107
Accept pipeline input: False
103108
Accept wildcard characters: False
@@ -113,12 +118,27 @@ Parameter Sets: (All)
113118
Aliases:
114119

115120
Required: False
116-
Position: 10
121+
Position: 11
117122
Default value: None
118123
Accept pipeline input: False
119124
Accept wildcard characters: False
120125
```
121126
127+
### -DisableOnlyAzureArcServer
128+
Specifying this parameter to $true will only unregister the cluster nodes with Arc for servers and Azure Stack HCI registration will not be altered.
129+
130+
```yaml
131+
Type: System.Management.Automation.SwitchParameter
132+
Parameter Sets: (All)
133+
Aliases:
134+
135+
Required: False
136+
Position: Named
137+
Default value: False
138+
Accept pipeline input: False
139+
Accept wildcard characters: False
140+
```
141+
122142
### -EnvironmentName
123143
Specifies the Azure Environment.
124144
Default is AzureCloud.
@@ -136,6 +156,21 @@ Accept pipeline input: False
136156
Accept wildcard characters: False
137157
```
138158
159+
### -Force
160+
Specifies that unregistration should continue even if we could not delete the Arc extensions on the nodes.
161+
162+
```yaml
163+
Type: System.Management.Automation.SwitchParameter
164+
Parameter Sets: (All)
165+
Aliases:
166+
167+
Required: False
168+
Position: Named
169+
Default value: False
170+
Accept pipeline input: False
171+
Accept wildcard characters: False
172+
```
173+
139174
### -GraphAccessToken
140175
Specifies the Graph access token.
141176
Specifying this along with ArmAccessToken and AccountId will avoid Azure interactive logon.
@@ -152,6 +187,21 @@ Accept pipeline input: False
152187
Accept wildcard characters: False
153188
```
154189
190+
### -Region
191+
Specifies the Region the resource is created in Azure.
192+
193+
```yaml
194+
Type: System.String
195+
Parameter Sets: (All)
196+
Aliases:
197+
198+
Required: False
199+
Position: 9
200+
Default value: None
201+
Accept pipeline input: False
202+
Accept wildcard characters: False
203+
```
204+
155205
### -ResourceGroupName
156206
Specifies the Azure Resource Group name.
157207
If not specified \<LocalClusterName\>-rg will be used as resource group name.

tools/StaticAnalysis/Exceptions/Az.StackHCI/BreakingChangeIssues.csv

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)