Skip to content

Commit f27f001

Browse files
authored
Merge pull request #182727 from mkdeegan/master
Update Hands-on Lab Tutorial
2 parents c843de0 + fe59a64 commit f27f001

File tree

2 files changed

+54
-24
lines changed

2 files changed

+54
-24
lines changed

articles/virtual-machines/workloads/sap/automation-tutorial.md

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ms.topic: tutorial
99
ms.service: virtual-machines-sap
1010
---
1111

12+
13+
1214
# Enterprise Scale for SAP deployment automation framework - Hands-on Lab
1315

1416
This tutorial shows how to do enterprise scaling for deployments using the [SAP deployment automation framework on Azure](automation-deployment-framework.md). This example uses Azure Cloud Shell to deploy the control plane infrastructure. The deployer virtual machine (VM) creates the remaining infrastructure and SAP HANA configurations.
@@ -37,6 +39,9 @@ There are three main steps of an SAP deployment on Azure with the automation fra
3739
3. Deploying the system. This step includes the infrastructure for the SAP system.
3840

3941
There are several workflows in the deployment automation process. However, this tutorial focuses on one workflow for ease of deployment. You can deploy this workflow, the SAP S4 HANA standalone environment, using Bash. The tutorial describes the general hierarchy and different phases of the deployment.
42+
43+
44+
4045
### Environment Overview
4146

4247
The SAP on Azure deployment automation framework has two main components:
@@ -52,6 +57,8 @@ The framework uses Terraform for infrastructure deployment, and Ansible for the
5257

5358
:::image type="content" source="./media/automation-deployment-framework/automation-diagram-full.png" alt-text="Diagram showing the SAP deployment automation framework environment.":::
5459

60+
61+
5562
#### Management Zone
5663

5764
The management zone contains the control plane infrastructure from which other environments are deployed. Once the management zone is deployed, you rarely, if ever, need to redeploy.
@@ -64,6 +71,8 @@ The **SAP Library** provides the persistent storage for the Terraform state file
6471

6572
You configure the deployer and library in a Terraform `.tfvars` variable file. See [configuring the control plane](automation-configure-control-plane.md)
6673

74+
75+
6776
#### Workload Zone
6877

6978
An SAP application typically has multiple deployment tiers. For example, you might have development, quality assurance, and production tiers. The SAP deployment automation framework refers to these tiers as workload zones.
@@ -74,22 +83,32 @@ The **SAP Workload zone** contains the networking and shared components for the
7483

7584
The system deployment consists of the virtual machines that will be running the SAP application, including the web, app, and database tiers. See [configuring the SAP system](automation-configure-system.md)
7685

86+
87+
7788
## Hands-On Lab
7889

90+
91+
7992
### Prerequisites
8093

8194
The [SAP deployment automation framework repository](https://github.com/Azure/sap-automation) is available on GitHub.
8295

8396
You need an SSH client to connect to the Deployer. Use any SSH client that you feel comfortable with.
8497

98+
99+
85100
#### Review the Azure Subscription Quota
86101

87102
Ensure that your Microsoft Azure Subscription has a sufficient core quote for DdSV4 & EdsV4 family SKU in the elected region. About 50 cores each available for VM family should suffice.
88103

104+
105+
89106
#### S-User account for SAP software download
90107

91108
A valid SAP user account (SAP-User or S-User account) with software download privileges is required to download the SAP software.
92109

110+
111+
93112
## Set up Cloud Shell
94113

95114
1. Go to [Azure Cloud Shell](https://shell.azure.com)
@@ -107,10 +126,16 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
107126
Validate that your active subscription and record your subscription ID:
108127
109128
```cloudshell-interactive
110-
az account list --query "[?isDefault]" --output=table
129+
az account list --query "[?isDefault].{Name: name, CloudName: cloudName, SubscriptionId: id, State: state, IsDefault: isDefault}" --output=table
111130
```
112131
113-
1. Optionally, change your active subscription.
132+
or
133+
134+
```cloudshell-interactive
135+
az account list --output=table | grep True
136+
```
137+
138+
1. If required, change your active subscription.
114139
115140
```cloudshell-interactive
116141
az account set --subscription <Subscription ID>
@@ -119,7 +144,7 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
119144
Validate that your active subscription changed:
120145
121146
```cloudshell-interactive
122-
az account list --query "[?isDefault]" --output=table
147+
az account list --query "[?isDefault].{Name: name, CloudName: cloudName, SubscriptionId: id, State: state, IsDefault: isDefault}" --output=table
123148
```
124149
125150
1. Create the deployment folder and clone the repository.
@@ -129,12 +154,12 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
129154
130155
cd ~/Azure_SAP_Automated_Deployment
131156
132-
git clone https://github.com/Azure/sap-automation.git
157+
git clone https://github.com/Azure/sap-automation.git
133158
```
134159
135160
1. Optionally, validate the versions of Terraform and the Azure CLI available on your instance of the Cloud Shell.
136161
137-
```bash
162+
```cloudshell-interactive
138163
./sap-automation/deploy/scripts/helpers/check_workstation.sh
139164
```
140165
@@ -156,20 +181,23 @@ The SAP automation deployment framework uses service principals for deployment.
156181
1. Give the service principal contributor and user access administrator permissions.
157182
158183
```cloudshell-interactive
159-
az ad sp create-for-rbac --role="Contributor" \
160-
--scopes="/subscriptions/<subscriptionID>" \
161-
--name="<environment>-Deployment-Account"
184+
export subscriptionId="<subscriptionId>"
185+
export control_plane_env_code="MGMT"
186+
187+
az ad sp create-for-rbac --role="Contributor" \
188+
--scopes="/subscriptions/${subscriptionId}" \
189+
--name="${control_plane_env_code}-Deployment-Account"
162190
```
163191
164192
Review the output. For example:
165193
166194
```json
167195
{
168-
"appId": "<AppID>",
196+
"appId": "<AppId>",
169197
"displayName": "<environment>-Deployment-Account ",
170-
"name": "<AppID>",
198+
"name": "<AppId>",
171199
"password": "<AppSecret>",
172-
"tenant": "<Tenant ID>"
200+
"tenant": "<TenantId>"
173201
}
174202
```
175203
@@ -185,8 +213,10 @@ The SAP automation deployment framework uses service principals for deployment.
185213
186214
3. Assign the **User Access Administrator** role to the service principal.
187215
188-
```bash
189-
az role assignment create --assignee <appId> \
216+
```cloudshell-interactive
217+
export appId="<appId>"
218+
219+
az role assignment create --assignee ${appId} \
190220
--role "User Access Administrator"
191221
```
192222
@@ -198,7 +228,7 @@ The SAP automation deployment framework uses service principals for deployment.
198228
199229
1. Copy the sample configurations to a local workspace directory:
200230
201-
```bash
231+
```cloudshell-interactive
202232
cd ~/Azure_SAP_Automated_Deployment
203233
204234
cp -Rp ./sap-automation/training-materials/WORKSPACES .
@@ -267,20 +297,20 @@ The sample SAP Library configuration file `MGMT-NOEU-SAP_LIBRARY.tfvars` is in t
267297
```bash
268298
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES
269299
270-
export subscriptionID="<subscriptionID>"
271-
export spn_id="<appID>"
300+
export subscriptionId="<subscriptionId>"
301+
export spn_id="<appId>"
272302
export spn_secret="<password>"
273-
export tenant_id="<tenant>"
303+
export tenant_id="<tenantId>"
274304
export env_code="MGMT"
275-
export region_code="NOEU"
305+
export region_code="<region_code>"
276306
277307
export DEPLOYMENT_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
278-
export ARM_SUBSCRIPTION_ID="${subscriptionID}"
308+
export ARM_SUBSCRIPTION_ID="${subscriptionId}"
279309
280310
${DEPLOYMENT_REPO_PATH}/deploy/scripts/prepare_region.sh \
281311
--deployer_parameter_file DEPLOYER/${env_code}-${region_code}-DEP00-INFRASTRUCTURE/${env_code}-${region_code}-DEP00-INFRASTRUCTURE.tfvars \
282312
--library_parameter_file LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars \
283-
--subscription "${subscriptionID}" \
313+
--subscription "${subscriptionId}" \
284314
--spn_id "${spn_id}" \
285315
--spn_secret "${spn_secret}" \
286316
--tenant_id "${tenant_id}" \
@@ -533,7 +563,7 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
533563
> The first time an Environment is instantiated, a SPN must be registered. In this tutorial the Control Plane is in the MGMT environment, and the Workload Zone is in DEV, therefore an SPN must be registered for DEV at this time.
534564
535565
```bash
536-
export subscriptionID="<subscriptionID>"
566+
export subscriptionId="<subscriptionId>"
537567
export spn_id="<appID>"
538568
export spn_secret="<password>"
539569
export tenant_id="<tenant>"
@@ -545,7 +575,7 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
545575
--environment "${env_code}" \
546576
--region "${region_code}" \
547577
--vault "${key_vault}" \
548-
--subscription "${subscriptionID}" \
578+
--subscription "${subscriptionId}" \
549579
--spn_id "${spn_id}" \
550580
--spn_secret "${spn_secret}" \
551581
--tenant_id "${tenant_id}"
@@ -798,7 +828,7 @@ Export the following two environment variables.
798828
799829
```bash
800830
export DEPLOYMENT_REPO_PATH="~/Azure_SAP_Automated_Deployment/sap-automation"
801-
export ARM_SUBSCRIPTION_ID="<subscriptionID>"
831+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
802832
```
803833
804834
Run the following command.

articles/virtual-machines/workloads/sap/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@
375375
href: automation-deploy-system.md
376376
- name: Use Ansible for system configuration
377377
href: automation-run-ansible.md
378-
- name: Automation framework tutorial
378+
- name: Deployment Hands On Lab
379379
href: automation-tutorial.md
380380
- name: Manual infrastructure deployment
381381
href: automation-manual-deployment.md

0 commit comments

Comments
 (0)