File tree Expand file tree Collapse file tree 2 files changed +39
-10
lines changed Expand file tree Collapse file tree 2 files changed +39
-10
lines changed Original file line number Diff line number Diff line change @@ -141,17 +141,45 @@ The SAP automation deployment framework can also use a user assigned identity (M
141
141
142
142
## Pre-flight checks
143
143
144
- You can use the following script to perform pre-flight checks. The script checks for the required permissions.
144
+ You can use the following script to perform pre-flight checks. The script performs the following checks and tests:
145
+
146
+ - Checks if the service principal has the correct permissions to create resources in the subscription.
147
+ - Checks if the service principal has user Access Administrator permissions.
148
+ - Create a Azure Virtual Network.
149
+ - Create a Azure Virtual Key Vault with private end point.
150
+ - Create a Azure Files NSF share.
151
+ - Create a Azure Virtual Virtual Machine with data disk using Premium Storage v2.
152
+ - Check access to the required URLs using the deployed virtual machine.
145
153
146
154
```powershell
147
155
156
+ $sdaf_path = Get-Location
157
+ if ( $PSVersionTable.Platform -eq "Unix") {
158
+ if ( -Not (Test-Path "SDAF") ) {
159
+ $sdaf_path = New-Item -Path "SDAF" -Type Directory
160
+ }
161
+ }
162
+ else {
163
+ $sdaf_path = Join-Path -Path $Env:HOMEDRIVE -ChildPath "SDAF"
164
+ if ( -not (Test-Path $sdaf_path)) {
165
+ New-Item -Path $sdaf_path -Type Directory
166
+ }
167
+ }
168
+
169
+ Set-Location -Path $sdaf_path
170
+
148
171
git clone https://github.com/Azure/sap-automation.git
149
172
150
173
cd sap-automation
151
174
cd deploy
152
175
cd scripts
153
176
177
+ if ( $PSVersionTable.Platform -eq "Unix") {
178
+ ./Test-SDAFReadiness.ps1
179
+ }
180
+ else {
154
181
.\Test-SDAFReadiness.ps1
182
+ }
155
183
156
184
```
157
185
Original file line number Diff line number Diff line change @@ -256,19 +256,15 @@ The following example shows how to test the connectivity to the URLs by using an
256
256
257
257
```powershell
258
258
259
-
259
+ $sdaf_path = Get-Location
260
260
if ( $PSVersionTable.Platform -eq "Unix") {
261
- if ( Test-Path "SDAF") {
262
- }
263
- else {
264
- $sdaf_path = New-Item -Path "SDAF" -Type Directory
261
+ if ( -Not (Test-Path "SDAF") ) {
262
+ $sdaf_path = New-Item -Path "SDAF" -Type Directory
265
263
}
266
264
}
267
265
else {
268
266
$sdaf_path = Join-Path -Path $Env:HOMEDRIVE -ChildPath "SDAF"
269
- if ( Test-Path $sdaf_path) {
270
- }
271
- else {
267
+ if ( -not (Test-Path $sdaf_path)) {
272
268
New-Item -Path $sdaf_path -Type Directory
273
269
}
274
270
}
@@ -281,7 +277,12 @@ cd sap-automation
281
277
cd deploy
282
278
cd scripts
283
279
284
- Test-SDAFURLs.ps1
280
+ if ( $PSVersionTable.Platform -eq "Unix") {
281
+ ./Test-SDAFURLs.ps1
282
+ }
283
+ else {
284
+ .\Test-SDAFURLs.ps1
285
+ }
285
286
286
287
```
287
288
You can’t perform that action at this time.
0 commit comments