通常、SAP アプリケーションには複数の開発レベルがあります。 たとえば、開発、品質保証、実稼働のレベルがある場合があります。 SAP デプロイAutomationフレームワークでは、これらのレベルをワークロード ゾーンと呼びます。
ワークロード ゾーンは、複数の Azure リージョンで使用できます。 その後、各ワークロード ゾーンには、Azure Virtual Network の独自のインスタンスがあります。
SAP ワークロード ゾーンでは、次のサービスが提供されます。
- サブネットとネットワーク セキュリティ グループを含む仮想ネットワーク
- システム資格情報用の Azure Key Vault インスタンス
- ブート診断用の Azure Storage アカウント
- クラウドの証人用のストレージ アカウント
- Azure NetApp Files アカウントと容量プール (省略可能)
- Azure Files NFS 共有 (オプション)
- Azure Monitor for SAP (省略可能)
ワークロード ゾーンは通常、ハブ・アンド・スポーク アーキテクチャのスポーク部分にデプロイされます。 これらはそれぞれ独自のサブスクリプションにすることができます。
プライベート DNS は、コントロール プレーンまたは構成可能なソースからサポートされます。
コア構成
次のパラメーター ファイルの例では、必要なパラメーターのみを示しています。
# 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"
ワークロード ゾーンのデプロイ資格情報を準備する
SAP Deployment Automation Framework では、デプロイの実行時にサービス プリンシパルが使用されます。 ワークロード ゾーンのデプロイ用のサービス プリンシパルを作成するには、アクセス許可を持つアカウントを使用してサービス プリンシパルを作成します。
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscriptionID>" --name="<environment>-Deployment-Account"
重要
サービス プリンシパルの名前は一意である必要があります。
コマンドの出力値を記録します。
- アプリID
- パスワード
- テナント
サービス プリンシパルに適切なアクセス許可を割り当てます。
az role assignment create --assignee <appId> \
--scope /subscriptions/<subscriptionID> \
--role "User Access Administrator"
SAP ワークロード ゾーンをデプロイする
サンプル ワークロード ゾーン構成ファイル DEV-WEEU-SAP01-INFRASTRUCTURE.tfvars
は、 ~/Azure_SAP_Automated_Deployment/samples/Terraform/WORKSPACES/LANDSCAPE/DEV-WEEU-SAP01-INFRASTRUCTURE
フォルダーにあります。
次のコマンドを実行して、SAP ワークロード ゾーンをデプロイします。
配置者からこのタスクを実行します。
サンプル構成ファイルをコピーして、デプロイ自動化フレームワークのテストを開始できます。
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}"
ヒント
スクリプトの実行に失敗した場合は、スクリプトを再度実行する前に ~/.sap_deployment_automation/
ディレクトリと ~/.terraform.d/
ディレクトリを削除することで、ローカル キャッシュ ファイルをクリアするのに役立つ場合があります。