Skip to content

Commit a250791

Browse files
authored
Merge pull request #66 from Azure-Samples/feature/dts-configuration-and-documentation
feat: configure automatic DTS/Azure Storage switching and fix task hu…
2 parents d8cb5e2 + 9a9da2d commit a250791

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

infra/abbreviations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,5 @@
133133
"webSitesFunctions": "func-",
134134
"webStaticSites": "stapp-",
135135
"dts": "dts-",
136-
"taskhub": "taskhub-"
136+
"taskhub": "taskhub"
137137
}

infra/main.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ module api './app/api.bicep' = {
230230
AZURE_CLIENT_ID: apiUserAssignedIdentity.outputs.clientId
231231
DTS_CONNECTION_STRING: 'Endpoint=${dts.outputs.dts_URL};Authentication=ManagedIdentity;ClientID=${apiUserAssignedIdentity.outputs.clientId}'
232232
TASKHUB_NAME: dts.outputs.TASKHUB_NAME
233+
// Override host.json durableTask storageProvider for Azure (use DTS instead of azureStorage)
234+
'AzureFunctionsJobHost__extensions__durableTask__storageProvider__type': 'azureManaged'
235+
'AzureFunctionsJobHost__extensions__durableTask__storageProvider__connectionStringName': 'DTS_CONNECTION_STRING'
233236
}
234237
}
235238
dependsOn: [

scripts/generate-settings.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ $settingsJson = @"
2525
"AzureWebJobsSecretStorageType": "files",
2626
"FUNCTIONS_WORKER_RUNTIME": "python",
2727
"PYTHON_ENABLE_WORKER_EXTENSIONS": "True",
28-
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
2928
"TASKHUB_NAME": "default",
29+
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
3030
"COSMOS_DATABASE_NAME": "dev-snippet-db",
3131
"COSMOS_CONTAINER_NAME": "code-snippets",
3232
"BLOB_CONTAINER_NAME": "snippet-backups",

scripts/generate-settings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ cat > src/local.settings.json << EOF
1919
"AzureWebJobsSecretStorageType": "files",
2020
"FUNCTIONS_WORKER_RUNTIME": "python",
2121
"PYTHON_ENABLE_WORKER_EXTENSIONS": "True",
22-
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
2322
"TASKHUB_NAME": "default",
23+
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
2424
"COSMOS_DATABASE_NAME": "dev-snippet-db",
2525
"COSMOS_CONTAINER_NAME": "code-snippets",
2626
"BLOB_CONTAINER_NAME": "snippet-backups",

src/local.settings.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
55
"FUNCTIONS_WORKER_RUNTIME": "python",
66
"PYTHON_ENABLE_WORKER_EXTENSIONS": "True",
7-
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
87
"TASKHUB_NAME": "default",
8+
"DTS_CONNECTION_STRING": "Endpoint=http://localhost:8080;Authentication=None",
99
"COSMOS_DATABASE_NAME": "dev-snippet-db",
1010
"COSMOS_CONTAINER_NAME": "code-snippets",
1111
"BLOB_CONTAINER_NAME": "snippet-backups",

0 commit comments

Comments
 (0)