Skip to content

Commit f9d4438

Browse files
authored
Merge pull request #183419 from KimForss/kimforss-devops
DevOps additions
2 parents 857ba19 + c584ef6 commit f9d4438

16 files changed

+432
-22
lines changed

articles/virtual-machines/workloads/sap/automation-configure-devops.md

Lines changed: 255 additions & 0 deletions
Large diffs are not rendered by default.

articles/virtual-machines/workloads/sap/automation-configure-system.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,10 @@ Replace `<prefix>` with the name prefix of your environment, such as `DEV-WEEU-S
296296
The fencing agent details must be stored in the workload zone key vault using a predefined naming convention. Replace `<prefix>` with the name prefix of your environment, such as `DEV-WEEU-SAP01`, `<workload_kv_name>` with the name of the key vault from the workload zone resource group and for the other values use the values recorded from the previous step and run the script.
297297

298298

299-
```azurecli
300-
301-
```azurecli-interactive
302-
az keyvault secret set --name "<prefix>-fencing-spn-id" --vault-name "<workload_kv_name>" --value "<appId>";
303-
az keyvault secret set --name "<prefix>-fencing-spn-pwd" --vault-name "<workload_kv_name>" --value "<password>";
304-
az keyvault secret set --name "<prefix>-fencing-spn-tenant" --vault-name "<workload_kv_name>" --value "<tenant>";
305-
```
299+
```azurecli-interactive
300+
az keyvault secret set --name "<prefix>-fencing-spn-id" --vault-name "<workload_kv_name>" --value "<appId>";
301+
az keyvault secret set --name "<prefix>-fencing-spn-pwd" --vault-name "<workload_kv_name>" --value "<password>";
302+
az keyvault secret set --name "<prefix>-fencing-spn-tenant" --vault-name "<workload_kv_name>" --value "<tenant>";
306303
```
307304

308305
## Next steps
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: SAP deployment automation framework DevOps hands-on lab
3+
description: DevOps Hands-on lab for the SAP Deployment Automation Framework on Azure.
4+
author: mimergel
5+
ms.author: mimergel
6+
ms.reviewer: kimforss
7+
ms.date: 12/14/2021
8+
ms.topic: tutorial
9+
ms.service: virtual-machines-sap
10+
---
11+
12+
# SAP Deployment Automation Framework DevOps - Hands-on lab
13+
14+
This tutorial shows how to perform the deployment activities of the [SAP deployment automation framework on Azure](automation-deployment-framework.md) using Azure DevOps Services.
15+
16+
You'll perform the following tasks during this lab:
17+
18+
> [!div class="checklist"]
19+
> * Deploy the Control Plane (Deployer Infrastructure & Library)
20+
> * Deploy the Workload Zone (Landscape, System)
21+
> * Deploy the SAP Infrastructure
22+
> * Install HANA Database
23+
> * Install SCS server
24+
> * Load HANA Database
25+
> * Install Primary Application Server
26+
> * Download the SAP software
27+
> * Install SAP
28+
29+
## Prerequisites
30+
31+
- An Azure subscription. If you don't have an Azure subscription, you can [create a free account here](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
32+
33+
- A configured Azure DevOps instance, follow the steps here [Configure Azure DevOps Services for SAP Deployment Automation](automation-configure-devops.md)
34+
35+
- For the 'SAP software acquisition' and the 'Configuration and SAP installation' pipelines a configured self hosted agent, see [Configure a self-hosted agent for SAP Deployment Automation](automation-configure-devops.md#register-the-deployer-as-a-self-hosted-agent-for-azure-devops)
36+
37+
> [!Note]
38+
> The free Azure account may not be sufficient to run the deployment.
39+
40+
## Overview
41+
42+
These steps reference and use the [default naming convention](automation-naming.md) for the automation framework. Example values are also used for naming throughout the configurations. In this tutorial, the following names are used:
43+
- Azure DevOps project name is `SAP-Deployment`
44+
- Azure DevOps repository name is `sap-automation`
45+
- The control plane environment is named `MGMT`, in the region West Europe (`WEEU`) and installed in the virtual network `DEP00`, giving a deployer configuration name: `MGMT-WEEU-DEP00-INFRASTRUCTURE`
46+
47+
- The SAP workload zone has the environment name `DEV` and is in the same region as the control plane using the virtual network `SAP01`, giving the SAP workload zone configuration name: `DEV-WEEU-SAP01-INFRASTRUCTURE`
48+
- The SAP System with SID `X00` will be installed in this SAP workload zone. The configuration name for the SAP System: `DEV-WEEU-SAP01-X00`
49+
50+
| Artifact type | Configuration name | Location |
51+
| ------------- | ------------------------------- | --------------- |
52+
| Control Plane | MGMT-WEEU-DEP00-INFRASTRUCTURE | westeurope |
53+
| Workload Zone | DEP-WEEU-SAP01-INFRASTRUCTURE | westeurope |
54+
| SAP System | DEP-WEEU-SAP01-X00 | westeurope |
55+
56+
The deployed infrastructure is shown in the diagram below.
57+
58+
:::image type="content" source="media/automation-devops/automation-devops-tutorial-design.png" alt-text="Picture showing the DevOps tutorial infrastructure design":::
59+
60+
61+
> [!Note]
62+
> In this tutorial the X00 SAP system will be deployed with the following configuration:
63+
> * Standalone deployment
64+
> * HANA DB VM SKU: Standard_M32ts
65+
> * ASCS VM SKU: Standard_D4s_v3
66+
> * APP VM SKU: Standard_D4s_v3
67+
68+
## Deploy the Control Plane
69+
70+
The deployment will use the configuration defined in the Terraform variable files located in the 'samples/WORKSPACES/DEPLOYER/MGMT-WEEU-DEP00-INFRASTRUCTURE' and 'samples/WORKSPACES/LIBRARY/MGMT-WEEU-SAP_LIBRARY' folders.
71+
72+
Ensure that the 'Deployment_Configuration_Path' variable in the 'SDAF-General' variable group is set to 'samples/WORKSPACES'
73+
74+
Run the pipeline by selecting the _Deploy control plane_ pipeline from the Pipelines section. Enter 'MGMT-WEEU-DEP00-INFRASTRUCTURE' as the Deployer configuration name and 'MGMT-WEEU-SAP_LIBRARY' as the SAP Library configuration name.
75+
76+
:::image type="content" source="media/automation-devops/automation-run-pipeline.png" alt-text="Picture showing the DevOps tutorial run pipeline dialog":::
77+
78+
You can track the progress in the Azure DevOps portal. Once the deployment is complete, you can see the Control Plane details in the _Extensions_ tab.
79+
80+
:::image type="content" source="media/automation-devops/automation-run-pipeline-control-plane.png" alt-text="Picture showing the DevOps tutorial run pipeline results":::
81+
82+
## Deploy the Workload zone
83+
84+
The deployment will use the configuration defined in the Terraform variable file located in the 'samples/WORKSPACES/LANDSCAPE/DEV-WEEU-SAP01-INFRASTRUCTURE' folder.
85+
86+
Run the pipeline by selecting the _Deploy workload zone_ pipeline from the Pipelines section. Enter 'DEV-WEEU-SAP01-INFRASTRUCTURE' as the Workload zone configuration name and 'MGMT' as the Deployer Environment Name.
87+
88+
You can track the progress in the Azure DevOps portal. Once the deployment is complete, you can see the Workload Zone details in the _Extensions_ tab.
89+
90+
## Deploy the SAP System
91+
92+
The deployment will use the configuration defined in the Terraform variable file located in the 'samples/WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00' folder.
93+
94+
Run the pipeline by selecting the _SAP system deployment_ pipeline from the Pipelines section. Enter 'DEV-WEEU-SAP01-X00' as the SAP System configuration name.
95+
96+
You can track the progress in the Azure DevOps portal. Once the deployment is complete, you can see the SAP System details in the _Extensions_ tab.
97+
98+
## Download the SAP Software
99+
100+
Run the pipeline by selecting the _SAP software acquisition_ pipeline from the Pipelines section. Enter 'S41909SPS03_v0010ms' as the Name of Bill of Materials (BoM), 'MGMT' as the Control Plane Environment name: MGMT and 'WEEU' as the
101+
Control Plane (SAP Library) location code.
102+
103+
You can track the progress in the Azure DevOps portal.
104+
105+
## Run the Configuration and SAP Installation pipeline
106+
107+
Run the pipeline by selecting the _Configuration and SAP installation_ pipeline from the Pipelines section. Enter 'DEV-WEEU-SAP01-X00' as the SAP System configuration name and 'S41909SPS03_v0010ms' as the Bill of Materials name.
108+
109+
Choose the playbooks to execute.
110+
111+
:::image type="content" source="media/automation-devops/automation-os-sap.png" alt-text="Picture showing the DevOps tutorial, OS and SAP configuration":::
112+
113+
You can track the progress in the Azure DevOps portal.
114+
115+
## Run the Repository update pipeline
116+
117+
Run the pipeline by selecting the _Repository updater_ pipeline from the Pipelines section. Enter 'https://github.com/Azure/sap-automation.git' as the Source repository and 'main' as the source branch to update from.
118+
119+
Only choose 'Force the update' if the update fails.
120+
121+
122+
## Run the removal pipeline
123+
124+
Run the pipeline by selecting the _Deployment removal_ pipeline from the Pipelines section.
125+
126+
### SAP System removal
127+
128+
Enter 'DEV-WEEU-SAP01-X00' as the SAP System configuration name.
129+
130+
### SAP Workload Zone removal
131+
132+
Enter 'DEV-WEEU-SAP01-INFRASTRUCTURE' as the SAP workload zone configuration name.
133+
134+
### Control Plane removal
135+
136+
Enter 'MGMT-WEEU-DEP00-INFRASTRUCTURE' as the Deployer configuration name and 'MGMT-WEEU-SAP_LIBRARY' as the
137+
SAP Library configuration name.
138+
## Next step
139+
140+
> [!div class="nextstepaction"]
141+
> [Configure Control Plane](automation-configure-control-plane.md)
142+
143+
144+
145+

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

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.service: virtual-machines-sap
1515

1616
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.
1717

18-
You will perform the following tasks during this lab:
18+
You'll perform the following tasks during this lab:
1919

2020
> [!div class="checklist"]
2121
> * Deploy the Control Plane (Deployer Infrastructure & Library)
@@ -51,7 +51,7 @@ The SAP on Azure deployment automation framework has two main components:
5151

5252
The following diagram shows the dependency between the control plane and the application plane.
5353

54-
:::image type="content" source="./media/automation-deployment-framework/control-plane-sap-infrastructure.png" alt-text="Dependency between the control plane and the application plane":::
54+
:::image type="content" source="media/automation-devops/automation-devops-tutorial-design.png" alt-text="DevOps tutorial infrastructure design":::
5555

5656
The framework uses Terraform for infrastructure deployment, and Ansible for the operating system and application configuration. The following diagram shows the logical separation of the control plane and workload zone.
5757

@@ -113,7 +113,7 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
113113

114114
1. Go to [Azure Cloud Shell](https://shell.azure.com)
115115

116-
1. Log in to your Azure account.
116+
1. Sign in your Azure account.
117117

118118
```cloudshell-interactive
119119
az login
@@ -135,7 +135,7 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
135135
az account list --output=table | grep True
136136
```
137137
138-
1. If required, change your active subscription.
138+
1. If necessary, change your active subscription.
139139
140140
```cloudshell-interactive
141141
az account set --subscription <Subscription ID>
@@ -147,6 +147,15 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
147147
az account list --query "[?isDefault].{Name: name, CloudName: cloudName, SubscriptionId: id, State: state, IsDefault: isDefault}" --output=table
148148
```
149149
150+
1. Optionally remove all the deployment artifacts. Use when you want to remove all remnants of previous deployment artifacts.
151+
152+
```cloudshell-interactive
153+
154+
cd ~
155+
156+
rm -rf Azure_SAP_Automated_Deployment .sap_deployment_automation .terraform.d
157+
```
158+
150159
1. Create the deployment folder and clone the repository.
151160
152161
```cloudshell-interactive
@@ -382,7 +391,7 @@ The sample SAP Library configuration file `MGMT-NOEU-SAP_LIBRARY.tfvars` is in t
382391
383392
## Connect to deployer VM
384393
385-
After preparing the region, the Terraform state file moves to a remote backend, `azurerm`. All secrets for connecting to the deployer VM are available in a key vault within the deployer's resource group.
394+
After the control plane is deployed, the Terraform state is stored using a remote backend, `azurerm`. All secrets for connecting to the deployer VM are available in a key vault in the deployer's resource group.
386395
387396
Make sure you can connect to your deployer VM:
388397
@@ -417,7 +426,7 @@ Make sure you can connect to your deployer VM:
417426
418427
## Get SAP software using the Bill of Materials (BOM)
419428
420-
The Automation Framework gives you tools to download software from SAP using the SAP Bill Of Materials (BOM). The software will be downloaded to the SAP library which acts as the archive for all media required to deploy SAP.
429+
The Automation Framework gives you tools to download software from SAP using the SAP Bill Of Materials (BOM). The software will be downloaded to the SAP library, which acts as the archive for all media required to deploy SAP.
421430
422431
The SAP Bill of Materials (BOM) mimics the SAP maintenance planner. There are relevant product identifiers and a set of download URLs.
423432
@@ -514,7 +523,7 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
514523
515524
```
516525

517-
1. Replace `<Deployer KeyVault Name>` with the name of the deployer resource group key vault
526+
1. Replace `<Deployer KeyVault Name>` with the name of the deployer resource group Azure key vault
518527

519528
Your file should look similar to the following example configuration:
520529

@@ -572,11 +581,11 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
572581
573582
1. Additionally, the following piece of information needs to be collected.
574583
575-
1. The name of deployer state file, can be found under Library resource group
584+
1. The name of deployer state file can be found under Library resource group
576585
- Library resource group -> state storage account -> containers -> tfstate -> Copy the **name** of the Deployer state file.
577586
- Following from the example above, the name of the blob will be: *MGMT-NOEU-DEP00-INFRASTRUCTURE.terraform.tfstate*
578587
579-
1. If required, register the SPN
588+
1. If necessary, register the SPN
580589
581590
> [!IMPORTANT]
582591
> 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.
@@ -612,7 +621,7 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
612621
git pull
613622
```
614623
615-
1. Go into the *WORKSPACES/LANDSCAPE* folder and copy the sample configuration files that you will be using from from the repository.
624+
1. Go into the *WORKSPACES/LANDSCAPE* folder and copy the sample configuration files that you'll be using from the repository.
616625
617626
```bash
618627
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE
@@ -676,7 +685,7 @@ Use the [install_workloadzone](bash/automation-install_workloadzone.md) script t
676685
677686
1. Connect to your deployer VM for the following steps. A copy of the repo is now there.
678687
679-
1. Go into the *WORKSPACES/SYSTEM* folder and copy the sample configuration files that you will be using from from the repository.
688+
1. Go into the *WORKSPACES/SYSTEM* folder and copy the sample configuration files that you'll be using from the repository.
680689
681690
```bash
682691
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM
@@ -754,7 +763,7 @@ This playbook does the generic OS configuration setup on all the machines, which
754763
755764
### Playbook: SAP-Specific OS config
756765
757-
This playbook does the SAP OS configuration setup on all the machines, which includes creation of volume groups, file systems, configuring of software repositories, packages, and services.
766+
This playbook does the SAP OS configuration setup on all the machines. The steps include creation of volume groups, file systems, configuring of software repositories, packages, and services.
758767
759768
### Playbook: BOM Processing
760769
@@ -766,7 +775,7 @@ This playbook will install the HANA database instances.
766775
767776
### Playbook: SCS Install
768777
769-
This playbook will install SAP Central Services. If, high availability is configured the playbook will also install the ERS instance and configure Pacemaker.
778+
This playbook will install SAP Central Services. For highly available configurations, the playbook will also install the SAP ERS instance and configure Pacemaker.
770779
771780
### Playbook: DB Load
772781
@@ -778,7 +787,7 @@ This playbook will install the primary application server.
778787
779788
### Playbook: APP Install
780789
781-
This playbook will install the additional application servers.
790+
This playbook will install the application servers.
782791
783792
You've now deployed and configured a stand-alone HANA system, if you need to configure a highly available SAP HANA database run the HANA HA playbook
784793
@@ -800,7 +809,7 @@ To remove the entire SAP infrastructure you deployed, you need to:
800809
801810
Execute the removal of your SAP infrastructure resources and workload zones from the deployer VM. Execute the removal of the control plane from Cloud Shell.
802811
803-
Before you begin, log in to your Azure account. Then, check that you're in the correct subscription.
812+
Before you begin, sign in your Azure account. Then, check that you're in the correct subscription.
804813
805814
### Remove SAP infrastructure
806815
65.6 KB
Loading
113 KB
Loading
74.6 KB
Loading
54.3 KB
Loading
66.8 KB
Loading
46.4 KB
Loading

0 commit comments

Comments
 (0)