Skip to content

Commit 4f49fc8

Browse files
committed
Add Dapr components.
1 parent f469d05 commit 4f49fc8

File tree

5 files changed

+37
-3
lines changed

5 files changed

+37
-3
lines changed

EventDriven.CQRS.sln

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ EndProjectSection
3030
EndProject
3131
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "reference-architecture\Common\Common.csproj", "{FC04D111-903D-49FF-84A6-8806C71E2168}"
3232
EndProject
33+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dapr", "dapr", "{F0E48E00-7D72-4614-9C13-90A7B015B06F}"
34+
EndProject
35+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "components", "components", "{00BA9501-787E-465C-97D0-F51295D97802}"
36+
ProjectSection(SolutionItems) = preProject
37+
reference-architecture\dapr\components\pubsub.yaml = reference-architecture\dapr\components\pubsub.yaml
38+
reference-architecture\dapr\components\snssqs-pubsub.yaml = reference-architecture\dapr\components\snssqs-pubsub.yaml
39+
EndProjectSection
40+
EndProject
3341
Global
3442
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3543
Debug|Any CPU = Debug|Any CPU
@@ -67,6 +75,8 @@ Global
6775
{16A5B2CB-8C46-4F3E-B7A1-97C47D9F66E7} = {C4FD0AF1-927A-4860-A634-7CE342807692}
6876
{B11B21E0-7B89-4285-990A-D98793310B02} = {C4FD0AF1-927A-4860-A634-7CE342807692}
6977
{FC04D111-903D-49FF-84A6-8806C71E2168} = {C4FD0AF1-927A-4860-A634-7CE342807692}
78+
{F0E48E00-7D72-4614-9C13-90A7B015B06F} = {AFFCBFA4-9D64-43AA-AC59-D4CC54BD9C72}
79+
{00BA9501-787E-465C-97D0-F51295D97802} = {F0E48E00-7D72-4614-9C13-90A7B015B06F}
7080
EndGlobalSection
7181
GlobalSection(ExtensibilityGlobals) = postSolution
7282
SolutionGuid = {427A0D03-63CA-48AE-AA95-D21800101398}

ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ The **Reference Architecture** projects demonstrate how to apply these concepts
4747
```
4848
2. Use Dapr to run the customer service.
4949
```
50-
dapr run --app-id customer-service --app-port 5000 -- dotnet run
50+
dapr run --app-id customer-service --app-port 5000 --components-path ../dapr/components -- dotnet run
5151
```
5252
3. Use Dapr to run the order service.
5353
```
54-
dapr run --app-id order-service --app-port 5050 -- dotnet run
54+
dapr run --app-id order-service --app-port 5150 --components-path ../dapr/components -- dotnet run
5555
```
5656
4. Create some customers.
5757
- Open http://localhost:5000/swagger

reference-architecture/OrderService/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dotnetRunMessages": "true",
77
"launchBrowser": true,
88
"launchUrl": "swagger",
9-
"applicationUrl": "http://localhost:5050",
9+
"applicationUrl": "http://localhost:5150",
1010
"environmentVariables": {
1111
"ASPNETCORE_ENVIRONMENT": "Development"
1212
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: dapr.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: pubsub
5+
spec:
6+
type: pubsub.redis
7+
metadata:
8+
- name: redisHost
9+
value: localhost:6379
10+
- name: redisPassword
11+
value: ""
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: dapr.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: snssqs-pubsub
5+
spec:
6+
type: pubsub.snssqs
7+
version: v1
8+
metadata:
9+
- name: endpoint
10+
value: http://localhost:4566
11+
# Use us-east-1 for localstack
12+
- name: region
13+
value: us-east-1

0 commit comments

Comments
 (0)