mirror of https://github.com/dapr/quickstarts.git
Reorder quickstarts so the processor is run before the publisher (#637)
Signed-off-by: Doug Davis <dug@microsoft.com>
This commit is contained in:
parent
226bdc26ff
commit
c21a8f58d5
|
@ -39,10 +39,10 @@ jobs:
|
|||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-10.15]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
|
@ -81,11 +81,11 @@ jobs:
|
|||
cluster_name: kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install minikube - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
brew install kubernetes-cli || brew link --overwrite kubernetes-cli
|
||||
brew install minikube
|
||||
minikube start --driver=virtualbox --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
minikube start --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
- name: Get KinD info
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
|
|
|
@ -39,10 +39,10 @@ jobs:
|
|||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-10.15]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
|
@ -81,11 +81,11 @@ jobs:
|
|||
cluster_name: kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install minikube - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
brew install kubernetes-cli || brew link --overwrite kubernetes-cli
|
||||
brew install minikube
|
||||
minikube start --driver=virtualbox --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
minikube start --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
- name: Get KinD info
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
|
|
|
@ -39,10 +39,10 @@ jobs:
|
|||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-10.15]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
|
@ -81,11 +81,11 @@ jobs:
|
|||
cluster_name: kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install minikube - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
brew install kubernetes-cli || brew link --overwrite kubernetes-cli
|
||||
brew install minikube
|
||||
minikube start --driver=virtualbox --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
minikube start --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
- name: Get KinD info
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
|
|
|
@ -39,10 +39,10 @@ jobs:
|
|||
KIND_IMAGE_SHA: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-10.15]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Install docker - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: docker-practice/actions-setup-docker@v1
|
||||
with:
|
||||
docker_buildx: false
|
||||
|
@ -81,11 +81,11 @@ jobs:
|
|||
cluster_name: kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
- name: Install minikube - MacOS
|
||||
if: matrix.os == 'macos-10.15'
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
brew install kubernetes-cli || brew link --overwrite kubernetes-cli
|
||||
brew install minikube
|
||||
minikube start --driver=virtualbox --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
minikube start --memory 4096 --host-only-cidr "192.168.59.1/24"
|
||||
- name: Get KinD info
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
|
|
|
@ -14,42 +14,6 @@ And one subscriber:
|
|||
|
||||
- Dotnet subscriber `order-processor`
|
||||
|
||||
### Run Dotnet message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Dotnet dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dotnet restore
|
||||
dotnet build
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Dotnet publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Dotnet publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- '== APP == Published data: Order { OrderId = 1 }'
|
||||
- '== APP == Published data: Order { OrderId = 2 }'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./checkout
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Dotnet message subscriber with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
@ -86,3 +50,43 @@ dapr run --app-id order-processor --components-path ../../../components/ --app-p
|
|||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Dotnet message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Dotnet dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dotnet restore
|
||||
dotnet build
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Dotnet publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Dotnet publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- '== APP == Published data: Order { OrderId = 1 }'
|
||||
- '== APP == Published data: Order { OrderId = 2 }'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./checkout
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -14,42 +14,6 @@ And one subscriber:
|
|||
|
||||
- Dotnet subscriber `order-processor`
|
||||
|
||||
### Run Dotnet message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Dotnet dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dotnet restore
|
||||
dotnet build
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Dotnet publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Dotnet publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- '== APP == Published data: Order { OrderId = 1 }'
|
||||
- '== APP == Published data: Order { OrderId = 2 }'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./checkout
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Dotnet message subscriber with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
@ -86,3 +50,43 @@ dapr run --app-id order-processor --components-path ../../../components/ --app-p
|
|||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Dotnet message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Dotnet dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dotnet restore
|
||||
dotnet build
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Dotnet publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Dotnet publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- '== APP == Published data: Order { OrderId = 1 }'
|
||||
- '== APP == Published data: Order { OrderId = 2 }'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./checkout
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -14,6 +14,41 @@ And one subscriber:
|
|||
|
||||
- Go subscriber `order-processor`
|
||||
|
||||
### Run Go message subscriber with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Build Go file
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
go build app.go
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Go subscriber app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Go subscriber
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received: {"orderId":10}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 6002 --app-id order-processor --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run app.go
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Go message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
@ -38,7 +73,7 @@ expected_stdout_lines:
|
|||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
```bash
|
||||
|
@ -46,43 +81,9 @@ cd ./checkout
|
|||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run app.go
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Go message subscriber with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Build Go file
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
go build app.go
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Go subscriber app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Go subscriber
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received: {"orderId":10}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run app.go
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -67,7 +67,7 @@ func main() {
|
|||
// Dapr subscription routes orders topic to this route
|
||||
r.HandleFunc("/orders", postOrder).Methods("POST")
|
||||
|
||||
if err := http.ListenAndServe(":6001", r); err != nil {
|
||||
if err := http.ListenAndServe(":6002", r); err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,40 +14,6 @@ And one subscriber:
|
|||
|
||||
- Go subscriber `order-processor`
|
||||
|
||||
### Run Go message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Build Go file
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
go build app.go
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Go publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Go publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == Published data: {"orderId":1}'
|
||||
- '== APP == Published data: {"orderId":2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run app.go
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Go message subscriber with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
@ -72,7 +38,7 @@ expected_stdout_lines:
|
|||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
```bash
|
||||
|
@ -82,6 +48,40 @@ dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-htt
|
|||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Go message publisher with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Build Go file
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
go build app.go
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Go publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Go publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == Published data: {"orderId":1}'
|
||||
- '== APP == Published data: {"orderId":2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run app.go
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
|
|
|
@ -23,8 +23,36 @@ And one subscriber:
|
|||
* [OpenJDK 11](https://jdk.java.net/11/)
|
||||
* [Apache Maven](https://maven.apache.org/install.html) version 3.x.
|
||||
|
||||
### Run Java message publisher app with Dapr
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
expected_stdout_lines:
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
### Run Java message publisher app with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
|
@ -57,38 +85,7 @@ sleep: 10
|
|||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
expected_stdout_lines:
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -23,8 +23,37 @@ And one subscriber:
|
|||
* [OpenJDK 11](https://jdk.java.net/11/)
|
||||
* [Apache Maven](https://maven.apache.org/install.html) version 3.x.
|
||||
|
||||
### Run Java message publisher app with Dapr
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./order-processor
|
||||
expected_stdout_lines:
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message publisher app with Dapr
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
|
@ -57,38 +86,7 @@ sleep: 10
|
|||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./order-processor
|
||||
expected_stdout_lines:
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -14,6 +14,39 @@ And one subscriber:
|
|||
|
||||
- Node subscriber `order-processor`
|
||||
|
||||
### Run Node message subscriber with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Node dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
npm install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Node publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Node publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Node message publisher with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
@ -46,41 +79,9 @@ sleep: 10
|
|||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Node message subscriber with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Node dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
npm install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
2. Run the Node publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Node publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -14,6 +14,39 @@ And one subscriber:
|
|||
|
||||
- Node subscriber `order-processor`
|
||||
|
||||
### Run Node message subscriber with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Node dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
npm install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
3. Run the Node publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Node publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received: {"orderId":2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Node message publisher with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
@ -46,41 +79,9 @@ sleep: 10
|
|||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Node message subscriber with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Node dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
npm install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
3. Run the Node publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Node publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received: {"orderId":2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
working_dir: ./order-processor
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ --app-port 5001 -- node .
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -14,39 +14,6 @@ And one subscriber:
|
|||
|
||||
- Python subscriber `order-processor`
|
||||
|
||||
### Run Python message publisher with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install python dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
3. Run the Python publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run python publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == INFO:root:Published data: {"orderId": 1}'
|
||||
- '== APP == INFO:root:Published data: {"orderId": 2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
working_dir: ./checkout
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Python message subscriber with Dapr
|
||||
|
||||
2. Install dependencies:
|
||||
|
@ -81,6 +48,40 @@ dapr run --app-id order-processor --components-path ../../../components/ --app-p
|
|||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Python message publisher with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install python dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
3. Run the Python publisher app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run python publisher
|
||||
expected_stdout_lines:
|
||||
- '== APP == INFO:root:Published data: {"orderId": 1}'
|
||||
- '== APP == INFO:root:Published data: {"orderId": 2}'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
working_dir: ./checkout
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
|
|
|
@ -14,6 +14,40 @@ And one subscriber:
|
|||
|
||||
- Python subscriber `order-processor`
|
||||
|
||||
### Run Python message subscriber with Dapr
|
||||
|
||||
<!-- STEP
|
||||
name: run
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Python subscriber app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run python subscriber
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received : 4'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
working_dir: ./order-processor
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 5001 -- python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Python message publisher with Dapr
|
||||
|
||||
1. Install dependencies:
|
||||
|
@ -47,39 +81,6 @@ sleep: 10
|
|||
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
### Run Python message subscriber with Dapr
|
||||
|
||||
<!-- STEP
|
||||
name: run
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Python subscriber app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run python subscriber
|
||||
expected_stdout_lines:
|
||||
- '== APP == Subscriber received : 4'
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
working_dir: ./order-processor
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
|
||||
```bash
|
||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 5001 -- python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
|
|
|
@ -83,4 +83,8 @@ cd ./checkout
|
|||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- dotnet run
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -21,44 +21,6 @@ And one order processor service:
|
|||
* [OpenJDK 11](https://jdk.java.net/11/)
|
||||
* [Apache Maven](https://maven.apache.org/install.html) version 3.x.
|
||||
|
||||
### Run Java checkout service with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `checkout` directory:
|
||||
|
||||
```bash
|
||||
cd checkout
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install maven dependencies
|
||||
working_dir: ./checkout
|
||||
-->
|
||||
|
||||
```bash
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
3. Run the Java checkout app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Java checkout service
|
||||
expected_stdout_lines:
|
||||
- "== APP == Order passed: 1"
|
||||
- "== APP == Order passed: 2"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java order-processor with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `order-processor` directory:
|
||||
|
@ -97,3 +59,44 @@ dapr run --app-id order-processor --app-port 6001 --app-protocol http --dapr-htt
|
|||
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java checkout service with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `checkout` directory:
|
||||
|
||||
```bash
|
||||
cd checkout
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install maven dependencies
|
||||
working_dir: ./checkout
|
||||
-->
|
||||
|
||||
```bash
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
3. Run the Java checkout app with Dapr:
|
||||
|
||||
<!-- STEP
|
||||
name: Run Java checkout service
|
||||
expected_stdout_lines:
|
||||
- "== APP == Order passed: 1"
|
||||
- "== APP == Order passed: 2"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 15
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -86,4 +86,4 @@ dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- npm sta
|
|||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -86,4 +86,4 @@ dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- python3
|
|||
```bash
|
||||
dapr stop --app-id checkout
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -9,7 +9,7 @@ logging.basicConfig(level=logging.INFO)
|
|||
base_url = os.getenv('BASE_URL', 'http://localhost') + ':' + os.getenv(
|
||||
'DAPR_HTTP_PORT', '3500')
|
||||
# Adding app id as part of the header
|
||||
headers = {'dapr-app-id': 'order-processor'}
|
||||
headers = {'dapr-app-id': 'order-processor', 'content-type': 'application/json'}
|
||||
|
||||
for i in range(1, 11):
|
||||
order = {'orderId': i}
|
||||
|
|
|
@ -48,4 +48,4 @@ dapr run --app-id order-processor --components-path ../../../components/ -- dotn
|
|||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -48,4 +48,4 @@ dapr run --app-id order-processor --components-path ../../../components/ -- dotn
|
|||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -47,4 +47,4 @@ dapr run --app-id order-processor --components-path ../../../components -- go ru
|
|||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -47,4 +47,4 @@ dapr run --app-id order-processor --components-path ../../../components -- go ru
|
|||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -56,4 +56,4 @@ dapr run --app-id order-processor --components-path ../../../components/ -- java
|
|||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
```
|
||||
|
|
|
@ -43,4 +43,8 @@ sleep: 10
|
|||
dapr run --app-id order-processor --components-path ../../../components/ -- npm start
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -46,4 +46,8 @@ sleep: 10
|
|||
dapr run --app-id order-processor --components-path ../../../components/ -- npm start
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
<!-- END_STEP -->
|
||||
|
||||
```bash
|
||||
dapr stop --app-id order-processor
|
||||
```
|
||||
|
|
|
@ -96,6 +96,7 @@ component.dapr.io/statestore created
|
|||
|
||||
<!-- STEP
|
||||
name: Deploy Node App
|
||||
sleep: 60
|
||||
expected_stdout_lines:
|
||||
- "service/nodeapp created"
|
||||
- "deployment.apps/nodeapp created"
|
||||
|
|
Loading…
Reference in New Issue