# 更新戦略

## Evergreen アプローチ

SCEPman の更新には Evergreen アプローチを推奨します。これは、SCEPman が production チャネルを使用してデプロイされている場合の既定のアプローチです。SCEPman は、直接次を指すことで ZIP デプロイメントを使用します。 [SCEPman GitHub](https://github.com/scepman) そして、開発チームによって公開された最新バージョンを読み込みます。

production チャネルは、利用可能な他のチャネルとあわせて、次のガイドに記載されています。

{% content-ref url="/pages/3644dbcead6352e391ad2a412f7ecb0506ca0e0a" %}
[Application Artifacts](/ja/scepman-gou-cheng/application-artifacts.md)
{% endcontent-ref %}

このアプローチでは、常に最新の機能とセキュリティ更新を取得できます。

{% hint style="info" %}
念のため、 **更新は、App Service が停止して再起動されたときにのみ発生します**。これが ZIP デプロイメントがトリガーされるイベントです。App Service は自動的には停止および起動しませんが、特定のイベントでは外部から再起動されます。そのようなイベントの 1 つが [基盤となるインフラストラクチャのメンテナンスとパッチ適用](https://learn.microsoft.com/en-us/azure/app-service/routine-maintenance-downtime)です。これらは **定期的に行われ、サービスを最新の状態に保ちます**.
{% endhint %}

本番の企業環境で、更新プロセスをより細かく制御したい場合は、Microsoft の機能である **Deployment Slots**.

## デプロイ スロットの構成

SCEPman の更新プロセスを完全に制御したい場合は、 **Deployment Slots** を Azure App Service 内で使用できます。

{% hint style="success" %}
についてさらに詳しく知るには、 **Deployment Slots** Microsoft のドキュメントをご覧ください。\
<https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots>
{% endhint %}

以下の手順では、プレリリース管理のために推奨するセットアップを示します

{% hint style="info" %}
各 Deployment Slot は本番 App と同じ App Service Plan 上で実行され、同じリソースを使用することに注意してください。
{% endhint %}

### プレリリース スロット

プレリリース スロットの考え方は、本番の App Service を自分の Storage account に保存されたアーティファクトで実行し、GitHub のアーティファクトを指す新しい Deployment Slot を作成することです。カスタムのアーティファクト配置場所を設定する手順は、次の記事で確認できます。

{% content-ref url="/pages/3644dbcead6352e391ad2a412f7ecb0506ca0e0a" %}
[Application Artifacts](/ja/scepman-gou-cheng/application-artifacts.md)
{% endcontent-ref %}

これで本番 App Service はカスタムのアーティファクト配置場所で実行されており、これから新しい Deployment Slot の設定を進めます。

{% hint style="info" %}
Deployment Slot の要件 \*\*\*\*（PS. SCEPman Module 経由）：

* SCEPman **2.2** 以上
* PowerShell SCEPman-Module **1.5.1.0** 以上
  {% endhint %}

次の CMDlet コマンドにより、Deployment Slot が作成され、必要なすべての権限が設定されます。

```
New-SCEPmanDeploymentSlot -SCEPmanAppServiceName <Your SCEPman App Service Name> -DeploymentSlotName <Name For The Deploymentslot> 6>&1
```

**例**

![](/files/0d0ac19d52f7bb346f937f12454753ea7071382b)

デプロイが正常に完了したら、SCEPman App Service の -> で Deployment Slot を確認できます **Deployment slots**

![](/files/4a7d1c376fada29e9480289380648d4f6c386fe1)

次に、Deployment Slot が GitHub 上の SCEPman Production チャネルを指していることを確認してください。

次へ移動して **Deployment Slot** -> **Environment variables** を探し、設定 **WEBSITE\_RUN\_FROM\_PACKAGE** そして [production channel artifacts](/ja/scepman-gou-cheng/application-artifacts.md#production) の値を貼り付けます。

<figure><img src="/files/0327cf88b26e24181ea807a33edbe54ad7c34fc3" alt=""><figcaption></figcaption></figure>

メインの **App Service** に戻って **Deployment Slots y**ou can see your two slots and can manage the **Traffic %** to root the defined among of request to the new **pre-release** slot.\
このトラフィックのルーティングはアプリケーションに対して完全に透過的であり、App Service によって処理されることに注意してください。 **Traffic %** から **20**その後、で 2 つのスロットを比較できます。 **Application Insights**GitHub に更新版を公開した場合は、 **pre-release** スロットを再起動するだけで、その後で 2 つの異なるバージョンをで比較できます。 **Application Insights**1 週間後、または任意の期間の後に、新しい GitHub アーティファクトをカスタムのアーティファクト配置場所にアップロードし、SCEPman ソリューションを更新できます。


---

# Agent Instructions: 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:

```
GET https://docs.scepman.com/ja/azure-gou-cheng/update-strategy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
