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/virtual-machines/workloads/sap/automation-configure-control-plane.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,14 @@ The table below contains the networking parameters.
88
88
> |`management_firewall_subnet_address_prefix`| The address range for the subnet | Mandatory | For green field deployments. |
89
89
> |||||
90
90
> |`management_bastion_subnet_arm_id`| The Azure resource identifier for the Bastion subnet | Mandatory | For brown field deployments. |
91
-
> |`management_bastion_subnet_address_prefix`| The address range for the subnet | Mandatory | For green field deployments. |
91
+
> |`management_bastion_subnet_address_prefix`| The address range for the subnet | Mandatory | For green field deployments. |
92
+
> |||||
93
+
> |`webapp_subnet_arm_id`| The Azure resource identifier for the web app subnet | Mandatory | For brown field deployments using the web app |
94
+
> |`webapp_subnet_address_prefix`| The address range for the subnet | Mandatory | For green field deployments using the web app |
95
+
96
+
> [!NOTE]
97
+
> When using an existing subnet for the web app, the subnet must be empty, in the same region as the resource group being deployed, and delegated to Microsoft.Web/serverFarms
title: Configure a Deployer UX Web Application for SAP Deployment Automation Framework
3
+
description: Configure a web app as a part of the control plane to help creating and deploying SAP workload zones and systems on Azure.
4
+
author: wsheehan
5
+
ms.author: wsheehan
6
+
ms.reviewer: wsheehan
7
+
ms.date: 06/21/2022
8
+
ms.topic: conceptual
9
+
ms.service: virtual-machines-sap
10
+
---
11
+
12
+
# Configure the Control Plane UX Web Application
13
+
14
+
As a part of the SAP automation framework control plane, you can optionally create an interactive web application that will assist you in creating and deploying SAP workload zones and systems.
15
+
16
+
:::image type="content" source="./media/automation-deployment-framework/webapp-front-page.png" alt-text="Web app front page":::
17
+
18
+
## Create an app registration
19
+
20
+
If you would like to use the web app, you must first create an app registration for authentication purposes. Open the Azure Cloud Shell and execute the following commands:
$TF_VAR_app_registration_app_id=(az ad app create `
46
+
--display-name $region_code-webapp-registration `
47
+
--enable-id-token-issuance true `
48
+
--sign-in-audience AzureADMyOrg `
49
+
--required-resource-accesses ./manifest.json `
50
+
--query "appId").Replace('"',"")
51
+
52
+
$TF_VAR_webapp_client_secret=(az ad app credential reset `
53
+
--id $TF_VAR_app_registration_app_id --append `
54
+
--query "password").Replace('"',"")
55
+
56
+
rm ./manifest.json
57
+
```
58
+
---
59
+
60
+
## Deploy via Azure DevOps (pipelines)
61
+
62
+
For full instructions on setting up the web app using Azure DevOps, see [Use SAP Deployment Automation Framework from Azure DevOps Services](automation-configure-devops.md)
63
+
64
+
### Summary of steps required to set up the web app before deploying the control plane:
65
+
1. Add the web app deployment pipeline (deploy/pipelines/21-deploy-web-app.yaml).
66
+
2. Add the variables TF_VAR_app_registration_app_id and TF_VAR_webapp_client_secret to your environment specific variable group before deployment.
67
+
3. Assign the administrator role to the build service using the Security tab in your environment specific variable group.
68
+
4. Check the box next to "deploy the web app infrastructure" when running the deploy control plane pipeline.
69
+
70
+
### Summary of steps required to access the web app after deploying the control plane:
71
+
1. Update the app registration reply URLs.
72
+
2. Assign the reader role with the subscription scope to the app service system assigned managed identity.
73
+
3. Run the web app deployment pipeline.
74
+
4. (Optionally) add an additional access policy to the app service.
75
+
76
+
## Deploy via Azure CLI (Cloud Shell)
77
+
78
+
For full instructions on setting up the web app using the Azure CLI, see [Deploy the control plane](automation-deploy-control-plane.md)
79
+
80
+
### Summary of steps required to set up the web app before deploying the control plane:
81
+
1. Export the environment variables TF_VAR_app_registration_app_id, TF_VAR_webapp_client_secret, and TF_VAR_use_webapp="true".
82
+
83
+
### Summary of steps required to access the web app after deploying the control plane:
84
+
1. Update the app registration reply URLs.
85
+
2. Assign the reader role with the subscription scope to the app service system assigned managed identity.
86
+
3. Generate a zip file of the web app code.
87
+
4. Deploy the software to the app service.
88
+
5. Configure the application settings.
89
+
6. (Optionally) add an additional access policy to the app service.
90
+
91
+
92
+
## Using the web app
93
+
94
+
The web app allows you to create SAP workload zone objects and system infrastructure objects. These are essentially another representation of the Terraform configuration file.
95
+
If deploying using Azure Pipelines, you have ability to deploy these workload zones and system infrastructures right from the web app.
96
+
If deploying using the Azure CLI, you can download the parameter file for any landscape or system object you create, and use that in your command line deployments.
97
+
98
+
### Creating a landscape or system object from scratch
99
+
1. Navigate to the "Workload zones" or "Systems" tab at the top of the website.
100
+
2. Click "Create New" in the bottom left corner.
101
+
3. Fill out the required parameters in the "Basic" and "Advanced" tabs, and any additional parameters you desire.
102
+
4. Certain parameters will be dropdowns populated with existing Azure resources.
103
+
* If no results are shown for a dropdown, you probably need to specify another dropdown before you can see any options. Or, see step 2 above regarding the system assigned managed identity.
104
+
- The subscription parameter must be specified before any other dropdown functionality is enabled
105
+
- The network_arm_id parameter must be specified before any subnet dropdown functionality is enabled
106
+
5. Select submit in the bottom left hand corner
107
+
108
+
### Creating a workload zone or system object from a file
109
+
1. Navigate to the "File" tab at the top of the website.
110
+
2. Your options are
111
+
* Create a new file from scratch there in browser.
112
+
* Import an existing.tfvars file, and (optionally) edit it before saving.
113
+
* Use an existing template, and (optionally) edit it before saving.
114
+
3. Make sure your file conforms to the correct naming conventions.
115
+
4. Next to the file you would like to convert to a workload zone or system object, click "Convert".
116
+
5. The workload zone or system object will appear in its respective tab.
117
+
118
+
### Deploying a workload zone or system object (Azure DevOps Pipelines deployment)
119
+
1. Navigate to the Workload zones or Systems tab.
120
+
2. Next to the workload zone or system you would like to deploy, click "Deploy".
121
+
* If you would like to deploy a file, first convert it to a workload zone or system object.
122
+
4. Specify the necessary parameters, and confirm it's the correct object.
123
+
5. Click deploy.
124
+
6. The web app will automatically generate a '.tfvars' file from the object, update your Azure DevOps repository, and kick off the workload zone or system (infrastructure) pipeline. You can monitor the deployment in the Azure DevOps Portal.
Copy file name to clipboardExpand all lines: articles/virtual-machines/workloads/sap/automation-deploy-control-plane.md
+131-7Lines changed: 131 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,71 @@ Optionally assign the following permissions to the Service Principal:
40
40
az role assignment create --assignee <appId> --role "User Access Administrator" --scope /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>
41
41
```
42
42
43
+
44
+
## Prepare the webapp
45
+
This step is optional. If you would like a browser-based UX to assist in the configuration of SAP workload zones and systems, run the following commands before deploying the control plane.
It is currently not possible to perform this action from Azure DevOps.
97
+
98
+
---
99
+
100
+
43
101
## Deploy the control plane
44
102
45
103
The sample Deployer configuration file `MGMT-WEEU-DEP00-INFRASTRUCTURE.tfvars` is located in the `~/Azure_SAP_Automated_Deployment/WORKSPACES/DEPLOYER/MGMT-WEEU-DEP00-INFRASTRUCTURE` folder.
46
104
47
105
The sample SAP Library configuration file `MGMT-WEEU-SAP_LIBRARY.tfvars` is located in the `~/Azure_SAP_Automated_Deployment/WORKSPACES/LIBRARY/MGMT-WEEU-SAP_LIBRARY` folder.
48
106
49
-
Running the command below will create the Deployer, the SAP Library and add the Service Principal details to the deployment key vault.
107
+
Running the command below will create the Deployer, the SAP Library and add the Service Principal details to the deployment key vault. If you followed the web app setup in the step above, this command will also create the infrastructure to host the application.
50
108
51
109
# [Linux](#tab/linux)
52
110
@@ -85,7 +143,7 @@ cd ~/Azure_SAP_Automated_Deployment/WORKSPACES
> Be sure to replace the sample value `<subscriptionID>` with your subscription ID.
121
177
> Replace the `<appID>`, `<password>`, `<tenant>` values with the output values of the SPN creation
122
178
123
179
# [Azure DevOps](#tab/devops)
124
180
125
-
Open (https://dev.azure.com) and and go to your Azure DevOps project.
181
+
Open (https://dev.azure.com) and go to your Azure DevOps project.
126
182
127
183
> [!NOTE]
128
184
> Ensure that the 'Deployment_Configuration_Path' variable in the 'SDAF-General' variable group is set to the folder that contains your configuration files, for this example you can use 'samples/WORKSPACES'.
@@ -224,9 +280,77 @@ cd sap-automation/deploy/scripts
224
280
225
281
The script will install Terraform and Ansible and configure the deployer.
226
282
283
+
284
+
## Deploy the web app software
285
+
286
+
If you would like to use the web app, follow the steps below. If not, ignore this section.
287
+
288
+
The web app resource can be found in the deployer resource group. In the Azure portal, select resource groups in your subscription. The deployer resource group will be named something like MGMT-[region]-DEP00-INFRASTRUCTURE. Inside the deployer resource group, locate the app service, named something like mgmt-[region]-dep00-sapdeployment123. Open the app service and copy the URL listed. It should be in the format of https://mgmt-[region]-dep00-sapdeployment123.azurewebsites.net. This will be the value for webapp_url below.
289
+
290
+
The following commands will configure the application urls, generate a zip file of the web app code, deploy the software to the app service, and configure the application settings.
az webapp deploy --resource-group <group-name> --name <app-name> --src-path deploymentfile.zip
334
+
335
+
```
336
+
```bash
337
+
338
+
az webapp config appsettings set -g <group-name> -n <app-name> --settings \
339
+
IS_PIPELINE_DEPLOYMENT=false
340
+
341
+
```
342
+
343
+
344
+
## Accessing the web app
345
+
346
+
By default there will be no inbound public internet access to the web app apart from the deployer virtual network. To allow additional access to the web app, navigate to the Azure portal. In the deployer resource group, find the web app. Then under settings on the left hand side, click on networking. From here, click Access restriction. Add any allow or deny rules you would like. For more information on configuring access restrictions, see [Set up Azure App Service access restrictions](/azure/app-service/app-service-ip-restrictions).
347
+
348
+
You will also need to grant reader permissions to the app service system-assigned managed identity. Navigate to the app service resource. On the left hand side, click "Identity". In the "system assigned" tab, click on "Azure role assignments" > "Add role assignment". Select "subscription" as the scope, and "reader" as the role. Then click save. Without this step, the web app dropdown functionality will not work.
349
+
350
+
You can log in and visit the web app by following the URL from earlier or clicking browse inside the app service resource. With the web app, you are able to configure SAP workload zones and system infrastructure. Click download to obtain a parameter file of the workload zone or system you specified, for use in the later deployment steps.
351
+
352
+
227
353
## Next step
228
354
229
355
> [!div class="nextstepaction"]
230
356
> [Configure SAP Workload Zone](automation-configure-workload-zone.md)
0 commit comments