You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sap/automation/get-started.md
+99-56Lines changed: 99 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,61 +27,11 @@ To get started with SAP Deployment Automation Framework, you need:
27
27
28
28
Some of the prerequisites might already be installed in your deployment environment. Both Azure Cloud Shell and the deployer come with Terraform and the Azure CLI installed.
29
29
30
-
### Create a service principal
31
-
32
-
The SAP automation deployment framework uses service principals for deployment.
33
-
34
-
When you choose a name for your service principal, make sure that the name is unique within your Azure tenant. Make sure to use an account with service principals creation permissions when running the script.
35
-
36
-
1. Create the service principal with Contributor permissions.
37
-
38
-
```cloudshell-interactive
39
-
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
40
-
export control_plane_env_code="LAB"
41
-
42
-
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/$ARM_SUBSCRIPTION_ID" --name="$control_plane_env_code-Deployment-Account"
1. Copy the output details. Make sure to save the values for `appId`, `password`, and `Tenant`.
58
-
59
-
The output maps to the following parameters. You use these parameters in later steps, with automation commands.
60
-
61
-
| Parameter input name | Output name |
62
-
|--------------------------|-----------------|
63
-
| `spn_id` | `appId` |
64
-
| `spn_secret` | `password` |
65
-
| `tenant_id` | `tenant` |
66
-
67
-
1. Optionally, assign the User Access Administrator role to the service principal.
68
-
69
-
```cloudshell-interactive
70
-
export appId="<appId>"
71
-
72
-
az role assignment create --assignee $appId --role "User Access Administrator" --scope /subscriptions/$ARM_SUBSCRIPTION_ID
73
-
```
74
-
75
-
76
-
> [!IMPORTANT]
77
-
> If you don't assign the User Access Administrator role to the service principal, you can't assign permissions using the automation framework.
78
30
79
31
### Create a user assigned Identity
80
32
81
-
82
33
The SAP automation deployment framework can also use a user assigned identity (MSI) for the deployment. Make sure to use an account with permissions to create managed identities when running the script that creates the identity.
83
34
84
-
85
35
1. Create the managed identity.
86
36
87
37
```cloudshell-interactive
@@ -116,39 +66,132 @@ The SAP automation deployment framework can also use a user assigned identity (M
116
66
|--------------------------|-----------------|
117
67
| `app_id` | `appId` |
118
68
| `msi_id` | `armId` |
69
+
| `msi_objectid` | `objectId` |
119
70
120
71
121
72
1. Assign the Contributor role to the identity.
122
73
123
74
```cloudshell-interactive
124
75
export appId="<appId>"
125
76
126
-
az role assignment create --assignee $appId --role "Contributor" --scope /subscriptions/$ARM_SUBSCRIPTION_ID
77
+
az role assignment create --assignee $msi_objectid --role "Contributor" --scope /subscriptions/$ARM_SUBSCRIPTION_ID
127
78
```
128
79
129
80
1. Optionally, assign the User Access Administrator role to the identity.
130
81
131
82
```cloudshell-interactive
132
83
export appId="<appId>"
133
84
134
-
az role assignment create --assignee $appId --role "User Access Administrator" --scope /subscriptions/$ARM_SUBSCRIPTION_ID
85
+
az role assignment create --assignee $msi_objectid --role "User Access Administrator" --scope /subscriptions/$ARM_SUBSCRIPTION_ID
135
86
```
136
87
137
88
138
89
> [!IMPORTANT]
139
90
> If you don't assign the User Access Administrator role to the managed identity, you can't assign permissions using the automation framework.
140
91
92
+
### Create an application registration for the web application
93
+
94
+
The SAP automation deployment framework can leverage an Azure App Service for configuring the tfvars parameter files.
95
+
96
+
1. Create the application registration.
97
+
98
+
```powershell
99
+
$ApplicationName="<App Registration Name>"
100
+
$MSI_objectId="<msi_objectid>"
101
+
102
+
Write-Host "Creating an App Registration for" $ApplicationName -ForegroundColor Green
Write-Host "The browser will now open, Please Add a new scope, by clicking the '+ Add a new scope link', accept the default name and click 'Save and Continue'"
126
+
Write-Host "In the Add a scope page enter the scope name 'user_impersonation'. Choose 'Admins and Users' in the who can consent section, next provide the Admin consent display name 'Access the SDAF web application' and 'Use SDAF' as the Admin consent description, accept the changes by clicking the 'Add scope' button"
127
+
128
+
Start-Process $API_URL
129
+
Read-Host -Prompt "Once you have created and validated the scope, Press any key to continue"
130
+
131
+
132
+
```
133
+
134
+
135
+
136
+
### Create a service principal
137
+
138
+
The SAP automation deployment framework can use service principals for deployment.
139
+
140
+
When you choose a name for your service principal, make sure that the name is unique within your Azure tenant. Make sure to use an account with service principals creation permissions when running the script.
141
+
142
+
1. Create the service principal with Contributor permissions.
143
+
144
+
```cloudshell-interactive
145
+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
146
+
export control_plane_env_code="LAB"
147
+
148
+
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/$ARM_SUBSCRIPTION_ID" --name="$control_plane_env_code-Deployment-Account"
0 commit comments