From 2f373fc26b7b3c82c3e89eecb20d5befcf994c0e Mon Sep 17 00:00:00 2001 From: Simon Kurtz <84809797+simonkurtz-MSFT@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:06:43 -0500 Subject: [PATCH] Update Dapr to 1.12.0 (#144) * Add missing STORAGE_ACCOUNT_KEY variable * Fix formatting * Update Dapr to 1.12.0 --- .../TasksTracker.Processor.Backend.Svc.csproj | 2 +- .../TasksTracker.TasksManager.Backend.Api.csproj | 2 +- .../TasksTracker.WebPortal.Frontend.Ui.csproj | 2 +- .../03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj | 2 +- .../03-aca-dapr-integration/Frontend.Ui-dotnet8.csproj | 2 +- docs/aca/03-aca-dapr-integration/index.md | 10 +++++----- .../04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj | 2 +- .../04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj | 2 +- .../05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj | 2 +- .../05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj | 2 +- .../containerapps-pubsub-svcbus.yaml | 2 +- docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml | 2 +- docs/aca/05-aca-dapr-pubsubapi/index.md | 2 +- .../Update.ExternalTasksProcessorController.cs | 3 +-- docs/aca/06-aca-dapr-bindingsapi/index.md | 2 +- docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj | 2 +- docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj | 2 +- docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj | 2 +- docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj | 2 +- docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj | 2 +- docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj | 2 +- docs/aca/09-aca-autoscale-keda/index.md | 4 ++-- docs/aca/13-appendix/Set-Variables.ps1 | 1 + mkdocs.yml | 2 +- 24 files changed, 29 insertions(+), 29 deletions(-) diff --git a/TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj b/TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj index 1063aff1..2d8fa840 100644 --- a/TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj +++ b/TasksTracker.Processor.Backend.Svc/TasksTracker.Processor.Backend.Svc.csproj @@ -9,7 +9,7 @@ - + diff --git a/TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj b/TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj index 50841a7f..7dd65ce8 100644 --- a/TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj +++ b/TasksTracker.TasksManager.Backend.Api/TasksTracker.TasksManager.Backend.Api.csproj @@ -9,7 +9,7 @@ - + diff --git a/TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj b/TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj index 193c3e89..0b98d023 100644 --- a/TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj +++ b/TasksTracker.WebPortal.Frontend.Ui/TasksTracker.WebPortal.Frontend.Ui.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj b/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj index db2a9492..6ada4e2a 100644 --- a/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj +++ b/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet8.csproj b/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet8.csproj index 6dded0d6..e5f16afe 100644 --- a/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet8.csproj +++ b/docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet8.csproj @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/docs/aca/03-aca-dapr-integration/index.md b/docs/aca/03-aca-dapr-integration/index.md index de435579..94857d83 100644 --- a/docs/aca/03-aca-dapr-integration/index.md +++ b/docs/aca/03-aca-dapr-integration/index.md @@ -53,6 +53,11 @@ You are now ready to run the applications locally using the Dapr sidecar in a se $UI_APP_PORT=launchSettings.json (e.g. 7000)> ``` + !!! note + Remember to replace the placeholders with your own values based on image below. Remember to use https port number for the Web API application. + + ![app-port](../../assets/images/03-aca-dapr-integration/self_hosted_dapr_app-port.png) + - Now that we know the `UI_APP_PORT`, we can also declare the local frontend UI URL: ```shell @@ -61,9 +66,6 @@ You are now ready to run the applications locally using the Dapr sidecar in a se --8<-- "snippets/update-variables.md::1" -!!! note - Remember to replace the placeholders with your own values based on image below. Remember to use https port number for the Web API application. - #### 2.2 Test `{{ apps.backend }}` Locally === ".NET 6 or below" @@ -74,8 +76,6 @@ You are now ready to run the applications locally using the Dapr sidecar in a se --8<-- "snippets/dapr-run-backend-api.md:basic" - ![app-port](../../assets/images/03-aca-dapr-integration/self_hosted_dapr_app-port.png) - ??? tip "Want to learn more about Dapr run command above?" When using Dapr run command you are running a Dapr process as a sidecar next to the Web API application. The properties you have configured are as follows: diff --git a/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj b/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj index a92dfb10..edbf852a 100644 --- a/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj +++ b/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj b/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj index 77a6b99d..36139a1c 100644 --- a/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj +++ b/docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj b/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj index 9917185b..bd909727 100644 --- a/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj +++ b/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj b/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj index e8e6bf48..529c9b38 100644 --- a/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj +++ b/docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/aca/05-aca-dapr-pubsubapi/containerapps-pubsub-svcbus.yaml b/docs/aca/05-aca-dapr-pubsubapi/containerapps-pubsub-svcbus.yaml index c8814749..0d624de6 100644 --- a/docs/aca/05-aca-dapr-pubsubapi/containerapps-pubsub-svcbus.yaml +++ b/docs/aca/05-aca-dapr-pubsubapi/containerapps-pubsub-svcbus.yaml @@ -1,4 +1,4 @@ -componentType: pubsub.azure.servicebus +componentType: pubsub.azure.servicebus.topics version: v1 metadata: - name: namespaceName diff --git a/docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml b/docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml index 1090a33c..46760c8f 100644 --- a/docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml +++ b/docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml @@ -3,7 +3,7 @@ kind: Component metadata: name: dapr-pubsub-servicebus spec: - type: pubsub.azure.servicebus + type: pubsub.azure.servicebus.topics version: v1 metadata: - name: connectionString # Used for local dev testing. diff --git a/docs/aca/05-aca-dapr-pubsubapi/index.md b/docs/aca/05-aca-dapr-pubsubapi/index.md index 694b3d6c..eae73ca7 100644 --- a/docs/aca/05-aca-dapr-pubsubapi/index.md +++ b/docs/aca/05-aca-dapr-pubsubapi/index.md @@ -381,7 +381,7 @@ az servicebus namespace authorization-rule keys list ` #### 3.2 Create a local Dapr Component file for Pub/Sub API Using Azure Service Bus -Add a new files **components** as shown below: +We need to add a new [Dapr Azure Service Bus Topic component](https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics){target=_blank}. Add a new file in the **components** folder as shown below: ```yaml title="dapr-pubsub-svcbus.yaml" --8<-- "docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml" diff --git a/docs/aca/06-aca-dapr-bindingsapi/Update.ExternalTasksProcessorController.cs b/docs/aca/06-aca-dapr-bindingsapi/Update.ExternalTasksProcessorController.cs index 0b56a71e..1001c0ec 100644 --- a/docs/aca/06-aca-dapr-bindingsapi/Update.ExternalTasksProcessorController.cs +++ b/docs/aca/06-aca-dapr-bindingsapi/Update.ExternalTasksProcessorController.cs @@ -40,8 +40,7 @@ public async Task ProcessTaskAndStore([FromBody] TaskModel taskMo { "blobName", $"{taskModel.TaskId}.json" }, }; - - await _daprClient.InvokeBindingAsync(OUTPUT_BINDING_NAME, OUTPUT_BINDING_OPERATION, taskModel, metaData); + await _daprClient.InvokeBindingAsync(OUTPUT_BINDING_NAME, OUTPUT_BINDING_OPERATION, taskModel, metaData); _logger.LogInformation("Invoked output binding '{0}' for external task. Task name: '{1}', Task Id: '{2}'", OUTPUT_BINDING_NAME, taskModel.TaskName, taskModel.TaskId); diff --git a/docs/aca/06-aca-dapr-bindingsapi/index.md b/docs/aca/06-aca-dapr-bindingsapi/index.md index c94c7d18..2863e489 100644 --- a/docs/aca/06-aca-dapr-bindingsapi/index.md +++ b/docs/aca/06-aca-dapr-bindingsapi/index.md @@ -191,7 +191,7 @@ Update and replace the code in the file with the code below. Pay close attention === "ExternalTasksProcessorController.cs" - ```csharp hl_lines="13-14 37-46" + ```csharp hl_lines="13-14 37-45" --8<-- "docs/aca/06-aca-dapr-bindingsapi/Update.ExternalTasksProcessorController.cs" ``` diff --git a/docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj b/docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj index 68481413..e8f6efbd 100644 --- a/docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj +++ b/docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj b/docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj index bfdf0f60..6eb607ee 100644 --- a/docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj +++ b/docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj b/docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj index 19e696a4..32ac7db4 100644 --- a/docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj +++ b/docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj b/docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj index 6ed2d1bc..2af2159a 100644 --- a/docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj +++ b/docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj b/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj index 6c996c52..54b9ee54 100644 --- a/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj +++ b/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj b/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj index 9820ffe7..52b90f3f 100644 --- a/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj +++ b/docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/aca/09-aca-autoscale-keda/index.md b/docs/aca/09-aca-autoscale-keda/index.md index 14c8c5fd..09b8cb5e 100644 --- a/docs/aca/09-aca-autoscale-keda/index.md +++ b/docs/aca/09-aca-autoscale-keda/index.md @@ -133,7 +133,7 @@ az containerapp update ` ### 4. Scaling Testing -#### 4.1 Run an End-to-End Test and Generate a Several Messages +#### 4.1 Run an End-to-End Test and Generate Several Messages Now we are ready to test out our Azure Service Bus Scaling Rule. To produce a high volume of messages, you can utilize the Service Bus Explorer located within your Azure Service Bus namespace. Navigate to Azure Service Bus, choose your topic/subscription, and then select the Service Bus Explorer option. @@ -146,7 +146,7 @@ az containerapp replica list ` --query [].name ``` -The message structure our backend processor expects is similar to the JSON shown below. So copy this message and click on Send messages button, paste the message content, set the content type to `application/json`, check the `Repeat Send` check box, select `10000` messages and put an interval of `1ms` between them. This ensures that we are sending high volume at short intervals, so that the single replica container app cannot absorb and process quickly enough and will consequently need to scale out. Finally click `Send` when you are ready. +The message structure our backend processor expects is similar to the JSON shown below. So copy this message and click on `Send messages` button, paste the message content, set the content type to `application/json`, check the `Repeat Send` check box, select `10000` messages and put an interval of `1ms` between them. This ensures that we are sending high volume at short intervals, so that the single replica container app cannot absorb and process quickly enough and will consequently need to scale out. Finally click `Send` when you are ready. ```json { diff --git a/docs/aca/13-appendix/Set-Variables.ps1 b/docs/aca/13-appendix/Set-Variables.ps1 index b5abb4b3..f41c4215 100644 --- a/docs/aca/13-appendix/Set-Variables.ps1 +++ b/docs/aca/13-appendix/Set-Variables.ps1 @@ -41,6 +41,7 @@ $vars = @( "SERVICE_BUS_TOPIC_SUBSCRIPTION", "SIGNEDIN_USERID", "STORAGE_ACCOUNT_NAME", + "STORAGE_ACCOUNT_KEY", "TARGET_PORT", "UI_APP_PORT", "VNET_NAME", diff --git a/mkdocs.yml b/mkdocs.yml index 122dd5d9..d8b5f053 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -108,7 +108,7 @@ extra: backendsvc: "ACA Processor - Backend" frontend: "ACA Web - Frontend" dapr: - version: 1.9.0 + version: 1.12.0 docker: targetport: 5000 social: