diff --git a/README.md b/README.md index da3ff2f..7ce4add 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ It can also access any other custom devices connected to Azure IoT Hub with the - [Usage](#usage) - [Additional Information](#additional-information) - [Logging](#logging) +- [Migrations](#migrations) - [License](#license) ## Requirements @@ -289,6 +290,33 @@ You can configure the applications multiple categories with their logging verbos All categories created by the Cloud Relay API asset are prefixed with `Distech.CloudRelay.API`. All categories created by the Cloud Relay Function App asset are prefixed with `Distech.CloudRelay.Functions`. +## Migrations + +The next sections contain information and instructions about migration and deployment +process between Cloud Relay versions. + +### v1.0 to v1.1 + +The migrations from .NET Core 2.1 to .NET 6.0 and from Azure Functions runtime +2.x to 4.x involved multiple breaking changes. While trying to avoid breaking changes +at the Cloud Relay itself, several of them resulted in mandatory updates in ARM +templates we were unable to avoid, especially at the function app level. +If you previously deployed your infrastructure using the templates contained in this +repository, then you will need to re-deploy them according to the instructions contained +in [Installation - Compute Resources](#compute-resources). +If you manually deployed your resources or throught your own templates, then you +will need to handle the breaking changes accordingly (this list might not be +exhaustive based on the additional functionalities you might be using): +- Cloud Relay API + - If the API is hosted on a linux app service plan, ensure the runtime stack +is properly set to .NET 6 (`linuxFxVersion`). +- Function app + - Ensure the function app runtime is properly set to 4.x (`FUNCTIONS_EXTENSION_VERSION`). + - On Windows hosting, ensure the targeted .NET framework is set to v6.0 (`netFrameworkVersion`). + - On Linux hosting, ensure the runtime stack +is properly set to .NET 6 (`linuxFxVersion`). + - Ensure you are not relying anymore on the deprecated Webjob dashboard (`AzureWebJobsDashboard`). + ## License The Cloud Relay is licensed under the [MIT](LICENSE.txt) license. diff --git a/deploy/Distech.CloudRelay.ARM/Compute/Distech.CloudRelay.Compute.json b/deploy/Distech.CloudRelay.ARM/Compute/Distech.CloudRelay.Compute.json index c5ed5ce..24ce338 100644 --- a/deploy/Distech.CloudRelay.ARM/Compute/Distech.CloudRelay.Compute.json +++ b/deploy/Distech.CloudRelay.ARM/Compute/Distech.CloudRelay.Compute.json @@ -206,7 +206,7 @@ "serverFarmId": "[if(empty(parameters('hostingPlanResourceGroupName')), resourceId('Microsoft.Web/serverfarms', reference(parameters('hostingPlanName')).name), variables('hostingPlanResourceId'))]", "siteConfig": { "alwaysOn": true, - "linuxFxVersion": "[if(equals(reference(variables('hostingPlanResourceId'), '2016-09-01').kind, 'linux'), 'DOTNETCORE|2.1','')]", + "linuxFxVersion": "[if(equals(reference(variables('hostingPlanResourceId'), '2016-09-01').kind, 'linux'), 'DOTNET|6.0','')]", "ftpsState": "Disabled" }, "httpsOnly": true, @@ -347,8 +347,8 @@ "apiVersion": "2018-02-01", "location": "[resourceGroup().location]", "sku": { - "name": "Y1", - "tier": "Dynamic" + "name": "Y1", + "tier": "Dynamic" }, "properties": {} }, @@ -365,11 +365,9 @@ "properties": { "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('consumptionHostingPlanName'))]", "siteConfig": { + "linuxFxVersion": "[if(equals(reference(variables('hostingPlanResourceId'), '2016-09-01').kind, 'linux'), 'DOTNET|6.0','')]", + "netFrameworkVersion": "v6.0", "appSettings": [ - { - "name": "AzureWebJobsDashboard", - "value": "[dc.getStorageAccountConnectionString(parameters('functionAppStorageAccountName'), listKeys(parameters('functionAppStorageAccountName'), '2019-04-01').keys[0].value)]" - }, { "name": "AzureWebJobsStorage", "value": "[dc.getStorageAccountConnectionString(parameters('functionAppStorageAccountName'), listKeys(parameters('functionAppStorageAccountName'), '2019-04-01').keys[0].value)]" @@ -388,7 +386,7 @@ }, { "name": "FUNCTIONS_EXTENSION_VERSION", - "value": "~2" + "value": "~4" }, { "name": "APPINSIGHTS_INSTRUMENTATIONKEY",