-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace CosmosDB with PostgreSQL in ACA Longhaul (#216)
* Removed CosmoDB as dependency. Its transactional support isn't great and we were having issues with it: ``` 2024-01-10T23:08:04.892494542Z time="2024-01-10T23:08:04.892429945Z" level=error msg="Transaction failed due to operation 0 which failed with status code 400" app_id=hashtag-actor component="statestore (state.azure.cosmosdb/v1)" instance=hashtag-actor--vo723vq-56bf46647c-c7v55 scope=dapr.contrib type=log ver=1.11.6 2024-01-10T23:08:04.892663298Z time="2024-01-10T23:08:04.892450433Z" level=debug msg="{ERR_ACTOR_STATE_TRANSACTION_SAVE error saving actor transaction state: transaction failed due to operation 0 which failed with status code 400}" app_id=hashtag-actor instance=hashtag-actor--vo723vq-56bf46647c-c7v55 scope=dapr.runtime.http type=log ver=1.11.6 ``` * Simplified dependency lists * Removed external network from applications -- there's no need to have them exposed to the public internet. * Make resource-names more subscription-dependent, so we can run multiple instances of the same application in different resource groups in the same subscription. Signed-off-by: Tiago Alves Macambira <[email protected]>
- Loading branch information
Showing
15 changed files
with
78 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
deploy/containerapps/daprComponents/statestore-postgresql.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
param environmentName string | ||
|
||
@secure() | ||
param connectionString string | ||
|
||
param componentName string = 'statestore' | ||
|
||
resource environment 'Microsoft.App/managedEnvironments@2022-03-01' existing = { | ||
name: environmentName | ||
} | ||
|
||
resource stateDaprComponent 'Microsoft.App/managedEnvironments/daprComponents@2022-03-01' = { | ||
name: componentName | ||
parent: environment | ||
properties: { | ||
componentType: 'state.postgresql' | ||
version: 'v1' | ||
secrets: [ | ||
{ | ||
name: 'secretconnectionstring' | ||
value: connectionString | ||
} | ||
] | ||
metadata: [ | ||
{ | ||
name: 'connectionString' | ||
secretRef: 'secretconnectionstring' | ||
} | ||
{ | ||
name: 'actorStateStore' | ||
value: 'true' | ||
} | ||
] | ||
scopes: [ | ||
'hashtag-actor' | ||
'snapshot' | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters