Skip to content

Commit f00e8ae

Browse files
committed
Updates
1 parent 70b08f9 commit f00e8ae

File tree

2 files changed

+102
-49
lines changed

2 files changed

+102
-49
lines changed

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

Lines changed: 74 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.service: virtual-machines-sap
1414
You can use Azure Repos to store your configuration files and Azure Pipelines to deploy and configure the infrastructure and the SAP application.
1515
## Sign up for Azure DevOps Services
1616

17-
To use Azure DevOps Services, you'll need an Azure DevOps organization. An organization is used to connect groups of related projects. Use your work or school account to automatically connect your organization to your Azure Active Directory (Azure AD). To create an account, open [Azure DevOps](https://azure.microsoft.com/services/devops/) and either _sign-in_ or create a new account. Record the URL of the project.
17+
To use Azure DevOps Services, you'll need an Azure DevOps organization. An organization is used to connect groups of related projects. Use your work or school account to automatically connect your organization to your Azure Active Directory (Azure AD). To create an account, open [Azure DevOps](https://azure.microsoft.com/services/devops/) and either _sign-in_ or create a new account.
1818

1919
## Create a new project
2020

@@ -25,17 +25,13 @@ Open (https://dev.azure.com) and create a new project by clicking on the _New Pr
2525
> [!NOTE]
2626
> If you are unable to see _New Project_ ensure that you have permissions to create new projects in the organization.
2727
28+
Record the URL of the project.
2829
### Import the repository
2930

3031
Start by importing the SAP Deployment Automation Framework GitHub repository into Azure Repos.
3132

3233
Navigate to the Repositories section and choose Import a repository, import the 'https://github.com/Azure/sap-automation.git' repository into Azure DevOps. For more info, see [Import a repository](/azure/devops/repos/git/import-git-repository?view=azure-devops&preserve-view=true)
3334

34-
> [!NOTE]
35-
> Most of the pipelines will add files to the Azure Repos and therefore require pull permissions. Assign "Contribute" permissions to the 'Build Service' using the Security tab of > the source code repository in the Repositories section in Project settings.
36-
37-
:::image type="content" source="./media/automation-devops/automation-repo-permissions.png" alt-text="Picture showing repository permissions":::
38-
3935
If you are unable to import a repository, you can create the 'sap-automation' repository and manually import the content from the SAP Deployment Automation Framework GitHub repository to it.
4036

4137
### Create the repository for manual import
@@ -49,7 +45,7 @@ Choose the repository type 'Git' and provide a name for the repository, for exam
4945
### Cloning the repository
5046

5147
In order to provide a more comprehensive editing capability of the content, you can clone the repository to a local folder and edit the contents locally.
52-
Clone the repository to a local folder by clicking the _Clone_ button in the Files view in the Repos section of the portal. For more info see [Cloning a repository](/azure/devops/repos/git/clone?view=azure-devops#clone-an-azure-repos-git-repo&preserve-view=true)
48+
Clone the repository to a local folder by clicking the _Clone_ button in the Files view in the Repos section of the portal. For more info, see [Cloning a repository](/azure/devops/repos/git/clone?view=azure-devops#clone-an-azure-repos-git-repo&preserve-view=true)
5349

5450
:::image type="content" source="./media/automation-devops/automation-repo-clone.png" alt-text="Picture showing how to clone the repository":::
5551

@@ -68,27 +64,15 @@ Open the local folder in Visual Studio code, you should see that there are chang
6864
Select the source control icon and provide a message about the change, for example: "Import from GitHub" and press Cntr-Enter to commit the changes. Next select the _Sync Changes_ button to synchronize the changes back to the repository.
6965
### Create configuration root folder
7066

71-
Using your local clone create a top level folder called 'WORKSPACES', this folder will be the root folder for all the SAP deployment configuration files. Create the following folders in the 'WORKSPACES' folder: 'DEPLOYER', 'LIBRARY', 'LANDSCAPE' and 'SYSTEM'.
67+
Create a top level folder called 'WORKSPACES', this folder will be the root folder for all the SAP deployment configuration files. Create the following folders in the 'WORKSPACES' folder: 'DEPLOYER', 'LIBRARY', 'LANDSCAPE' and 'SYSTEM'.
7268

7369
Optionally you may copy the sample configuration files from the 'samples/WORKSPACES' folders to the WORKSPACES folder you just created, this will allow you to experiment with sample deployments.
7470

7571
Push the changes to Azure DevOps repos by selecting the source control icon and providing a message about the change, for example: "Import of sample configurations" and press Cntr-Enter to commit the changes. Next select the _Sync Changes_ button to synchronize the changes back to the repository.
7672

77-
## Set up the Azure Pipelines
78-
79-
To remove the Azure resources, you need an Azure Resource Manager service connection. For more information see [Manage service connections](/azure/devops/pipelines/library/service-endpoints?view=azure-devops&preserve-view=true)
80-
81-
To create the service connection, go to Project settings and navigate to the Service connections setting in the Pipelines section.
82-
83-
:::image type="content" source="./media/automation-devops/automation-create-service-connection.png" alt-text="Picture showing how to create a Service connection":::
84-
85-
Choose _Azure Resource Manager_ as the service connection type and _Service principal (manual)_ as the authentication method. Enter the target subscription, typically the control plane subscription, and provide the service principal details (verify that they're valid using the _Verify_ button). For more information on how to create a service principal, see [Creating a Service Principal](automation-deploy-control-plane.md#prepare-the-deployment-credentials).
86-
87-
Enter a Service connection name, for instance 'Connection to MGMT subscription' and ensure that the _Grant access permission to all pipelines_ checkbox is checked. Select _Verify and save_ to save the service connection.
88-
8973
## Create Azure Pipelines
9074

91-
Azure Pipelines are implemented as YAML files and they're stored in the 'deploy/pipelines' folder in the GitHub repo.
75+
Azure Pipelines are implemented as YAML files and they're stored in the 'deploy/pipelines' folder in the repository.
9276
## Control plane deployment pipeline
9377

9478
Create the control plane deployment pipeline by choosing _New Pipeline_ from the Pipelines section, select 'Azure Repos Git' as the source for your code. Configure your Pipeline to use an existing Azure Pipeline YAML File. Specify the pipeline with the following settings:
@@ -200,7 +184,7 @@ The pipelines use a custom task to perform cleanup activities post deployment. T
200184

201185
## Variable definitions
202186

203-
The deployment pipelines are configured to use a set of predefined parameter values. I Azure DevOps the variables are defined using variable groups.
187+
The deployment pipelines are configured to use a set of predefined parameter values. In Azure DevOps the variables are defined using variable groups.
204188

205189
### Common variables
206190

@@ -230,14 +214,14 @@ As each environment may have different deployment credentials you'll need to cre
230214

231215
Create a new variable group 'SDAF-MGMT' for the control plane environment using the Library page in the Pipelines section. Add the following variables:
232216

233-
| Variable | Value | Notes |
234-
| --------------------- | ---------------------------------------------- | -------------------------------------------------------- |
235-
| Agent | Either 'Azure Pipelines' or the name of the agent pool containing the deployer, for instance 'MGMT-WEEU-POOL' Note, this pool will be created in a later step. |
236-
| ARM_CLIENT_ID | Enter the Service principal application id. | |
237-
| ARM_CLIENT_SECRET | Enter the Service principal password. | Change variable type to secret by clicking the lock icon |
238-
| ARM_SUBSCRIPTION_ID | Enter the target subscription id. | |
239-
| ARM_TENANT_ID | Enter the Tenant id for the service principal. | |
240-
| AZURE_CONNECTION_NAME | Previously created connection name | |
217+
| Variable | Value | Notes |
218+
| --------------------- | ----------------------------------------------- | -------------------------------------------------------- |
219+
| Agent | 'Azure Pipelines' or the name of the agent pool | Note, this pool will be created in a later step. |
220+
| ARM_CLIENT_ID | Enter the Service principal application id. | |
221+
| ARM_CLIENT_SECRET | Enter the Service principal password. | Change variable type to secret by clicking the lock icon |
222+
| ARM_SUBSCRIPTION_ID | Enter the target subscription id. | |
223+
| ARM_TENANT_ID | Enter the Tenant id for the service principal. | |
224+
| AZURE_CONNECTION_NAME | Previously created connection name | |
241225
| sap_fqdn | SAP Fully Qualified Domain Name, for example sap.contoso.net | Only needed if Private DNS isn't used. |
242226

243227
Save the variables.
@@ -247,6 +231,24 @@ Save the variables.
247231
>
248232
> You can use the clone functionality to create the next environment variable group.
249233
234+
## Create an service connection
235+
236+
To remove the Azure resources, you need an Azure Resource Manager service connection. For more information, see [Manage service connections](/azure/devops/pipelines/library/service-endpoints?view=azure-devops&preserve-view=true)
237+
238+
To create the service connection, go to Project settings and navigate to the Service connections setting in the Pipelines section.
239+
240+
:::image type="content" source="./media/automation-devops/automation-create-service-connection.png" alt-text="Picture showing how to create a Service connection":::
241+
242+
Choose _Azure Resource Manager_ as the service connection type and _Service principal (manual)_ as the authentication method. Enter the target subscription, typically the control plane subscription, and provide the service principal details. Validate the credentials using the _Verify_ button. For more information on how to create a service principal, see [Creating a Service Principal](automation-deploy-control-plane.md#prepare-the-deployment-credentials).
243+
244+
Enter a Service connection name, for instance 'Connection to MGMT subscription' and ensure that the _Grant access permission to all pipelines_ checkbox is checked. Select _Verify and save_ to save the service connection.
245+
246+
## Permissions
247+
248+
> [!NOTE]
249+
> Most of the pipelines will add files to the Azure Repos and therefore require pull permissions. Assign "Contribute" permissions to the 'Build Service' using the Security tab of the source code repository in the Repositories section in Project settings.
250+
251+
:::image type="content" source="./media/automation-devops/automation-repo-permissions.png" alt-text="Picture showing repository permissions":::
250252

251253
## Register the Deployer as a self-hosted agent for Azure DevOps
252254

@@ -268,11 +270,51 @@ You must use the Deployer as a [self-hosted agent for Azure DevOps](/azure/devop
268270

269271
:::image type="content" source="./media/automation-devops/automation-new-pat.png" alt-text="Diagram showing the attributes of the Personal Access Token (PAT).":::
270272

273+
## Deploy the Control Plane
274+
275+
Newly created pipelines might not be visible in the default view. Select on recent tab and go back to All tab to view the new pipelines.
276+
277+
Select the _Control plane deployment_ pipeline, provide the configuration names for the deployer and the SAP library and choose "Run" to deploy the control plane.
278+
279+
Wait for the deployment to finish.
280+
271281
## Configure the Azure DevOps Services self-hosted agent
272282

273-
1. Connect to the Deployer using the steps described here [Using Visual Studio Code](automation-tools-configuration.md#configuring-visual-studio-code)
283+
Connect to the deployer by following these steps:
284+
285+
1. Sign in to the [Azure portal](https://portal.azure.com).
286+
287+
1. Navigate to the resource group containing the deployer virtual machine.
288+
289+
1. Connect to the virtual machine using Azure Bastion.
290+
291+
1. The default username is *azureadm*
292+
293+
1. Choose *SSH Private Key from Azure Key Vault*
294+
295+
1. Select the subscription containing the control plane.
296+
297+
1. Select the deployer key vault.
298+
299+
1. From the list of secrets choose the secret ending with *-sshkey*.
274300

275-
1. Open a Terminal window and run:
301+
1. Connect to the virtual machine.
302+
303+
Run the following script to configure the deployer.
304+
305+
```bash
306+
mkdir -p ~/Azure_SAP_Automated_Deployment
307+
308+
cd ~/Azure_SAP_Automated_Deployment
309+
310+
git clone https://github.com/Azure/sap-automation.git
311+
312+
cd sap-automation/deploy/scripts
313+
314+
./configure_deployer.sh
315+
```
316+
317+
Reboot the deployer and reconnect and run the following script to setup the Azure DevOps agent.
276318

277319
```bash
278320
cd ~/Azure_SAP_Automated_Deployment/
@@ -285,12 +327,6 @@ Accept the license and when prompted for server URL, enter the URL you captured
285327
When prompted enter the application pool name, you created in the previous step. Accept the default agent name and the default work folder name.
286328
The agent will now be configured and started.
287329

288-
## Run Azure Pipelines
289-
290-
Newly created pipelines might not be visible in the default view. Select on recent tab and go back to All tab to view the new pipelines.
291-
292-
Select the _Control plane deployment_ pipeline and choose "Run" to deploy the control plane.
293-
294330
## Next step
295331

296332
> [!div class="nextstepaction"]

articles/virtual-machines/workloads/sap/automation-naming-module.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,44 @@ ms.service: virtual-machines-sap
1111

1212
# Overview
1313

14-
The [SAP deployment automation framework on Azure](automation-deployment-framework.md) uses a standard naming convention for Azure [resource naming](automation-naming.md).
14+
The [SAP deployment automation framework on Azure](automation-deployment-framework.md) uses a standard naming convention for Azure [resource naming](automation-naming.md).
15+
16+
The Terraform module `sap_namegenerator` defines the names of all resources that the automation framework deploys. The module is located at `/deploy/terraform/terraform-units/modules/sap_namegenerator/` in the repository. The framework also supports providing you own names for some of the resources using the [parameter files](automation-configure-system.md).
17+
18+
The naming of the resources uses the following format:
19+
20+
resource prefix + resource_group_prefix + separator + resource name + resource suffix.
1521

16-
The Terraform module `sap_namegenerator` defines the names of all resources that the automation framework deploys. The module is located at `/deploy/terraform/terraform-units/modules/sap_namegenerator/` in the repository. The framework also supports providing you own names for some of the resources using the [parameter files](automation-configure-system.md).
1722

1823
If these capabilities are not enough, you can also use custom naming logic by either providing a custom json file containing the resource names or by modifying the naming module used by the automation.
1924

2025
## Provide name overrides using a json file
2126

2227
You can specify a custom naming json file in your tfvars parameter file using the 'name_override_file' parameter.
2328

24-
The json file has sections for the different resource types.
29+
The json file has sections for the different resource types.
2530

2631
The deployment types are:
2732

2833
- DEPLOYER (Control Plane)
2934
- SDU (SAP System Infrastructure)
30-
- VNET (Workload zone)
35+
- WORKLOAD_ZONE (Workload zone)
36+
37+
### Availability set names
3138

39+
The names for the availability sets are defined in the "availabilityset_names" structure. The example below lists the availability set names for a deployment.
40+
41+
```json
42+
"availabilityset_names" : {
43+
"app": "app-avset",
44+
"db" : "db-avset",
45+
"scs": "scs-avset",
46+
"web": "web-avset"
47+
}
48+
```
3249
### Key Vault names
3350

34-
The names for the key vaults are defined in the "keyvault_names" structure. The example below lists the key vault names for a deployment in the "DEV" environment in West Europe.
51+
The names for the key vaults are defined in the "keyvault_names" structure. The example below lists the key vault names for a deployment in the "DEV" environment in West Europe.
3552

3653
```json
3754
"keyvault_names": {
@@ -43,7 +60,7 @@ The names for the key vaults are defined in the "keyvault_names" structure. The
4360
"private_access": "DEVWEEUSAP01X00pABC",
4461
"user_access": "DEVWEEUSAP01X00uABC"
4562
},
46-
"VNET": {
63+
"WORKLOAD_ZONE": {
4764
"private_access": "DEVWEEUSAP01prvtABC",
4865
"user_access": "DEVWEEUSAP01userABC"
4966
}
@@ -57,7 +74,7 @@ The "private_access" names are currently not used.
5774

5875
### Storage Account names
5976

60-
The names for the storage accounts are defined in the "storageaccount_names" structure. The example below lists the storage account names for a deployment in the "DEV" environment in West Europe.
77+
The names for the storage accounts are defined in the "storageaccount_names" structure. The example below lists the storage account names for a deployment in the "DEV" environment in West Europe.
6178

6279
```json
6380
"storageaccount_names": {
@@ -67,7 +84,7 @@ The names for the storage accounts are defined in the "storageaccount_names" str
6784
"terraformstate_storageaccount_name": "devweeutfstateabc"
6885
},
6986
"SDU": "devweeusap01diagabc",
70-
"VNET": {
87+
"WORKLOAD_ZONE": {
7188
"landscape_shared_transport_storage_account_name": "devweeusap01sharedabc",
7289
"landscape_storageaccount_name": "devweeusap01diagabc",
7390
"witness_storageaccount_name": "devweeusap01witnessabc"
@@ -82,7 +99,7 @@ The names for the storage accounts are defined in the "storageaccount_names" str
8299

83100
The names for the virtual machines are defined in the "virtualmachine_names" structure. Both the computer and the virtual machine names can be provided.
84101

85-
The example below lists the virtual machine names for a deployment in the "DEV" environment in West Europe. The deployment has a database server, two application servers, a Central Services server and a web dispatcher.
102+
The example below lists the virtual machine names for a deployment in the "DEV" environment in West Europe. The deployment has a database server, two application servers, a Central Services server and a web dispatcher.
86103

87104
```json
88105
"virtualmachine_names": {
@@ -168,7 +185,7 @@ The different resource names are identified by prefixes in the Terraform code.
168185
- SAP landscape deployments use resource names with the prefix `vnet_`
169186
- SAP system deployments use resource names with the prefix `sdu_`
170187

171-
The calculated names are returned in a data dictionary, which is used by all the terraform modules.
188+
The calculated names are returned in a data dictionary, which is used by all the terraform modules.
172189

173190
## Using custom names
174191

@@ -219,7 +236,7 @@ module "sap_namegenerator" {
219236
db_server_count = var.database_server_count
220237
app_server_count = try(local.application.application_server_count, 0)
221238
web_server_count = try(local.application.webdispatcher_count, 0)
222-
scs_server_count = local.application.scs_high_availability ? 2 * local.application.scs_server_count : local.application.scs_server_count
239+
scs_server_count = local.application.scs_high_availability ? 2 * local.application.scs_server_count : local.application.scs_server_count
223240
app_zones = local.app_zones
224241
scs_zones = local.scs_zones
225242
web_zones = local.web_zones

0 commit comments

Comments
 (0)