Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous Fixes & Updates #169

Merged
merged 11 commits into from
Jan 7, 2025
2 changes: 1 addition & 1 deletion docs/aca/01-deploy-api-to-aca/global-dotnet9.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "9.0.101",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion docs/aca/03-aca-dapr-integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ We are ready now to verify the changes on the Frontend Web App and test locally.

--8<-- "snippets/dapr-run-backend-api.md:basic"

Notice how we assigned the Dapr App Id tasksmanager-frontend-webapp to the Frontend WebApp.
Notice how we assigned the Dapr App Id "tasksmanager-frontend-webapp" to the Frontend WebApp.

!!! note
If you need to run both microservices together, you need to keep calling `dapr run` manually each time in the terminal. And when you have multiple microservices talking to each other you need to run at the same time to debug the solution. This can be a convoluted process. You can refer to the [debug and launch Dapr applications in VSCode](../30-appendix/01-run-debug-dapr-app-vscode.md) to see how to configure VScode for running and debugging Dapr applications.
Expand Down
8 changes: 7 additions & 1 deletion docs/aca/04-aca-dapr-stateapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ $result = az cosmosdb check-name-exists `

# Continue if the Cosmos DB account does not yet exist
if ($result -eq "false") {
echo "Creating Cosmos DB account..."
echo "Creating Cosmos DB account. This may take a few minutes..."

# Create a Cosmos account for SQL API
az cosmosdb create `
Expand Down Expand Up @@ -321,6 +321,12 @@ If you have been using the dapr cli commands instead of the aforementioned debug
!!! note "Deprecation Warning"
components-path is being deprecated in favor of --resources-path. At the time of producing this workshop the --resources-path was not supported yet by the VS code extension. Hence, you will notice the use of the property "componentsPath": "./components" in the tasks.json file. Check the extension documentation in case that has changed.

Run the local frontend UI in the other terminal again:

=== ".NET 8 or above"

--8<-- "snippets/dapr-run-frontend-webapp.md:basic"

After creating a new record you can navigate to the Data explorer on the [Azure portal](https://portal.azure.com){target=_blank} for the Azure Cosmos DB account. It should look like the image below:

![cosmos-db-dapr-state-store](../../assets/images/04-aca-dapr-stateapi/cosmos-db-dapr-state-store.jpg)
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 @@ -356,7 +356,7 @@ az servicebus namespace authorization-rule keys list `

#### 3.2 Create a local Dapr Component file for Pub/Sub API Using Azure Service Bus

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:
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. Be sure to update the connection string value.

```yaml title="dapr-pubsub-svcbus.yaml"
--8<-- "docs/aca/05-aca-dapr-pubsubapi/dapr-pubsub-svcbus.yaml"
Expand Down
1 change: 0 additions & 1 deletion docs/aca/12-optimize-containers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ This image is comprised of one image, 331 packages, and has five vulnerabilities

![Backend API Status Quo Image Stats](../../assets/images/12-optimize-containers/backend-api-chiseled-image-stats.png)


#### 1.4 Deploying the Updated Images

While the image is vastly reduced, what hasn't changed is the functionality of the API. Whether you are executing it locally or deploying to Azure, the Backend API will continue to function as it always has. However, now it has less vulnerabilities, less time to transfer from the registry, less startup time, and less of a memory footprint. Furthermore, 16 MB is the uncompressed image. With compression, we are likely to continue dropping in size.
Expand Down
10 changes: 5 additions & 5 deletions docs/aca/30-appendix/01-run-debug-dapr-app-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ To accomplish this, open file `launch.json` and add the two configurations shown
Make sure you append the configurations below to the existing array instead of replacing what you have. This way you will preserve your existing configuration and simply add two new ones.

??? example "Looking for complete launch.json?"

=== "launch.json"

```json
--8<-- "https://raw.githubusercontent.com/Azure/aca-dotnet-workshop/main/.vscode/launch.json"
```
Expand Down Expand Up @@ -46,9 +46,9 @@ Now we will add 4 tasks, for each application, there will be a task to support t
??? tip "Curious to learn more about the tasks.json file above?"

* The tasks with the label `backend-api-dapr-debug` will invoke the `daprd` task. This task is similar to calling dapr run from CLI.
* We are setting the appPort, httpPort, and grpcPort properties (grpcPort is needed in future modules when we start using the state manager building block.
* We are setting the appPort, httpPort, and grpcPort properties (grpcPort is needed in future modules when we start using the state manager building block.
If you didn't set it, you might face a similar [issue](https://github.com/dapr/dotnet-sdk/issues/609){target=_blank})
* We are setting the componentsPath property. This is needed when start working with the state manager, pub/sub, etc.
* We are setting the "componentsPath" property. This is needed when start working with the state manager, pub/sub, etc.
simonkurtz-MSFT marked this conversation as resolved.
Show resolved Hide resolved
* We are setting the dependsOn property, so this means this task will fire after the dependsOn tasks complete successfully. We need to add those dependsOn tasks.
* The tasks with the label `daprd-down-backend-api` will terminate the Dapr Sidecar process. This will be used for the `postDebug` activity in configuration.json.
* For a complete list of available properties please check this [link.](https://docs.dapr.io/developing-applications/ides/vscode/vscode-how-to-debug-multiple-dapr-apps/#daprd-parameter-table){target=_blank}
Expand Down Expand Up @@ -85,7 +85,7 @@ Next let's add the dependsOn tasks. Open `tasks.json` and add the tasks below:
??? example "Looking for complete tasks.json?"

=== "tasks.json"

```json
--8<-- "https://raw.githubusercontent.com/Azure/aca-dotnet-workshop/main/.vscode/tasks.json"
```
Expand Down
8 changes: 8 additions & 0 deletions snippets/dapr-run-backend-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ dapr run `
--app-id tasksmanager-backend-api `
--app-port $API_APP_PORT `
--dapr-http-port 3500 `
--scheduler-host-address "" `
--app-ssl `
-- dotnet run --launch-profile https
```

!!! note
An [issue with dapr-scheduler](https://github.com/Azure/aca-dotnet-workshop/issues/168){target=_blank} presently exists with Dapr 1.4. However, this should not affect the labs negatively.
--8<-- [end:basic]

<!-- Dapr Components snippet -->
Expand All @@ -22,7 +26,11 @@ dapr run `
--app-port $API_APP_PORT `
--dapr-http-port 3500 `
--app-ssl `
--scheduler-host-address "" `
--resources-path "../components" `
-- dotnet run --launch-profile https
```

!!! note
An [issue with dapr-scheduler](https://github.com/Azure/aca-dotnet-workshop/issues/168){target=_blank} presently exists with Dapr 1.4. However, this should not affect the labs negatively.
--8<-- [end:dapr-components]
4 changes: 4 additions & 0 deletions snippets/dapr-run-backend-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ dapr run `
--app-id tasksmanager-backend-processor `
--app-port $BACKEND_SERVICE_APP_PORT `
--dapr-http-port 3502 `
--scheduler-host-address "" `
--app-ssl `
--resources-path "../components" `
-- dotnet run --launch-profile https
```

!!! note
An [issue with dapr-scheduler](https://github.com/Azure/aca-dotnet-workshop/issues/168){target=_blank} presently exists with Dapr 1.4. However, this should not affect the labs negatively.
--8<-- [end:dapr-components]
4 changes: 4 additions & 0 deletions snippets/dapr-run-frontend-webapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ dapr run `
--app-id tasksmanager-frontend-webapp `
--app-port $UI_APP_PORT `
--dapr-http-port 3501 `
--scheduler-host-address "" `
--app-ssl `
-- dotnet run --launch-profile https
```

!!! note
An [issue with dapr-scheduler](https://github.com/Azure/aca-dotnet-workshop/issues/168){target=_blank} presently exists with Dapr 1.4. However, this should not affect the labs negatively.
--8<-- [end:basic]
Loading