# Update Strategy

## Evergreen Approach

We recommend an Evergreen approach for SCEPman updates. This is the default approach if SCEPman has been deployed using the production channel. SCEPman uses ZIP-Deployment by pointing directly to the [SCEPman GitHub](https://github.com/scepman) and load the latest version that is released by the development team.

The production channel, along with the other available channels, are mentioned in the following guide:

{% content-ref url="/pages/igMpTs5n8FHpDiHdOyt2" %}
[Application Artifacts](/scepman-configuration/application-artifacts.md)
{% endcontent-ref %}

With this approach you always get the newest features and security updates.

{% hint style="info" %}
Keep in mind that **an update only occurs, when the App Service is stopped and started again**. This is the event when the ZIP-Deployment is triggered. While the App Service does not stop and start automatically, it is restarted externally in certain events. One of those events is the [maintenance and patching of the underlying infrastructure](https://learn.microsoft.com/en-us/azure/app-service/routine-maintenance-downtime). Those happen **regularly and keep your service up-to-date**.
{% endhint %}

In a production enterprise environment, if you want to have more control over the update process you can use the Microsoft feature **Deployment Slots**.

## Deployment Slot Configuration

In case you want to have full control over the update process of SCEPman you can use the **Deployment Slots** within the Azure App Service.

{% hint style="success" %}
To get more details about the **Deployment Slots** you can visit the Microsoft docs:\
<https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots>
{% endhint %}

The following steps give you our recommended setup for a pre-release management

{% hint style="info" %}
Please keep in mind that each Deployment Slot is running on the same App Service Plan of your production App and uses the same resources.
{% endhint %}

### Pre-release slot

The idea behind the pre-release slot is to have your production App Service running with artifacts stored on your own Storage account and create a new Deployment Slot pointing to our GitHub artifacts. You can find the steps for setting up your custom artifact location in the following article:

{% content-ref url="/pages/igMpTs5n8FHpDiHdOyt2" %}
[Application Artifacts](/scepman-configuration/application-artifacts.md)
{% endcontent-ref %}

Now your production App Service is running with a custom artifacts location and we proceed with the configuration of the new Deployment Slot.

{% hint style="info" %}
Deployment Slot requirements \*\*\*\* (via PS. SCEPman Module):

* SCEPman **2.2** or above
* PowerShell SCEPman-Module **1.5.1.0** or above
  {% endhint %}

The following CMDlet command will create a Deployment Slot and configure all required permissions for you.

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

**Example**

![](/files/1K8CUXYNFmgTzCWDAzm5)

After the deployment is finished successfully, you can check the deployment slot in your SCEPman App Service -> **Deployment slots**

![](/files/RSUGN6ODUWUbX8yhADwZ)

Now ensure that your deployment slot points to SCEPman Production channel on GitHub:

Navigate to the **Deployment Slot** -> **Environment variables** and look for the setting **WEBSITE\_RUN\_FROM\_PACKAGE** and past the [production channel artifacts](/scepman-configuration/application-artifacts.md#production) to the value.

<figure><img src="/files/SSsuCrv2lJme66oZKzfj" alt=""><figcaption></figcaption></figure>

If you go back to your primary **App Service** and navigate to **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.\
Important that this traffic rooting is completely transparent for the application and handled by the App Service. We recommend setting the **Traffic %** to **20**. After that, you can compare the two slots in **Application Insights**. In case we are releasing an updated version to our GitHub, you only must restart the **pre-release** slot and after that, you can compare the two different versions in **Application Insights**. After one week or your choice of time, you can upload the new GitHub artifacts to your custom artifacts location and have updated the SCEPman solution.


---

# 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/azure-configuration/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.
