Skip to content

Commit e149db7

Browse files
Merge pull request #252729 from KimForss/main
Add post deployment step
2 parents 4039a94 + 1268afc commit e149db7

File tree

1 file changed

+45
-49
lines changed

1 file changed

+45
-49
lines changed

articles/sap/automation/tutorial.md

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ A valid SAP user account (SAP-User or S-User account) with software download pri
147147
git clone https://github.com/Azure/sap-automation-samples.git samples
148148
149149
cp -Rp samples/Terraform/WORKSPACES ~/Azure_SAP_Automated_Deployment/WORKSPACES
150-
150+
151151
```
152152
153153
1. Optionally, validate the versions of Terraform and the Azure CLI available on your instance of Cloud Shell.
@@ -258,15 +258,21 @@ If you don't assign the User Access Administrator role to the service principal,
258258
management_bastion_subnet_address_prefix = "10.10.20.128/26"
259259
bastion_deployment = true
260260
261-
261+
# deployer_enable_public_ip controls if the deployer Virtual machines will have Public IPs
262262
deployer_enable_public_ip = true
263263
264+
# deployer_count defines how many deployer VMs will be deployed
264265
deployer_count = 1
265-
266+
267+
# use_service_endpoint defines that the management subnets have service endpoints enabled
266268
use_service_endpoint = true
269+
270+
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
267271
use_private_endpoint = false
268-
enable_firewall_for_keyvaults_and_storage = true
269-
272+
273+
# enable_firewall_for_keyvaults_and_storage defines that the storage accounts and key vaults have firewall enabled
274+
enable_firewall_for_keyvaults_and_storage = false
275+
270276
```
271277
272278
Note the Terraform variable file locations for future edits during deployment.
@@ -279,8 +285,10 @@ If you don't assign the User Access Administrator role to the service principal,
279285
# The location/region value is a mandatory field, it is used to control where the resources are deployed
280286
location = "westeurope"
281287
288+
#Defines the DNS suffix for the resources
282289
dns_label = "azure.contoso.net"
283290
291+
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
284292
use_private_endpoint = false
285293
```
286294
@@ -314,13 +322,13 @@ The sample SAP library configuration file `MGMT-NOEU-SAP_LIBRARY.tfvars` is in t
314322
315323
cd $CONFIG_REPO_PATH
316324
317-
${DEPLOYMENT_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
318-
--deployer_parameter_file DEPLOYER/${env_code}-${region_code}-DEP00-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars \
319-
--library_parameter_file LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars \
320-
--subscription "${subscriptionId}" \
321-
--spn_id "${spn_id}" \
322-
--spn_secret "${spn_secret}" \
323-
--tenant_id "${tenant_id}" \
325+
${DEPLOYMENT_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
326+
--deployer_parameter_file DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars \
327+
--library_parameter_file LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars \
328+
--subscription "${subscriptionId}" \
329+
--spn_id "${spn_id}" \
330+
--spn_secret "${spn_secret}" \
331+
--tenant_id "${tenant_id}" \
324332
--auto-approve
325333
```
326334
@@ -368,15 +376,15 @@ Here are some troubleshooting tips:
368376
The file must contain the environment attribute!!
369377
```
370378
371-
- The following error is transient. Rerun the same command, `prepare_controlplane.sh`.
379+
- The following error is transient. Rerun the same command, `deploy_controlplane.sh`.
372380
373381
```text
374382
Error: file provisioner error
375383
..
376384
timeout - last error: dial tcp
377385
```
378386
379-
- If you have authentication issues directly after you run the script `prepare_controlplane.sh`, run this command:
387+
- If you have authentication issues directly after you run the script `deploy_controlplane.sh`, run this command:
380388
381389
```azurecli
382390
az logout
@@ -441,25 +449,12 @@ To connect to the deployer:
441449
442450
1. Connect to the virtual machine.
443451
444-
To configure the deployer, run the following script:
445-
446-
```bash
447-
448-
mkdir -p ~/Azure_SAP_Automated_Deployment; cd $_
449-
450-
git clone https://github.com/Azure/sap-automation.git sap-automation
451-
452-
git clone https://github.com/Azure/sap-automation-samples.git samples
453-
454-
cd sap-automation/deploy/scripts
455-
456-
./configure_deployer.sh
457-
```
458-
459-
The script installs Terraform and Ansible and configures the deployer.
460452
461453
The rest of the tasks must be executed on the deployer.
462454
455+
## Securing the control plane
456+
457+
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.
463458
## Get SAP software by using the Bill of Materials
464459
465460
The automation framework gives you tools to download software from SAP by using the SAP BOM. The software is downloaded to the SAP library, which acts as the archive for all media required to deploy SAP.
@@ -622,24 +617,25 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
622617
The first time an environment is instantiated, a Service Principal must be registered. In this tutorial, the control plane is in the `MGMT` environment and the workload zone is in `DEV`. Therefore, a Service Principal must be registered for the `DEV` environment.
623618

624619
```bash
625-
export subscriptionId="<subscriptionId>"
626-
export spn_id="<appID>"
627-
export spn_secret="<password>"
628-
export tenant_id="<tenant>"
629-
export key_vault="<vaultID>"
630-
export env_code="DEV"
631-
export region_code="<region_code>"
620+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
621+
export ARM_CLIENT_ID="<appID>"
622+
export ARM_CLIENT_SECRET="<password>"
623+
export ARM_TENANT_ID="<tenant>"
624+
export key_vault="<vaultName>"
625+
export env_code="DEV"
626+
export region_code="<region_code>"
627+
632628
export SAP_AUTOMATION_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
633629
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES"
634630
635631
${SAP_AUTOMATION_REPO_PATH}/deploy/scripts/set_secrets.sh \
636632
--environment "${env_code}" \
637633
--region "${region_code}" \
638634
--vault "${key_vault}" \
639-
--subscription "${subscriptionId}" \
640-
--spn_id "${spn_id}" \
641-
--spn_secret "${spn_secret}" \
642-
--tenant_id "${tenant_id}"
635+
--subscription "${ARM_SUBSCRIPTION_ID}" \
636+
--spn_id "${ARM_CLIENT_ID}" \
637+
--spn_secret "${ARM_CLIENT_SECRET}" \
638+
--tenant_id "${ARM_TENANT_ID}"
643639
```
644640

645641
## Prepare the workload zone deployment
@@ -677,29 +673,29 @@ Use the [install_workloadzone](bash/install-workloadzone.md) script to deploy th
677673
export sap_env_code="DEV"
678674
export region_code="<region_code>"
679675
export key_vault="<vaultID>"
680-
676+
681677
export deployer_vnet_code="DEP01"
682678
export vnet_code="SAP02"
683-
679+
684680
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
685681
export ARM_CLIENT_ID="<appId>"
686682
export ARM_CLIENT_SECRET="<password>"
687683
export ARM_TENANT_ID="<tenantId>"
688-
684+
689685
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE/${sap_env_code}-${region_code}-SAP01-INFRASTRUCTURE
690-
686+
691687
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES"
692688
export SAP_AUTOMATION_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
693-
689+
694690
az login --service-principal -u "${ARM_CLIENT_ID}" -p="${ARM_CLIENT_SECRET}" --tenant "${ARM_TENANT_ID}"
695-
691+
696692
cd "${CONFIG_REPO_PATH}/LANDSCAPE/${sap_env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE"
697693
parameterFile="${sap_env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars"
698694
deployerState="${deployer_env_code}-${region_code}-${deployer_vnet_code}-INFRASTRUCTURE.terraform.tfstate"
699-
695+
700696
$SAP_AUTOMATION_REPO_PATH/deploy/scripts/install_workloadzone.sh \
701697
--parameterfile "${parameterFile}" \
702-
--deployer_environment "${deployer_env_code}" \
698+
--deployer_environment "${deployer_env_code}" \
703699
--deployer_tfstate_key "${deployerState}" \
704700
--keyvault "${key_vault}" \
705701
--storageaccountname "${tfstate_storage_account}" \

0 commit comments

Comments
 (0)