Skip to content

Commit 179eae7

Browse files
author
Kimmo Forss
committed
Add a section on securing
1 parent 1ff13e6 commit 179eae7

File tree

1 file changed

+106
-47
lines changed

1 file changed

+106
-47
lines changed

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

Lines changed: 106 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -68,61 +68,61 @@ You can copy the sample configuration files to start testing the deployment auto
6868

6969
A minimal Terraform file for the `DEPLOYER` might look like this example:
7070

71-
```terraform
72-
# The environment value is a mandatory field, it is used for partitioning the environments.
73-
environment = "MGMT"
74-
# The location/region value is a mandatory field, it is used to control where the resources are deployed
75-
location = "westeurope"
71+
```terraform
72+
# The environment value is a mandatory field, it is used for partitioning the environments.
73+
environment = "MGMT"
74+
# The location/region value is a mandatory field, it is used to control where the resources are deployed
75+
location = "westeurope"
7676
77-
# management_network_address_space is the address space for management virtual network
78-
management_network_address_space = "10.10.20.0/25"
79-
# management_subnet_address_prefix is the address prefix for the management subnet
80-
management_subnet_address_prefix = "10.10.20.64/28"
77+
# management_network_address_space is the address space for management virtual network
78+
management_network_address_space = "10.10.20.0/25"
79+
# management_subnet_address_prefix is the address prefix for the management subnet
80+
management_subnet_address_prefix = "10.10.20.64/28"
8181
82-
# management_firewall_subnet_address_prefix is the address prefix for the firewall subnet
83-
management_firewall_subnet_address_prefix = "10.10.20.0/26"
84-
firewall_deployment = false
82+
# management_firewall_subnet_address_prefix is the address prefix for the firewall subnet
83+
management_firewall_subnet_address_prefix = "10.10.20.0/26"
84+
firewall_deployment = false
8585
86-
# management_bastion_subnet_address_prefix is the address prefix for the bastion subnet
87-
management_bastion_subnet_address_prefix = "10.10.20.128/26"
88-
bastion_deployment = true
86+
# management_bastion_subnet_address_prefix is the address prefix for the bastion subnet
87+
management_bastion_subnet_address_prefix = "10.10.20.128/26"
88+
bastion_deployment = true
8989
90-
# deployer_enable_public_ip controls if the deployer Virtual machines will have Public IPs
91-
deployer_enable_public_ip = false
90+
# deployer_enable_public_ip controls if the deployer Virtual machines will have Public IPs
91+
deployer_enable_public_ip = false
9292
93-
# deployer_count defines how many deployer VMs will be deployed
94-
deployer_count = 1
93+
# deployer_count defines how many deployer VMs will be deployed
94+
deployer_count = 1
9595
96-
# use_service_endpoint defines that the management subnets have service endpoints enabled
97-
use_service_endpoint = true
96+
# use_service_endpoint defines that the management subnets have service endpoints enabled
97+
use_service_endpoint = true
9898
99-
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
100-
use_private_endpoint = false
99+
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
100+
use_private_endpoint = false
101101
102-
# enable_firewall_for_keyvaults_and_storage defines that the storage accounts and key vaults have firewall enabled
103-
enable_firewall_for_keyvaults_and_storage = false
102+
# enable_firewall_for_keyvaults_and_storage defines that the storage accounts and key vaults have firewall enabled
103+
enable_firewall_for_keyvaults_and_storage = false
104104
105-
# public_network_access_enabled controls if storage account and key vaults have public network access enabled
106-
public_network_access_enabled = true
105+
# public_network_access_enabled controls if storage account and key vaults have public network access enabled
106+
public_network_access_enabled = true
107107
108-
```
108+
```
109109

110-
Note the Terraform variable file locations for future edits during deployment.
110+
Note the Terraform variable file locations for future edits during deployment.
111111

112112
A minimal Terraform file for the `LIBRARY` might look like this example:
113113

114-
```terraform
115-
# The environment value is a mandatory field, it is used for partitioning the environments, for example, PROD and NP.
116-
environment = "MGMT"
117-
# The location/region value is a mandatory field, it is used to control where the resources are deployed
118-
location = "westeurope"
114+
```terraform
115+
# The environment value is a mandatory field, it is used for partitioning the environments, for example, PROD and NP.
116+
environment = "MGMT"
117+
# The location/region value is a mandatory field, it is used to control where the resources are deployed
118+
location = "westeurope"
119119
120-
#Defines the DNS suffix for the resources
121-
dns_label = "azure.contoso.net"
120+
#Defines the DNS suffix for the resources
121+
dns_label = "azure.contoso.net"
122122
123-
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
124-
use_private_endpoint = false
125-
```
123+
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
124+
use_private_endpoint = false
125+
```
126126

127127
Note the Terraform variable file locations for future edits during deployment.
128128

@@ -153,12 +153,15 @@ az login --service-principal -u "${ARM_CLIENT_ID}" -p="${ARM_CLIENT_SECRET}" --t
153153
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES
154154

155155

156-
sudo ${SAP_AUTOMATION_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
157-
--deployer_parameter_file "${CONFIG_REPO_PATH}/DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars" \
158-
--library_parameter_file "${CONFIG_REPO_PATH}/LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars" \
159-
--subscription "${ARM_SUBSCRIPTION_ID}" \
160-
--spn_id "${ARM_CLIENT_ID}" \
161-
--spn_secret "${ARM_CLIENT_SECRET}" \
156+
deployer_parameter_file="${CONFIG_REPO_PATH}/DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars"
157+
library_parameter_file="${CONFIG_REPO_PATH}/LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars"
158+
159+
${SAP_AUTOMATION_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
160+
--deployer_parameter_file "${deployer_parameter_file}" \
161+
--library_parameter_file "{library_parameter_file}" \
162+
--subscription "${ARM_SUBSCRIPTION_ID}" \
163+
--spn_id "${ARM_CLIENT_ID}" \
164+
--spn_secret "${ARM_CLIENT_SECRET}" \
162165
--tenant_id "${ARM_TENANT_ID}"
163166
```
164167

@@ -184,7 +187,7 @@ You can track the progress in the Azure DevOps portal. After the deployment is f
184187

185188
---
186189

187-
### Manually configure the deployer by using Azure Bastion
190+
### Manually configure a virtual machine as a SDAF deployer by using Azure Bastion
188191

189192
To connect to the deployer:
190193

@@ -225,7 +228,7 @@ cd sap-automation/deploy/scripts
225228

226229
The script installs Terraform and Ansible and configures the deployer.
227230

228-
### Manually configure the deployer
231+
### Manually configure a virtual machine as a SDAF deployer
229232

230233
Connect to the deployer VM from a computer that can reach the Azure virtual network.
231234

@@ -272,6 +275,62 @@ cd sap-automation/deploy/scripts
272275

273276
The script installs Terraform and Ansible and configures the deployer.
274277

278+
## Securing the control plane
279+
280+
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.
281+
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.
282+
283+
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.
284+
285+
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.
286+
287+
```terraform
288+
289+
# use_private_endpoint defines that the storage accounts and key vaults have private endpoints enabled
290+
use_private_endpoint = true
291+
292+
# public_network_access_enabled controls if storage account and key vaults have public network access enabled
293+
public_network_access_enabled = false
294+
295+
```
296+
297+
Rerun the control plane deployment to enable private endpoints for the storage accounts and key vaults.
298+
299+
```bash
300+
301+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
302+
export ARM_CLIENT_ID="<appId>"
303+
export ARM_CLIENT_SECRET="<password>"
304+
export ARM_TENANT_ID="<tenantId>"
305+
export env_code="MGMT"
306+
export region_code="WEEU"
307+
export vnet_code="DEP00"
308+
export storageaccountname=<storageaccountname>
309+
310+
export DEPLOYMENT_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
311+
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES"
312+
export SAP_AUTOMATION_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
313+
314+
az logout
315+
az login --service-principal -u "${ARM_CLIENT_ID}" -p="${ARM_CLIENT_SECRET}" --tenant "${ARM_TENANT_ID}"
316+
317+
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES
318+
319+
deployer_parameter_file="${CONFIG_REPO_PATH}/DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars"
320+
library_parameter_file="${CONFIG_REPO_PATH}/LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars"
321+
322+
${SAP_AUTOMATION_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
323+
--deployer_parameter_file "${deployer_parameter_file}" \
324+
--library_parameter_file "{library_parameter_file}" \
325+
--subscription "${ARM_SUBSCRIPTION_ID}" \
326+
--spn_id "${ARM_CLIENT_ID}" \
327+
--spn_secret "${ARM_CLIENT_SECRET}" \
328+
--tenant_id "${ARM_TENANT_ID}" \
329+
--storageaccountname "${storageaccountname}" \
330+
--recover
331+
```
332+
333+
275334
## Prepare the web app
276335
This step is optional. If you want a browser-based UX to help the configuration of SAP workload zones and systems, run the following commands before you deploy the control plane.
277336

0 commit comments

Comments
 (0)