mirror of https://github.com/dapr/quickstarts.git
Release 1.6 (#525)
* replace ports 5000/7000 with 5001/7001 to eliminate conflict with Control Center on MacOS (#521) Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com> * Sync master into release-1.6 (#523) * Make sure the client is actual built (#517) Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com> * Update DevContainer base image to fix CodeSpaces and DevContainer issues (#519) * Update base image to later Universal 1.x Focal, but still pin to 1.x major version Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> * Updated readme to clarify pre-req SKUs for GitHub CodeSpaces support Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com> * Setting FLASK_RUN_PORT=5001 in distributed-calc Signed-off-by: Charlie Stanley <wistanle@microsoft.com> Co-authored-by: Xavier Geerinck <xavier.geerinck@gmail.com> Co-authored-by: Paul Yuknewicz <paulyuk@microsoft.com> Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com> Co-authored-by: Charlie Stanley <wistanle@microsoft.com> * update README (#524) Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com> Co-authored-by: Charlie Stanley <charlie.stanley@microsoft.com> Co-authored-by: Xavier Geerinck <xavier.geerinck@gmail.com> Co-authored-by: Paul Yuknewicz <paulyuk@microsoft.com> Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com> Co-authored-by: Charlie Stanley <wistanle@microsoft.com>
This commit is contained in:
parent
c85ef27ff7
commit
68da2d852e
|
|
@ -26,6 +26,7 @@ Dapr is currently under community development with preview releases. The master
|
|||
|
||||
| Dapr Quickstart Version | Dapr Runtime Version |
|
||||
|:--------------------:|:--------------------:|
|
||||
| [v1.6.0](https://github.com/dapr/quickstarts/tree/v1.6.0) | [v1.6.0](https://github.com/dapr/dapr/tree/v1.6.0) |
|
||||
| [v1.5.0](https://github.com/dapr/quickstarts/tree/v1.5.0) | [v1.5.0](https://github.com/dapr/dapr/tree/v1.5.0) |
|
||||
| [v1.4.0](https://github.com/dapr/quickstarts/tree/v1.4.0) | [v1.4.0](https://github.com/dapr/dapr/tree/v1.4.0) |
|
||||
| [v1.3.0](https://github.com/dapr/quickstarts/tree/v1.3.0) | [v1.3.0](https://github.com/dapr/dapr/tree/v1.3.0) |
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
},
|
||||
{
|
||||
"appId": "subtractapp",
|
||||
"appPort": 7000,
|
||||
"appPort": 7001,
|
||||
"httpPort": 3504,
|
||||
"metricsPort": 9091,
|
||||
"grpcPort": 50015,
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
},
|
||||
{
|
||||
"appId": "multiplyapp",
|
||||
"appPort": 5000,
|
||||
"appPort": 5001,
|
||||
"httpPort": 3501,
|
||||
"metricsPort": 9093,
|
||||
"grpcPort": 50003,
|
||||
|
|
|
|||
|
|
@ -80,15 +80,15 @@ sleep: 2
|
|||
|
||||
2. Subtract App - Open a terminal window and navigate to the csharp directory and follow the steps below:
|
||||
|
||||
- Set environment variable to use non-default app port 7000
|
||||
- Set environment variable to use non-default app port 7001
|
||||
```bash
|
||||
#Linux/Mac OS:
|
||||
export ASPNETCORE_URLS="http://localhost:7000"
|
||||
export ASPNETCORE_URLS="http://localhost:7001"
|
||||
```
|
||||
|
||||
```bash
|
||||
#Windows:
|
||||
set ASPNETCORE_URLS=http://localhost:7000
|
||||
set ASPNETCORE_URLS=http://localhost:7001
|
||||
```
|
||||
|
||||
<!-- STEP
|
||||
|
|
@ -115,13 +115,13 @@ output_match_mode: substring
|
|||
working_dir: "./csharp/bin/Debug/netcoreapp3.1"
|
||||
background: true
|
||||
env:
|
||||
ASPNETCORE_URLS: 'http://localhost:7000'
|
||||
ASPNETCORE_URLS: 'http://localhost:7001'
|
||||
sleep: 2
|
||||
-->
|
||||
|
||||
- Navigate to ./bin/Debug/netcoreapp3.1 and start Dapr using command:
|
||||
```bash
|
||||
dapr run --app-id subtractapp --app-port 7000 --dapr-http-port 3504 dotnet Subtract.dll
|
||||
dapr run --app-id subtractapp --app-port 7001 --dapr-http-port 3504 dotnet Subtract.dll
|
||||
```
|
||||
|
||||
|
||||
|
|
@ -179,10 +179,10 @@ working_dir: "./python"
|
|||
- Set environment variable to use non-default app port 5000
|
||||
```bash
|
||||
#Linux/Mac OS:
|
||||
export FLASK_RUN_PORT=5000
|
||||
export FLASK_RUN_PORT=5001
|
||||
|
||||
#Windows:
|
||||
set FLASK_RUN_PORT=5000
|
||||
set FLASK_RUN_PORT=5001
|
||||
```
|
||||
|
||||
<!-- STEP
|
||||
|
|
@ -196,14 +196,14 @@ name: "Run python app"
|
|||
working_dir: "./python"
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
env:
|
||||
FLASK_RUN_PORT: "5000"
|
||||
sleep: 2
|
||||
env:
|
||||
FLASK_RUN_PORT: "5001"
|
||||
-->
|
||||
|
||||
- Start dapr using the command:
|
||||
```bash
|
||||
dapr run --app-id multiplyapp --app-port 5000 --dapr-http-port 3501 flask run
|
||||
dapr run --app-id multiplyapp --app-port 5001 --dapr-http-port 3501 flask run
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ spec:
|
|||
annotations:
|
||||
dapr.io/enabled: "true"
|
||||
dapr.io/app-id: "multiplyapp"
|
||||
dapr.io/app-port: "5000"
|
||||
dapr.io/app-port: "5001"
|
||||
dapr.io/config: "appconfig"
|
||||
spec:
|
||||
containers:
|
||||
- name: multiply
|
||||
image: dapriosamples/distributed-calculator-python:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
- containerPort: 5001
|
||||
imagePullPolicy: Always
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ COPY . /app
|
|||
WORKDIR /app
|
||||
RUN pip install flask flask_cors
|
||||
ENTRYPOINT ["python"]
|
||||
EXPOSE 5000
|
||||
EXPOSE 5001
|
||||
CMD ["app.py"]
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ def multiply():
|
|||
print(f"Calculating {operand_one} * {operand_two}", flush=True)
|
||||
return jsonify(math.ceil(operand_one * operand_two * 100000)/100000)
|
||||
|
||||
app.run()
|
||||
app.run(port=5001)
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ spec:
|
|||
annotations:
|
||||
dapr.io/enabled: "true"
|
||||
dapr.io/app-id: "multiplyapp"
|
||||
dapr.io/app-port: "5000"
|
||||
dapr.io/app-port: "5001"
|
||||
dapr.io/config: "appconfig"
|
||||
spec:
|
||||
containers:
|
||||
- name: multiply
|
||||
image: dapriosamples/distributed-calculator-slow-python:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
- containerPort: 5001
|
||||
imagePullPolicy: Always
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ COPY . /app
|
|||
WORKDIR /app
|
||||
RUN pip install flask flask_cors
|
||||
ENTRYPOINT ["python"]
|
||||
EXPOSE 5000
|
||||
EXPOSE 5001
|
||||
CMD ["app.py"]
|
||||
|
|
|
|||
|
|
@ -24,4 +24,4 @@ def multiply():
|
|||
print(f"Calculating {operand_one} * {operand_two}", flush=True)
|
||||
return jsonify(math.ceil(operand_one * operand_two * 100000)/100000)
|
||||
|
||||
app.run()
|
||||
app.run(port=5001)
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ sleep: 10
|
|||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id python-subscriber --app-port 5000 python3 app.py
|
||||
dapr run --app-id python-subscriber --app-port 5001 python3 app.py
|
||||
```
|
||||
|
||||
<!-- END_STEP -->
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ spec:
|
|||
annotations:
|
||||
dapr.io/enabled: "true"
|
||||
dapr.io/app-id: "python-subscriber"
|
||||
dapr.io/app-port: "5000"
|
||||
dapr.io/app-port: "5001"
|
||||
spec:
|
||||
containers:
|
||||
- name: python-subscriber
|
||||
image: dapriosamples/pubsub-python-subscriber:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
imagePullPolicy: Always
|
||||
- containerPort: 5001
|
||||
imagePullPolicy: Always
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ FROM python:3.7-alpine
|
|||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN pip install flask flask_cors
|
||||
EXPOSE 5000
|
||||
CMD ["python", "app.py"]
|
||||
EXPOSE 5001
|
||||
CMD ["python", "app.py"]
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ def c_subscriber():
|
|||
print('Received message "{}" on topic "{}"'.format(request.json['data']['message'], request.json['topic']), flush=True)
|
||||
return json.dumps({'success':True}), 200, {'ContentType':'application/json'}
|
||||
|
||||
app.run()
|
||||
app.run(port=5001)
|
||||
|
|
|
|||
Loading…
Reference in New Issue