Skip to content

Commit f918714

Browse files
committed
updated dts quickstart to use bundles; mapped emulator port number to reduce steps
1 parent 9478967 commit f918714

File tree

1 file changed

+12
-38
lines changed

1 file changed

+12
-38
lines changed

articles/azure-functions/durable/durable-task-scheduler/quickstart-durable-task-scheduler.md

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -72,38 +72,17 @@ Install the latest version of the [Microsoft.Azure.Functions.Worker.Extensions.D
7272

7373
::: zone pivot="other"
7474

75-
Until the durable task scheduler package is added to the extension bundles, you need to manually install the latest version of these packages using [Azure Functions Core Tools](../../functions-run-local.md#install-the-azure-functions-core-tools):
76-
- [Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged/)
77-
- [Microsoft.Azure.WebJobs.Extensions.DurableTask](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask)
75+
In host.json, update the `extensionBundle` property to use the preview version that contains the durable task scheduler package:
7876

79-
For example:
80-
```bash
81-
func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged --version 0.4.2-alpha
82-
```
83-
```bash
84-
func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version 3.0.4
85-
```
86-
87-
These commands should automatically generate a *extensions.csproj* file. If the package references aren't added to the file, check to ensure that `net8.0` is the target framework and run the commands again. The file should have content similar to the following example:
88-
89-
```xml
90-
<Project Sdk="Microsoft.NET.Sdk">
91-
<PropertyGroup>
92-
<TargetFramework>net8.0</TargetFramework>
93-
<WarningsAsErrors></WarningsAsErrors>
94-
<DefaultItemExcludes>**</DefaultItemExcludes>
95-
</PropertyGroup>
96-
<ItemGroup>
97-
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="3.0.4" />
98-
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask.AzureManaged" Version="0.4.2-alpha" />
99-
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.3" />
100-
</ItemGroup>
101-
</Project>
77+
```json
78+
{
79+
"extensionBundle": {
80+
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
81+
"version": "[4.29.0]"
82+
}
83+
}
10284
```
10385

104-
> [!NOTE]
105-
> Remember to remove the reference to extension bundles in `host.json`.
106-
10786
::: zone-end
10887

10988
## Update host.json
@@ -134,7 +113,7 @@ Add connection information for local development:
134113
"Values": {
135114
"FUNCTIONS_WORKER_RUNTIME": "<DEPENDENT ON YOUR PROGRAMMING LANGUAGE>",
136115
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
137-
"DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:<port number>;Authentication=None",
116+
"DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
138117
"TASKHUB_NAME": "default"
139118
}
140119
}
@@ -153,23 +132,20 @@ Get the durable task scheduler emulator port number in [the next step](#set-up-d
153132
1. Run the emulator.
154133

155134
```bash
156-
docker run -itP mcr.microsoft.com/dts/dts-emulator:v0.0.5
135+
docker run -d -p 8080:8080 -p 8082:8082 mcr.microsoft.com/dts/dts-emulator:v0.0.5
157136
```
158137

159138
The following output indicates the emulator started successfully.
160139

161140
:::image type="content" source="media/quickstart-durable-task-scheduler/emulator-started.png" alt-text="Screenshot showing emulator started successfully on terminal.":::
162141

163-
1. Make note of the ports exposed on Docker desktop. These static ports are exposed by the container and mapped dynamically by default. The scheduler exposes multiple ports for different purposes:
142+
1. Make note of the ports exposed on Docker desktop. The scheduler exposes multiple ports for different purposes:
164143

165144
- `8080`: gRPC endpoint that allows an app to connect to the scheduler
166145
- `8082`: Endpoint for durable task scheduler dashboard
167146

168147
:::image type="content" source="media/quickstart-durable-task-scheduler/docker-ports.png" alt-text="Screenshot of ports on Docker.":::
169148

170-
1. Update the connection string in *local.settings.json* with the gRPC endpoint port number.
171-
172-
In the previous example, port `55000` is mapped to the gRPC `8080` endpoint, so the connection string should be `Endpoint=http://localhost:55000;Authentication=None`.
173149

174150
## Test locally
175151

@@ -210,9 +186,7 @@ Get the durable task scheduler emulator port number in [the next step](#set-up-d
210186
}
211187
```
212188

213-
1. To view more details about the orchestration instance, go to the Docker desktop app and click the `8082` link to access the durable task scheduler dashboard.
214-
215-
:::image type="content" source="media/quickstart-durable-task-scheduler/docker-ports.png" alt-text="Screenshot of ports on Docker.":::
189+
1. To view more details about the orchestration instance, go to **http://localhost:8082/** access the durable task scheduler dashboard.
216190

217191
1. Click on the *default* task hub to see its dashboard.
218192

0 commit comments

Comments
 (0)