> 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/update-strategy.md).

# 更新戦略

## エバーグリーン アプローチ

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

production channel と、利用可能な他の channel については、以下のガイドに記載されています:

{% content-ref url="/pages/3644dbcead6352e391ad2a412f7ecb0506ca0e0a" %}
[アプリケーション成果物](/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 %}

以下の手順では、pre-release 管理のための推奨セットアップを示します

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

### Pre-release スロット

pre-release スロットの目的は、本番 App Service を独自の Storage アカウントに保存された成果物で稼働させ、GitHub の成果物を指す新しい Deployment Slot を作成することです。カスタム成果物の保存場所を設定する手順は、次の記事で確認できます:

{% content-ref url="/pages/3644dbcead6352e391ad2a412f7ecb0506ca0e0a" %}
[アプリケーション成果物](/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
```

**例**

![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-e6d6f6705ddea62ace2056be7939000667f1be20%2F2022-06-13%2017_36_44-DeploymentSlotCommand.png?alt=media)

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

![](https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2Fgit-blob-dc8370a42c97d7d629bf570e79136d689eb64fa9%2F2022-06-13%2011_53_59-DeploymentSlot.png?alt=media)

ここで、deployment slot が GitHub 上の SCEPman Production channel を指していることを確認してください:

次へ移動します **Deployment Slot** -> **環境変数** そして、設定項目を探します **WEBSITE\_RUN\_FROM\_PACKAGE** そして、次の値を貼り付けます [production channel の成果物](/ja/scepman-gou-cheng/application-artifacts.md#production) を値に設定します。

<figure><img src="https://114237723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LoGejQeUQcw7lqnQ3WX%2Fuploads%2FhWunHIoJy8uhT2T5S6Mq%2Fimage.png?alt=media&amp;token=4430a03c-7728-4ed5-9207-e711a279996e" alt=""><figcaption></figcaption></figure>

メインの **App Service** に戻って、 **Deployment Slots と**2 つのスロットを確認でき、次を管理できます **トラフィック %** 定義されたリクエスト量を新しい **pre-release** スロット。\
このトラフィックルーティングはアプリケーションに対して完全に透過的であり、App Service によって処理されることに注意してください。設定することを推奨します。 **トラフィック %** を **20**. その後、2 つのスロットを比較できます **Application Insights**. GitHub に更新版をリリースした場合は、再起動するだけで済みます **pre-release** スロット。その後、2 つの異なるバージョンを比較できます **Application Insights**. 1 週間後、または任意の期間の後に、新しい GitHub の成果物をカスタム成果物の保存場所にアップロードし、SCEPman ソリューションを更新できます。


---

# 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/update-strategy.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.
