Implementatie van de workloadzone in het SAP-automatiseringsframework

Een SAP-toepassing heeft doorgaans meerdere ontwikkellagen. U hebt bijvoorbeeld ontwikkelings-, kwaliteitsgarantie- en productielagen. SAP Deployment Automation Framework roept deze workloadzones aan.

U kunt workloadzones in meerdere Azure-regio's gebruiken. Elke workloadzone heeft vervolgens een eigen exemplaar van Azure Virtual Network.

De volgende services worden geleverd door de SAP-workloadzone:

  • Een virtueel netwerk, inclusief subnetten en netwerkbeveiligingsgroepen
  • Een Azure Key Vault-exemplaar voor systeemreferenties
  • Een Azure Storage-account voor diagnostische gegevens over opstarten
  • Een opslagaccount voor cloud getuigen
  • Een Azure NetApp Files-account en -capaciteitspools (optioneel)
  • Azure Files NFS-shares (optioneel)
  • Azure Monitor voor SAP (optioneel)

Diagram that shows an SAP workload zone.

De workloadzones worden doorgaans geïmplementeerd in spokes in een hub-and-spoke-architectuur. Ze kunnen zich in hun eigen abonnementen bevinden.

De privé-DNS wordt ondersteund vanuit het besturingsvlak of vanuit een configureerbare bron.

Kernconfiguratie

In het volgende voorbeeldparameterbestand worden alleen vereiste parameters weergegeven.

# The environment value is a mandatory field, it is used for partitioning the environments, for example (PROD and NP)
environment="DEV"

# The location value is a mandatory field, it is used to control where the resources are deployed
location="westeurope"

# The network logical name is mandatory - it is used in the naming convention and should map to the workload virtual network logical name
network_name="SAP01"

# network_address_space is a mandatory parameter when an existing virtual network is not used
network_address_space="10.110.0.0/16"

# admin_subnet_address_prefix is a mandatory parameter if the subnets are not defined in the workload or if existing subnets are not used
admin_subnet_address_prefix="10.110.0.0/19"

# db_subnet_address_prefix is a mandatory parameter if the subnets are not defined in the workload or if existing subnets are not used
db_subnet_address_prefix="10.110.96.0/19"

# app_subnet_address_prefix is a mandatory parameter if the subnets are not defined in the workload or if existing subnets are not used
app_subnet_address_prefix="10.110.32.0/19"

# The automation_username defines the user account used by the automation
automation_username="azureadm"

De implementatiereferenties voor de workloadzone voorbereiden

SAP Deployment Automation Framework maakt gebruik van service-principals bij het uitvoeren van de implementatie. Als u de service-principal wilt maken voor de implementatie van de workloadzone, gebruikt u een account met machtigingen voor het maken van service-principals.

az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscriptionID>" --name="<environment>-Deployment-Account"

Belangrijk

De naam van de service-principal moet uniek zijn.

Noteer de uitvoerwaarden van de opdracht:

  • appId
  • password
  • AD-tenant

Wijs de juiste machtigingen toe aan de service-principal.

az role assignment create --assignee <appId> \
    --scope /subscriptions/<subscriptionID> \
    --role "User Access Administrator"

De SAP-workloadzone implementeren

Het configuratiebestand DEV-WEEU-SAP01-INFRASTRUCTURE.tfvars voor de workloadzone bevindt zich in de ~/Azure_SAP_Automated_Deployment/samples/Terraform/WORKSPACES/LANDSCAPE/DEV-WEEU-SAP01-INFRASTRUCTURE map.

Voer de volgende opdracht uit om de SAP-workloadzone te implementeren.

Voer deze taak uit vanuit de deployer.

U kunt de voorbeeldconfiguratiebestanden kopiëren om het implementatieautomatiseringsframework te testen.

cd ~/Azure_SAP_Automated_Deployment

cp -R sap-automation/samples/WORKSPACES config


export  ARM_SUBSCRIPTION_ID="<subscriptionId>"
export        ARM_CLIENT_ID="<appId>"
export    ARM_CLIENT_SECRET="<password>"
export        ARM_TENANT_ID="<tenantId>"
export             env_code="DEV"
export          region_code="<region_code>"
export            vnet_code="SAP02"
export deployer_environment="MGMT"


export DEPLOYMENT_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/config/WORKSPACES"
export SAP_AUTOMATION_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"

az login --service-principal -u "${ARM_CLIENT_ID}" -p="${ARM_CLIENT_SECRET}" --tenant "${ARM_TENANT_ID}"


cd "${CONFIG_REPO_PATH}/LANDSCAPE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE"
parameterFile="${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars"

$SAP_AUTOMATION_REPO_PATH/deploy/scripts/install_workloadzone.sh   \
    --parameterfile "${parameterFile}"                             \
    --deployer_environment "${deployer_environment}"               \ 
    --subscription "${ARM_SUBSCRIPTION_ID}"                        \
    --spn_id "${ARM_CLIENT_ID}"                                    \
    --spn_secret "${ARM_CLIENT_SECRET}"                            \
    --tenant_id "${ARM_TENANT_ID}"
    

Tip

Als de scripts niet kunnen worden uitgevoerd, kan het soms helpen om de lokale cachebestanden te wissen door de ~/.sap_deployment_automation/ en ~/.terraform.d/ mappen te verwijderen voordat u de scripts opnieuw uitvoert.

Volgende stap