Skip to content

Commit ce24f2d

Browse files
Merge pull request #261350 from KimForss/main
Minor control plane updates
2 parents c764c4e + 59a3134 commit ce24f2d

File tree

2 files changed

+43
-23
lines changed

2 files changed

+43
-23
lines changed

articles/sap/automation/deploy-control-plane.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Overview of the control plane deployment process in SAP Deployment
44
author: kimforss
55
ms.author: kimforss
66
ms.reviewer: kimforss
7-
ms.date: 05/19/2023
7+
ms.date: 12/15/2023
88
ms.topic: how-to
99
ms.service: sap-on-azure
1010
ms.subservice: sap-automation
@@ -40,9 +40,15 @@ az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscrip
4040
Optionally, assign the following permissions to the service principal:
4141

4242
```azurecli
43-
az role assignment create --assignee <appId> --role "User Access Administrator" --scope /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>
43+
az role assignment create --assignee <appId> --role "User Access Administrator" --scope /subscriptions/<subscriptionID>
4444
```
4545

46+
If you want to provide the User Access Administrator role scoped to the resource group only, use the following command:
47+
48+
```azurecli
49+
50+
az role assignment create --assignee <appId> --role "User Access Administrator" --scope /subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>
51+
```
4652

4753
## Deploy the control plane
4854

@@ -194,7 +200,7 @@ You can track the progress in the Azure DevOps portal. After the deployment is f
194200

195201
---
196202

197-
### Manually configure a virtual machine as a SDAF deployer by using Azure Bastion
203+
### Manually configure a virtual machine as a SDAF deployer using Azure Bastion
198204

199205
To connect to the deployer:
200206

@@ -222,15 +228,14 @@ Run the following script to configure the deployer:
222228

223229
mkdir -p ~/Azure_SAP_Automated_Deployment; cd $_
224230

225-
git clone https://github.com/Azure/sap-automation-bootstrap.git config
226-
227-
git clone https://github.com/Azure/sap-automation.git sap-automation
231+
wget https://raw.githubusercontent.com/Azure/sap-automation/main/deploy/scripts/configure_deployer.sh -O configure_deployer.sh
232+
chmod +x ./configure_deployer.sh
233+
./configure_deployer.sh
228234

229-
git clone https://github.com/Azure/sap-automation-samples.git samples
235+
# Source the new variables
230236

231-
cd sap-automation/deploy/scripts
237+
. /etc/profile.d/deploy_server.sh
232238

233-
./configure_deployer.sh
234239
```
235240

236241
The script installs Terraform and Ansible and configures the deployer.
@@ -269,15 +274,13 @@ Configure the deployer by using the following script:
269274
```bash
270275
mkdir -p ~/Azure_SAP_Automated_Deployment; cd $_
271276

272-
git clone https://github.com/Azure/sap-automation-bootstrap.git config
273-
274-
git clone https://github.com/Azure/sap-automation.git sap-automation
275-
276-
git clone https://github.com/Azure/sap-automation-samples.git samples
277+
wget https://raw.githubusercontent.com/Azure/sap-automation/main/deploy/scripts/configure_deployer.sh -O configure_deployer.sh
278+
chmod +x ./configure_deployer.sh
279+
./configure_deployer.sh
277280

278-
cd sap-automation/deploy/scripts
281+
# Source the new variables
279282

280-
./configure_deployer.sh
283+
. /etc/profile.d/deploy_server.sh
281284
```
282285

283286
The script installs Terraform and Ansible and configures the deployer.
@@ -287,7 +290,15 @@ The script installs Terraform and Ansible and configures the deployer.
287290
The control plane is the most critical part of the SAP automation framework. It's important to secure the control plane. The following steps help you secure the control plane.
288291
If you have created your control plane using an external virtual machine or by using the cloud shell, you should secure the control plane by implementing private endpoints for the storage accounts and key vaults.
289292

290-
Log on to the deployer virtual machine and copy the control plane configuration `tfvars` terraform files to the deployer. Ensure that the files are located in the `~/Azure_SAP_Automated_Deployment/WORKSPACES` DEPLOYER and LIBRARY folders.
293+
You can use the `sync_deployer.sh` script to copy the control plane configuration files to the deployer VM. Sign in to the deployer VM and run the following commands:
294+
295+
```bash
296+
297+
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES
298+
299+
../sap-automation/deploy/scripts/sync_deployer.sh --storageaccountname mgtneweeutfstate### --state_subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
300+
301+
```
291302

292303
Ensure that the `use_private_endpoint` variable is set to `true` in the `DEPLOYER` and `LIBRARY` configuration files. Also ensure that `public_network_access_enabled` is set to `false` in the `DEPLOYER` configuration files.
293304

articles/sap/automation/tutorial.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use SAP Deployment Automation Framework.
44
author: hdamecharla
55
ms.author: hdamecharla
66
ms.reviewer: kimforss
7-
ms.date: 12/13/2023
7+
ms.date: 12/15/2023
88
ms.topic: tutorial
99
ms.service: sap-on-azure
1010
ms.subservice: sap-automation
@@ -278,7 +278,6 @@ When you choose a name for your service principal, make sure that the name is un
278278
# public_network_access_enabled controls if storage account and key vaults have public network access enabled
279279
public_network_access_enabled = true
280280
281-
282281
```
283282
284283
Note the Terraform variable file locations for future edits during deployment.
@@ -325,7 +324,14 @@ export ARM_TENANT_ID="<tenantId>"
325324
326325
```
327326

328-
1. Create the deployer and the SAP library. Add the service principal details to the deployment key vault.
327+
If you are running the script from a workstation that is not part of the deployment network or from the Azure Cloud Shell, you can use the following command to set the environment variable for allowing connectivity from your IP address:
328+
329+
```bash
330+
export TF_VAR_Agent_IP=<your-public-ip-address>
331+
```
332+
333+
334+
1. Create the deployer and the SAP library and add the service principal details to the deployment key vault using this script.
329335

330336
```bash
331337

@@ -336,15 +342,14 @@ export region_code="<region_code>"
336342
export DEPLOYMENT_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
337343
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES"
338344

339-
340345
cd $CONFIG_REPO_PATH
341346

342347
deployer_parameter_file="${CONFIG_REPO_PATH}/DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars"
343348
library_parameter_file="${CONFIG_REPO_PATH}/LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars"
344349

345350
${SAP_AUTOMATION_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
346351
--deployer_parameter_file "${deployer_parameter_file}" \
347-
--library_parameter_file "${library_parameter_file}" \
352+
--library_parameter_file "${library_parameter_file}" \
348353
--subscription "${ARM_SUBSCRIPTION_ID}" \
349354
--spn_id "${ARM_CLIENT_ID}" \
350355
--spn_secret "${ARM_CLIENT_SECRET}" \
@@ -439,7 +444,9 @@ To connect to your deployer VM:
439444
1. Connect to the deployer VM through any SSH client, such as Visual Studio Code. Use the public IP address you noted earlier and the SSH key you downloaded. For instructions on how to connect to the deployer by using Visual Studio Code, see [Connect to the deployer by using Visual Studio Code](tools-configuration.md#configure-visual-studio-code). If you're using PuTTY, convert the SSH key file first by using PuTTYGen.
440445
441446
> [!NOTE]
442-
>The default username is *azureadm*.
447+
>The default username is *azureadm*.
448+
>
449+
> Ensure that the file you use to save the ssh key can save the file using the correct format, i.e without Carrage Return (CR) characters. Use Visual Studio Code or Notepad++.
443450
444451
After you're connected to the deployer VM, you can download the SAP software by using the Bill of Materials (BOM).
445452
@@ -476,6 +483,8 @@ The rest of the tasks must be executed on the deployer.
476483
477484
The control plane is the most critical part of the SAP automation framework. It's important to secure the control plane. The following steps help you secure the control plane.
478485
486+
You should update the control plane tfvars file to enable private endpoints and to block public access to the storage accounts and key vaults.
487+
479488
To copy the control plane configuration files to the deployer VM, you can use the `sync_deployer.sh` script. Sign in to the deployer VM and run the following commands:
480489
481490
```bash

0 commit comments

Comments
 (0)