Skip to content

Commit 13803a9

Browse files
Migrate Workloads from generation to main (#25156)
* Move Workloads to main * Update ChangeLog.md --------- Co-authored-by: NoriZC <[email protected]>
1 parent 85e3140 commit 13803a9

File tree

80 files changed

+2969
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2969
-153
lines changed

src/Workloads/Workloads.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/New-AzWorkloadsSapVirtualInstance_CreateWithDiscovery.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ function New-AzWorkloadsSapVirtualInstance {
105105
[System.String]
106106
# Managed resource group name
107107
${ManagedResourceGroupName},
108+
109+
[Parameter()]
110+
[Microsoft.Azure.PowerShell.Cmdlets.Workloads.Category('Body')]
111+
[System.String]
112+
# Managed resource Network Access Type
113+
${ManagedResourcesNetworkAccessType},
108114

109115
[Parameter()]
110116
[Microsoft.Azure.PowerShell.Cmdlets.Workloads.Category('Body')]

src/Workloads/Workloads.Autorest/custom/New-AzWorkloadsSapVirtualInstance/New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ function New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath {
100100
# Managed resource group name
101101
${ManagedResourceGroupName},
102102

103+
[Parameter()]
104+
[Microsoft.Azure.PowerShell.Cmdlets.Workloads.Category('Body')]
105+
[System.String]
106+
# Managed resource Network Access Type
107+
${ManagedResourcesNetworkAccessType},
108+
103109
[Parameter()]
104110
[Microsoft.Azure.PowerShell.Cmdlets.Workloads.Category('Body')]
105111
[Microsoft.Azure.PowerShell.Cmdlets.Workloads.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Workloads.Models.Api30.ITrackedResourceTags]))]
@@ -216,6 +222,11 @@ function New-AzWorkloadsSapVirtualInstance_CreateWithJsonTemplatePath {
216222
$null = $PSBoundParameters.Remove('SapProduct');
217223
}
218224

225+
if($PSBoundParameters.ContainsKey('ManagedResourcesNetworkAccessType')) {
226+
$bodyHashTable.properties.managedResourcesNetworkAccessType = $ManagedResourcesNetworkAccessType.ToString()
227+
$null = $PSBoundParameters.Remove('ManagedResourcesNetworkAccessType');
228+
}
229+
219230
$bodyHashTable.properties.managedResourceGroupConfiguration = @{}
220231

221232
if($PSBoundParameters.ContainsKey('ManagedResourceGroupName')) {

src/Workloads/Workloads.Autorest/examples/New-AzWorkloadsSapVirtualInstance.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In this example, you Install the SAP software on the deployed infrastructure fo
5252

5353
### Example 5: Register an existing SAP system as a VIS
5454
```powershell
55-
New-AzWorkloadsSapVirtualInstance -ResourceGroupName 'TestRG' -Name L46 -Location eastus -Environment 'NonProd' -SapProduct 'S4HANA' -CentralServerVmId '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/powershell-cli-testrg/providers/microsoft.compute/virtualmachines/l46ascsvm' -Tag @{k1 = "v1"; k2 = "v2"} -ManagedResourceGroupName "L46-rg" -ManagedRgStorageAccountName 'acssstoragel46' -IdentityType 'UserAssigned' -UserAssignedIdentity @{'/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI'= @{}}
55+
New-AzWorkloadsSapVirtualInstance -ResourceGroupName 'TestRG' -Name L46 -Location eastus -Environment 'NonProd' -SapProduct 'S4HANA' -CentralServerVmId '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/powershell-cli-testrg/providers/microsoft.compute/virtualmachines/l46ascsvm' -Tag @{k1 = "v1"; k2 = "v2"} -IdentityType 'UserAssigned' -UserAssignedIdentity @{'/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI'= @{}}
5656
```
5757

5858
```output
@@ -63,3 +63,28 @@ L46 PowerShell-CLI-TestRG NonProd Succeeded S4HANA Regis
6363

6464
Use the New-AzWorkloadsSapVirtualInstance cmdlet with the suggested input parameters to register an existing SAP system as a Virtual Instance for SAP solutions resource.
6565

66+
### Example 6: Register an existing SAP system as a Virtual Instance for SAP solutions resource (VIS) with a custom Managed Resource Group and Managed Storage Account Name, and Managed Storage Account Network Access Type setting.
67+
```powershell
68+
New-AzWorkloadsSapVirtualInstance -ResourceGroupName 'TestRG' -Name L46 -Location eastus -Environment 'NonProd' -SapProduct 'S4HANA' -CentralServerVmId '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/powershell-cli-testrg/providers/microsoft.compute/virtualmachines/l46ascsvm' -Tag @{k1 = "v1"; k2 = "v2"} -ManagedResourceGroupName "L46-rg" -ManagedRgStorageAccountName 'acssstoragel46' -ManagedResourcesNetworkAccessType 'Private' -IdentityType 'UserAssigned' -UserAssignedIdentity @{'/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI'= @{}}
69+
```
70+
71+
```output
72+
Name ResourceGroupName Health Environment ProvisioningState SapProduct State Status Location
73+
---- ----------------- ------ ----------- ----------------- ---------- ----- ------ --------
74+
L46 PowerShell-CLI-TestRG NonProd Succeeded S4HANA RegistrationComplete eastus
75+
```
76+
77+
Use the New-AzWorkloadsSapVirtualInstance cmdlet with the suggested input parameters to register an existing SAP system as a Virtual Instance for SAP solutions resource with a custom Managed Resource Group and Managed Storage Account Name, and specify the Managed Storage Account Network Access Type setting as per your security requirements. Learn More: https://go.microsoft.com/fwlink/?linkid=2256933
78+
79+
### Example 7: Deploy infrastructure for a three-tier distributed Highly Available (HA) SAP system with Azure Compute Gallary Image
80+
```powershell
81+
New-AzWorkloadsSapVirtualInstance -ResourceGroupName 'PowerShell-CLI-TestRG' -Name SK1 -Location eastus -Environment 'NonProd' -SapProduct 'S4HANA' -Configuration .\CreatePayloadHACustomNames.json -IdentityType 'UserAssigned' -ManagedResourceGroupName "acss-mrg1" -UserAssignedIdentity @{'/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/SAP-E2ETest-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/E2E-RBAC-MSI'= @{}}
82+
```
83+
84+
```output
85+
Name ResourceGroupName Health Environment ProvisioningState SapProduct State Status Location
86+
---- ----------------- ------ ----------- ----------------- ---------- ----- ------ --------
87+
SK1 PowerShell-CLI-TestRG NonProd Succeeded S4HANA SoftwareInstallationPending eastus
88+
```
89+
90+
In this example, you Deploy infrastructure for a three-tier distributed Highly Available (HA) SAP system with Azure Compute Gallary Image. See sample json payload here: https://go.microsoft.com/fwlink/?linkid=2263420

src/Workloads/Workloads.Autorest/examples/Start-AzWorkloadsSapApplicationInstance.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ Target :
4646

4747
Start-AzWorkloadsSapApplicationInstance cmdlet starts the App server instance of the SAP system represented by the VIS. Currently, start action is supported for ABAP stack. In this example, you can see that instance can be started by passing the App server instance Azure resource ID as InputObject to the cmdlet.
4848

49+
### Example 3: Start Application server instance of the SAP system and its underlying Virtual Machine
50+
```powershell
51+
Start-AzWorkloadsSapApplicationInstance -Name app0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -StartVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 08:21:31
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/58527855-a695-48a5-ac11-fbc
60+
74b836859*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
61+
Message :
62+
Name : 58527855-a695-48a5-ac11-fbc74b836859*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 08:18:22
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Start-AzWorkloadsSapApplicationInstance cmdlet starts the App server instance of the SAP system and its underlying Virtual Machines represented by the VIS. Currently, start action is supported for ABAP stack. In this example, you can see that the VMs and instance can be started by passing the App server instance resource name, Resource Group name, VIS name and StartVM parameter as inputs.

src/Workloads/Workloads.Autorest/examples/Start-AzWorkloadsSapCentralInstance.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ Target :
4646

4747
Start-AzWorkloadsSapCentralInstance cmdlet starts the Central services instance of the SAP system represented by the VIS. Currently, start action is supported for ABAP central services stack. In this example, you can see that instance can be started by passing the Central services instance Azure resource ID as InputObject to the cmdlet.
4848

49+
### Example 3: Start Central services instance of the SAP system and its underlying Virtual Machine
50+
```powershell
51+
Start-AzWorkloadsSapCentralInstance -Name cs0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -StartVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 09:11:00
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/651c6f1b-db7
60+
b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
61+
Message :
62+
Name : 651c6f1b-db7b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 09:08:45
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Start-AzWorkloadsSapCentralInstance cmdlet starts the Central services instance of the SAP system and its underlying Virtual Machines represented by the VIS. Currently, start action is supported for ABAP central services stack. In this example, you can see that the VMs and instance can be started by passing the Central services instance resource name, Resource Group name, VIS name and StartVM parameter as inputs.

src/Workloads/Workloads.Autorest/examples/Start-AzWorkloadsSapDatabaseInstance.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ Target :
4646

4747
Start-AzWorkloadsSapDatabaseInstance cmdlet starts the Database instance of the SAP system represented by the VIS. Currently start action is supported for SAP HANA Database only. In this example, you can see that database can be started by providing the DB instance Azure resource ID as InputObject to the cmdlet.
4848

49+
### Example 3: Start Database instance of the SAP system and its underlying Virtual Machine
50+
```powershell
51+
Start-AzWorkloadsSapDatabaseInstance -Name db0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -StartVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 09:11:00
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/651c6f1b-db7
60+
b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
61+
Message :
62+
Name : 651c6f1b-db7b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 09:08:45
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Start-AzWorkloadsSapDatabaseInstance cmdlet starts the Database instance of the SAP system and its underlying Virtual Machine represented by the VIS. Currently start action is supported for SAP HANA Database only. In this example, you can see that the VMs and database can be started by passing the DB instance resource name, ResourceGroupName, VIS name and StartVM parameter as inputs.

src/Workloads/Workloads.Autorest/examples/Start-AzWorkloadsSapVirtualInstance.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ Target :
4646

4747
Start-AzWorkloadsSapVirtualInstance cmdlet starts the SAP application tier, that is ASCS instance and App servers of the system. In this example, you can see that system can be started by providing the VIS Azure resource ID as InputObject to the cmdlet.
4848

49+
### Example 3: Start an SAP system and its underlying Virtual Machine(s)
50+
```powershell
51+
Start-AzWorkloadsSapVirtualInstance -Name DB0 -ResourceGroupName db0-vis-rg -StartVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 09:11:00
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/651c6f1b-db7
60+
b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
61+
Message :
62+
Name : 651c6f1b-db7b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 09:08:45
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Start-AzWorkloadsSapVirtualInstance cmdlet starts the SAP application tier and its underlying Virtual Machines, that is ASCS instance and App servers of the system. In this example, you can see that VMs and SAP can be started by passing the VIS name, ResourceGroupName and StartVM parameter as inputs.

src/Workloads/Workloads.Autorest/examples/Stop-AzWorkloadsSapApplicationInstance.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,51 @@ Target :
4545
```
4646

4747
Stop-AzWorkloadsSapApplicationInstance cmdlet stops the App server instance of the SAP system represented by the VIS. Currently, stop action is supported for ABAP stack. In this example, you can see that instance can be stopped by passing the App server instance Azure resource ID as InputObject to the cmdlet.
48+
49+
### Example 3: Stop Application server instance of the SAP system and its underlying Virtual Machine
50+
```powershell
51+
Stop-AzWorkloadsSapApplicationInstance -Name app0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -DeallocateVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 08:45:40
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/881d4ff9-1d38-4596-b215-28e
60+
77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
61+
Message :
62+
Name : 881d4ff9-1d38-4596-b215-28e77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 08:43:32
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Stop-AzWorkloadsSapApplicationInstance cmdlet stops the App server instance of the SAP system and its underlying Virtual Machine represented by the VIS. Currently, stop action is supported for ABAP stack. In this example, you can see that instance and its VMs can be stopped by passing the App server instance resource name, Resource Group name, VIS name and DeallocateVM parameter as inputs.
72+
73+
### Example 4: Soft Stop Application server instance of the SAP system
74+
```powershell
75+
Stop-AzWorkloadsSapApplicationInstance -Name app0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -SoftStopTimeoutSecond 300
76+
```
77+
78+
```output
79+
AdditionalInfo :
80+
Code :
81+
Detail :
82+
EndTime : 15-03-2023 08:45:40
83+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/881d4ff9-1d38-4596-b215-28e
84+
77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
85+
Message :
86+
Name : 881d4ff9-1d38-4596-b215-28e77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
87+
Operation :
88+
PercentComplete :
89+
ResourceGroupName :
90+
StartTime : 15-03-2023 08:43:32
91+
Status : Succeeded
92+
Target :
93+
```
94+
95+
Stop-AzWorkloadsSapApplicationInstance cmdlet soft stops the App server instance of the SAP system represented by the VIS. Currently, stop action is supported for ABAP stack. In this example, you can see that instance can be stopped by passing the App server instance resource name, Resource Group name, VIS name and soft stop timeout seconds as inputs.

src/Workloads/Workloads.Autorest/examples/Stop-AzWorkloadsSapCentralInstance.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,26 @@ Target :
4646

4747
Stop-AzWorkloadsSapCentralInstance cmdlet stops the Central services instance of the SAP system represented by the VIS. Currently, stop action is supported for ABAP central services stack. In this example, you can see that instance can be stopped by passing the Central services instance Azure resource ID as InputObject to the cmdlet.
4848

49+
### Example 3: Stop Central services instance of the SAP system and its underlying Virtual Machine
50+
```powershell
51+
Stop-AzWorkloadsSapCentralInstance -Name cs0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -DeallocateVM
52+
```
53+
54+
```output
55+
AdditionalInfo :
56+
Code :
57+
Detail :
58+
EndTime : 15-03-2023 08:45:40
59+
Id : /subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/881d4ff9-1d38-4596-b215-28e
60+
77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
61+
Message :
62+
Name : 881d4ff9-1d38-4596-b215-28e77dbfe176*DF20ACAC495F17B1D0D9182C3A4C44BC6EDFF718387348FAE17F19BCB5DE687C
63+
Operation :
64+
PercentComplete :
65+
ResourceGroupName :
66+
StartTime : 15-03-2023 08:43:32
67+
Status : Succeeded
68+
Target :
69+
```
70+
71+
Stop-AzWorkloadsSapCentralInstance cmdlet stops the Central services instance of the SAP system represented by the VIS. Currently, stop action is supported for ABAP central services stack. In this example, you can see that instance and its VMs can be stopped by passing the Central services instance resource name, Resource Group name, VIS name and DeallocateVM parameter as inputs.

0 commit comments

Comments
 (0)