SAP オートメーション フレームワークでのワークロード ゾーンのデプロイ

通常、SAP アプリケーションには複数の開発レベルがあります。 たとえば、開発、品質保証、実稼働のレベルがある場合があります。 SAP デプロイAutomationフレームワークでは、これらのレベルをワークロード ゾーンと呼びます。

ワークロード ゾーンは複数の Azure リージョンで使用できます。 そのため、各ワークロード ゾーンにそれぞれ独自の Azure Virtual Network のインスタンスがあります。

SAP ワークロード ゾーンでは、次のサービスが提供されます。

  • サブネットとネットワーク セキュリティ グループを含む仮想ネットワーク
  • システム資格情報用の Azure Key Vault インスタンス
  • ブート診断用の Azure ストレージ アカウント
  • クラウド監視用のストレージ アカウント
  • Azure NetApp Files アカウントと容量プール (省略可能)
  • Azure Files NFS 共有 (省略可能)
  • Azure Monitor for SAP (省略可能)

Diagram that shows an SAP workload zone.

ワークロード ゾーンは通常、ハブ アンド スポーク アーキテクチャのスポークにデプロイされます。 これらは独自のサブスクリプションに含まれている場合があります。

プライベート 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"

重要

サービス プリンシパルの名前は一意であることが必要です。

コマンドからの次の出力値を記録します。

  • appId
  • password
  • tenant

サービス プリンシパルに適切なアクセス許可を割り当てます。

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 ワークロード ゾーンをデプロイします。

Deployer からこのタスクを実行します。

サンプル構成ファイルをコピーして、デプロイ自動化フレームワークのテストを開始することができます。

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/ ディレクトリを削除して、ローカル キャッシュ ファイルをクリアすると役立つ場合があります。

次のステップ