> For the complete documentation index, see [llms.txt](https://docs.scepman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scepman.com/ja/azure-gou-cheng/geo-redundancy.md).

# 地理冗長性

{% hint style="warning" %}
SCEPman Enterprise Edition のみ
{% endhint %}

このリファレンス アーキテクチャでは、高可用性を実現するために Azure App Service アプリケーションを複数のリージョンで実行する方法を示します。

{% hint style="info" %}
ジオ冗長性 / 高可用性は、現在 (main) SCEPman App Service でのみ利用できます。理由: Certificate Master のユーザーは通常、時間的にクリティカルではない証明書ワークロードを扱う管理者であり、このような状況を処理する手順の知識を持っているためです。
{% endhint %}

## アーキテクチャ

![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-6865890fc78414e9600419ba8897a3b76803ff92%2F2022-06-23%2012_32_59-GeoRedundancy.png?alt=media)

上の図に示すように、ジオ冗長デプロイでは Azure Traffic Manager プロファイルを活用し、DNS ベースの要求を SCEPman CA に対して、異なる地理的ロケーションにデプロイされた 2 つの SCEPman インスタンスへルーティングします。個々の SCEPman インスタンスは同じ KeyVault、Storage Account、AAD と通信し、そのため同じ Root CA を共有します。Traffic Manager は、選択可能な一連のルーティング アルゴリズムに基づいてトラフィックを負荷分散するだけでなく、SCEPman の両方のインスタンスを継続的にプローブします。インスタンスが利用できなくなった場合、すべてのトラフィックは自動的に利用可能なインスタンスにルーティングされます。

Microsoft は [この記事で](https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/app-service-web-app/multi-region) このタイプのアーキテクチャを管理するために使用できる 3 つの異なる Geo-Redundancy 戦略について説明しています。ただし、ここでは **Active/Active** アプローチを使用します。これは、両方のリージョンがアクティブで、要求がそれらの間で負荷分散されることを意味します。いずれかのリージョンが利用できなくなったり、何らかの理由で遅延が発生したりした場合、Traffic Manager はトラフィックを 2 つ目の App Service にルーティングします。

{% hint style="info" %}
ぜひ次を確認してください [Microsoft の利用可能なリージョン一覧](https://learn.microsoft.com/en-us/azure/reliability/regions-list#azure-regions-list-1) および対応するペアリージョン。ペアになっていないリージョンを使用すると、この冗長化のセットアップ時に問題が発生する可能性があります。
{% endhint %}

## ワークフロー

1. SCEPman App Service を別の地理的ロケーションにクローンします。
2. Traffic Manager を構成し、そのエンドポイントを両方の SCEPman App Services に接続します。
3. 両方の App Services に同じカスタム ドメインを構成します。
4. DNS の CNAME レコードを構成し、カスタム ドメインを Traffic Manager に向けます。

## 手順

{% stepper %}
{% step %}

### App のクローン

App Service をクローンするには、まず新しい **App Service Plan** を 2 つ目の地理的ロケーションに作成する必要があります。ここにクローンされた App がデプロイされます。同じ SCEPman のリソース グループに作成することも、新しいものに作成することもできます。以下のスクリーンショットを参照してください:

![Windows で新しい App Service Plan を作成](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-87bb339bda3436681a5fd22707345bb6d4d5f1f2%2F2022-06-15%2013_29_57-Create%20App%20Service%20Plan.png?alt=media)

{% hint style="info" %}
App Service のクローン要件（ [SCEPman PowerShell Module](/ja/scepman-nodepuroi/permissions/post-installation-config.md#acquire-and-run-the-scepman-installation-powershell-module)):

* SCEPman **2.2** 以上を介して
* SCEPman PowerShell Module **1.6.3.0** 以上を介して
* グローバル管理者の権限
  {% endhint %}

次の CMDlet コマンドで、SCEPman App Service をクローンし、必要なすべての権限を構成します:

```
New-SCEPmanClone -SourceAppServiceName <Your SCEPman App Service Name> -TargetAppServiceName <Your cloned App Service Name> -TargetAppServicePlan <Your second App Service Plan in the second Geo Location> -SearchAllSubscriptions 6>&1
```

* **SourceAppServiceName:** 既存の SCEPman App Service の名前。
* **TargetAppServiceName:** 新しくクローンされた SCEPman App Service の名前。
* **TargetAppServicePlan:** クローンされた SCEPman インスタンスの App Service Plan の名前。App Service Plan は TargetResourceGroup にすでに存在している必要があります。
* **SourceResourceGroup:** (省略可能) 既存の SCEPman App Service をホストしている Azure リソース グループ。自動検出する場合は空欄のままにしてください。
* **TargetResourceGroup:** (省略可能) 新しい SCEPman App Service をホストする Azure リソース グループ。App Service Plan のリソース グループを自動検出する場合は空欄のままにしてください。
* **SourceSubscriptionId:** (省略可能) SCEPman がインストールされているサブスクリプションの ID。az ですでに事前選択されている場合は省略できます。あるいは、SearchAllSubscriptions フラグを使用して、アクセス可能なすべてのサブスクリプションを検索します
* **TargetSubscriptionId:** (省略可能) SCEPman をインストールするサブスクリプションの ID。SourceSubscriptionId と同じ場合は省略できます。
* **SearchAllSubscriptions:** (省略可能) このフラグを設定すると、SCEPman App Service のすべてのサブスクリプションを検索します。そうでない場合は、az で正しいサブスクリプションを事前選択するか、正しい SubscriptionId を渡してください。

#### **例**

既存の SCEPman App Service "app-scepman-contoso" をクローンする

```
New-SCEPmanClone -SourceAppServiceName app-scepman-contoso -TargetAppServiceName app-scepman-clone -TargetAppServicePlan asp-scepman-geo2 -SearchAllSubscriptions 6>&1
```

![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-30e1cb5d7dfe6877face335d0524bae25d402d88%2F2022-06-15%2014_29_28-SCEPmanCloneApp.png?alt=media)

デプロイが正常に完了したら、クローンされた App Service に移動し、SCEPman ホームページで、すべての権限が正しく設定され、すべてが緑で接続済みであることを確認してください（デプロイ完了後、最大 3 分かかる場合があります）。

![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-8faef5c52ed690e841b35c50d979d861bb055725%2F2022-06-21%2010_32_37.png?alt=media)

{% hint style="info" %}
単一障害点を避けるため、次の設定を行うことを推奨します [WEBSITE\_RUN\_FROM\_PACKAGE](/ja/scepman-gou-cheng/application-artifacts.md) クローンされた App Service の値を、Azure 上の 2 つ目の独立したアーティファクト ホストに設定します。

本番チャネル:

`https://install.scepman.com/dist/Artifacts.zip`

元の App Service では、既定で最初のアーティファクト ホストが GitHub リポジトリを指しています。詳細については、次を確認してください [アプリケーション成果物](/ja/scepman-gou-cheng/application-artifacts.md).
{% endhint %}

{% hint style="warning" %}
App Service のクローン作成には、次のような制限があります **自動スケール** 設定、 **バックアップ スケジュール** 設定、 **App Insights**など。クローンできない構成は、クローンされた App Service で手動で再構成する必要があります。さらに、クローン作成後に一方の AppService の設定を変更しても、2 つ目の App Service には自動的に同期されません。詳細については <https://docs.microsoft.com/en-us/azure/app-service/app-service-web-app-cloning#current-restrictions>
{% endhint %}
{% endstep %}

{% step %}

### Traffic Manager のセットアップ

以下の手順に従って Traffic Manager を作成・構成し、両方の SCEPman インスタンス間でトラフィックを分散します:

1. Marketplace で次を検索してください **Traffic Manager プロファイル** をクリックし **作成**.
2. フィールドを入力し、SCEPman のリソース グループを選択します\
   ![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FUgVnDX8hq0TTN00kGdHZ%2Fimage.png?alt=media\&token=d497732c-983e-4e9f-bf31-e4a2c0d51086)
3. 次にクリックします **作成**.
4. Traffic Manager のデプロイ後、それを開いて次をクリックします **構成**
5. 設定を次のように変更し、 **保存します**<br>

   <figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FAnYpAYYRkqhB2fKYNrF3%2Fimage.png?alt=media&amp;token=a6c73544-72fa-4f07-b29d-f8553c81375b" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### エンドポイントの追加

1. 次に、 **設定** 選択します **エンドポイント**
2. "Azure Endpoint" を **種類**として選択し、最初のエンドポイントの名前を入力し、"App Service" を **ターゲット リソースの種類**
3. 主の SCEPman App Service を **ターゲット リソース**<br>

   <figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FjSE1QKh2iExQTuqXrBMB%2Fimage.png?alt=media&amp;token=43112cf2-c134-493e-a0c9-007397cd1744" alt=""><figcaption></figcaption></figure>
4. 2 つ目のエンドポイントでも同じ手順を繰り返し、2 つ目の（クローンされた）SCEPman App Service を **ターゲット リソース**
   {% endstep %}

{% step %}

### カスタム ドメインの構成

Traffic Manager エンドポイントのデプロイと構成が正常に完了したら、次を設定する必要があります **同じ** カスタム ドメインを **両方の** SCEPman インスタンスに、次のように [こちら](/ja/azure-gou-cheng/custom-domain.md).

次の設定の値を変更してください **AppConfig:BaseUrl** 向け **両方の** カスタム ドメインを作成した後の SCEPman App Services です。
{% endstep %}

{% step %}

### DNS の構成

Traffic Manager の **概要で、** DNS に追加する必要のある DNS 名が見つかります

![Traffic Manager の概要](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-d80894aab4311887f9e7b9a063817e0383c89601%2Fscepman_trafficmanager4.png?alt=media)

* DNS 管理サービスに移動します（例: **Azure DNS Zones**)
* Azure App Service インスタンスのいずれかを指している、誤った既存の CNAME エントリがあれば削除し、作成した SCEPman のカスタム ドメインを Traffic Manager の DNS 名にマップする CNAME を追加します。以下の例では、CNAME は次を指す必要があります **gk-blueprint-scepman.trafficmanager.net**.

{% hint style="info" %}
で **Azure DNS Zone**、レコードを変更するには、まず次へ移動して DNS ロックを解除する必要があります **ロック**.
{% endhint %}

{% hint style="info" %}
構成が完了したら、Intune の SCEP プロファイル内の SCEP Server URL を更新してください。新しい URL は、作成したカスタム ドメインの末尾に "/certsrv/mscep/mscep.dll" を付けたものにしてください。

例: <https://scepman.contoso.com/certsrv/mscep/mscep.dll>
{% endhint %}
{% endstep %}

{% step %}

### Storage Account の Geo-Redundancy

既定の SCEPman セットアップでは Locally Redundant Storage (LRS) を使用しており、単一リージョンのみを使用します。

冗長性を Locally Redundant Storage (LRS) から Geo-redundant storage (GRS) に変更します。

![Azure Portal 上の Storage Account 冗長性ダイアログ](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-ef32806a7e8d3c5c76c8b9c5191a527f5bae2037%2Fstorage-account-redundancy%20\(1\).png?alt=media)
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scepman.com/ja/azure-gou-cheng/geo-redundancy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
