Skip to content

Commit

Permalink
Update Dapr to 1.12.0 (#144)
Browse files Browse the repository at this point in the history
* Add missing STORAGE_ACCOUNT_KEY variable

* Fix formatting

* Update Dapr to 1.12.0
  • Loading branch information
simonkurtz-MSFT authored Nov 20, 2023
1 parent 0006c1b commit 2f373fc
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
<PackageReference Include="SendGrid" Version="9.28.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.29.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions docs/aca/03-aca-dapr-integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ You are now ready to run the applications locally using the Dapr sidecar in a se
$UI_APP_PORT=<web ui https port in Properties->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
Expand All @@ -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"
Expand All @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
componentType: pubsub.azure.servicebus
componentType: pubsub.azure.servicebus.topics
version: v1
metadata:
- name: namespaceName
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/05-aca-dapr-pubsubapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public async Task<IActionResult> 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);

Expand Down
2 changes: 1 addition & 1 deletion docs/aca/06-aca-dapr-bindingsapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Backend.Api-dotnet7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Backend.Api-dotnet8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Backend.Svc-dotnet7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Backend.Svc-dotnet8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.13" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Frontend.Ui-dotnet7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion docs/aca/08-aca-monitoring/Frontend.Ui-dotnet8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.9.0" />
<PackageReference Include="Dapr.AspNetCore" Version="1.12.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions docs/aca/09-aca-autoscale-keda/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions docs/aca/13-appendix/Set-Variables.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ $vars = @(
"SERVICE_BUS_TOPIC_SUBSCRIPTION",
"SIGNEDIN_USERID",
"STORAGE_ACCOUNT_NAME",
"STORAGE_ACCOUNT_KEY",
"TARGET_PORT",
"UI_APP_PORT",
"VNET_NAME",
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2f373fc

Please sign in to comment.