`components-path` --> `resources-path` in how-tos and quickstarts (#3016)

* find and replace comopnents-path to resources-path

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* missed a couple

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* updates per pravin

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* mark components-path as deprecated

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* reword

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
Hannah Hunter 2023-01-18 14:14:18 -06:00 committed by GitHub
parent 072ee76aaf
commit 235626fa0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 58 additions and 56 deletions

View File

@ -49,10 +49,10 @@ For a detailed list of all available arguments run `daprd --help` or see this [t
daprd --app-id --app-port 5000 daprd --app-id --app-port 5000
``` ```
3. If you are using several custom components and want to specify the location of the component definition files, use the `--components-path` argument: 3. If you are using several custom resources and want to specify the location of the resource definition files, use the `--resources-path` argument:
```bash ```bash
daprd --app-id myapp --components-path <PATH-TO-COMPONENTS-FILES> daprd --app-id myapp --resources-path <PATH-TO-RESOURCES-FILES>
``` ```
4. Enable collection of Prometheus metrics while running your app 4. Enable collection of Prometheus metrics while running your app

View File

@ -35,7 +35,7 @@ Create a new binding component named `checkout`. Within the `metadata` section,
{{% codetab %}} {{% codetab %}}
Use the `--components-path` flag with `dapr run` to point to your custom components directory. Use the `--resources-path` flag with `dapr run` to point to your custom resources directory.
```yaml ```yaml
apiVersion: dapr.io/v1alpha1 apiVersion: dapr.io/v1alpha1

View File

@ -41,7 +41,7 @@ Create a new binding component named `checkout`. Within the `metadata` section,
{{% codetab %}} {{% codetab %}}
Use the `--components-path` flag with the `dapr run` command to point to your custom components directory. Use the `--resources-path` flag with the `dapr run` command to point to your custom resources directory.
```yaml ```yaml
apiVersion: dapr.io/v1alpha1 apiVersion: dapr.io/v1alpha1

View File

@ -304,7 +304,7 @@ asyncio.run(executeConfiguration())
``` ```
```bash ```bash
dapr run --app-id orderprocessing --components-path components/ -- python3 OrderProcessingService.py dapr run --app-id orderprocessing --resources-path components/ -- python3 OrderProcessingService.py
``` ```
{{% /codetab %}} {{% /codetab %}}

View File

@ -63,14 +63,14 @@ scopes:
- checkout - checkout
``` ```
You can override this file with another [pubsub component]({{< ref setup-pubsub >}}) by creating a components directory (in this example, `myComponents`) containing the file and using the flag `--components-path` with the `dapr run` CLI command. You can override this file with another [pubsub component]({{< ref setup-pubsub >}}) by creating a components directory (in this example, `myComponents`) containing the file and using the flag `--resources-path` with the `dapr run` CLI command.
{{< tabs Dotnet Java Python Go Javascript >}} {{< tabs Dotnet Java Python Go Javascript >}}
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- dotnet run dapr run --app-id myapp --resources-path ./myComponents -- dotnet run
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -78,7 +78,7 @@ dapr run --app-id myapp --components-path ./myComponents -- dotnet run
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run dapr run --app-id myapp --resources-path ./myComponents -- mvn spring-boot:run
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -86,7 +86,7 @@ dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- python3 app.py dapr run --app-id myapp --resources-path ./myComponents -- python3 app.py
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -94,7 +94,7 @@ dapr run --app-id myapp --components-path ./myComponents -- python3 app.py
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- go run app.go dapr run --app-id myapp --resources-path ./myComponents -- go run app.go
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -102,7 +102,7 @@ dapr run --app-id myapp --components-path ./myComponents -- go run app.go
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- npm start dapr run --app-id myapp --resources-path ./myComponents -- npm start
``` ```
{{% /codetab %}} {{% /codetab %}}

View File

@ -47,7 +47,7 @@ When running Dapr, set the YAML component file path to point Dapr to the compone
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- dotnet run dapr run --app-id myapp --resources-path ./myComponents -- dotnet run
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -55,7 +55,7 @@ dapr run --app-id myapp --components-path ./myComponents -- dotnet run
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run dapr run --app-id myapp --resources-path ./myComponents -- mvn spring-boot:run
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -63,7 +63,7 @@ dapr run --app-id myapp --components-path ./myComponents -- mvn spring-boot:run
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- python3 app.py dapr run --app-id myapp --resources-path ./myComponents -- python3 app.py
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -71,7 +71,7 @@ dapr run --app-id myapp --components-path ./myComponents -- python3 app.py
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- npm start dapr run --app-id myapp --resources-path ./myComponents -- npm start
``` ```
{{% /codetab %}} {{% /codetab %}}
@ -79,7 +79,7 @@ dapr run --app-id myapp --components-path ./myComponents -- npm start
{{% codetab %}} {{% codetab %}}
```bash ```bash
dapr run --app-id myapp --components-path ./myComponents -- go run app.go dapr run --app-id myapp --resources-path ./myComponents -- go run app.go
``` ```
{{% /codetab %}} {{% /codetab %}}

View File

@ -96,7 +96,7 @@ docker run -d --rm -p 27017:27017 --name mongodb mongo:5
Next, start a Dapr application. Refer to the [component configuration file](../query-api-examples/components/mongodb/mongodb.yml), which instructs Dapr to use MongoDB as its state store. Next, start a Dapr application. Refer to the [component configuration file](../query-api-examples/components/mongodb/mongodb.yml), which instructs Dapr to use MongoDB as its state store.
```bash ```bash
dapr run --app-id demo --dapr-http-port 3500 --components-path query-api-examples/components/mongodb dapr run --app-id demo --dapr-http-port 3500 --resources-path query-api-examples/components/mongodb
``` ```
Populate the state store with the employee dataset, so you can query it later. Populate the state store with the employee dataset, so you can query it later.

View File

@ -33,7 +33,7 @@ To create a dedicated components folder with the default `statestore`, `pubsub`,
1. Open your application directory in Visual Studio Code 1. Open your application directory in Visual Studio Code
2. Open the Command Palette with `Ctrl+Shift+P` 2. Open the Command Palette with `Ctrl+Shift+P`
3. Select `Dapr: Scaffold Dapr Components` 3. Select `Dapr: Scaffold Dapr Components`
4. Run your application with `dapr run --components-path ./components -- ...` 4. Run your application with `dapr run --resources-path ./components -- ...`
### View running Dapr applications ### View running Dapr applications

View File

@ -85,7 +85,7 @@ pip3 install -r requirements.txt
Run the `batch-sdk` service alongside a Dapr sidecar. Run the `batch-sdk` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id batch-sdk --app-port 50051 --components-path ../../../components -- python3 app.py dapr run --app-id batch-sdk --app-port 50051 --resources-path ../../../components -- python3 app.py
``` ```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. > **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
@ -292,7 +292,7 @@ npm install
Run the `batch-sdk` service alongside a Dapr sidecar. Run the `batch-sdk` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id batch-sdk --app-port 5002 --dapr-http-port 3500 --components-path ../../../components -- node index.js dapr run --app-id batch-sdk --app-port 5002 --dapr-http-port 3500 --resources-path ../../../components -- node index.js
``` ```
The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar. The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
@ -495,7 +495,7 @@ dotnet build batch.csproj
Run the `batch-sdk` service alongside a Dapr sidecar. Run the `batch-sdk` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id batch-sdk --app-port 7002 --components-path ../../../components -- dotnet run dapr run --app-id batch-sdk --app-port 7002 --resources-path ../../../components -- dotnet run
``` ```
The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar. The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
@ -701,7 +701,7 @@ mvn clean install
Run the `batch-sdk` service alongside a Dapr sidecar. Run the `batch-sdk` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id batch-sdk --app-port 8080 --components-path ../../../components -- java -jar target/BatchProcessingService-0.0.1-SNAPSHOT.jar dapr run --app-id batch-sdk --app-port 8080 --resources-path ../../../components -- java -jar target/BatchProcessingService-0.0.1-SNAPSHOT.jar
``` ```
The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar. The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.
@ -908,7 +908,7 @@ go build .
Run the `batch-sdk` service alongside a Dapr sidecar. Run the `batch-sdk` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --components-path ../../../components -- go run . dapr run --app-id batch-sdk --app-port 6002 --dapr-http-port 3502 --dapr-grpc-port 60002 --resources-path ../../../components -- go run .
``` ```
The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar. The code inside the `process_batch` function is executed every 10 seconds (defined in [`binding-cron.yaml`]({{< ref "#componentsbinding-cronyaml-component-file" >}}) in the `components` directory). The binding trigger looks for a route called via HTTP POST in your Flask application by the Dapr sidecar.

View File

@ -56,7 +56,7 @@ pip3 install -r requirements.txt
Run the `order-processor` subscriber service alongside a Dapr sidecar. Run the `order-processor` subscriber service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ --app-port 5001 -- python3 app.py dapr run --app-id order-processor --resources-path ../../../components/ --app-port 5001 -- python3 app.py
``` ```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. > **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
@ -105,7 +105,7 @@ pip3 install -r requirements.txt
Run the `checkout` publisher service alongside a Dapr sidecar. Run the `checkout` publisher service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py dapr run --app-id checkout --resources-path ../../../components/ -- python3 app.py
``` ```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. > **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
@ -235,7 +235,7 @@ Verify you have the following files included in the service directory:
Run the `order-processor` subscriber service alongside a Dapr sidecar. Run the `order-processor` subscriber service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-port 5001 --app-id order-processing --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- npm run start dapr run --app-port 5001 --app-id order-processing --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- npm run start
``` ```
In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
@ -267,7 +267,7 @@ Verify you have the following files included in the service directory:
Run the `checkout` publisher service alongside a Dapr sidecar. Run the `checkout` publisher service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- npm run start dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- npm run start
``` ```
In the `checkout` publisher service, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: In the `checkout` publisher service, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
@ -389,7 +389,7 @@ dotnet build
Run the `order-processor` subscriber service alongside a Dapr sidecar. Run the `order-processor` subscriber service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components --app-port 7002 -- dotnet run dapr run --app-id order-processor --resources-path ../../../components --app-port 7002 -- dotnet run
``` ```
In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
@ -423,7 +423,7 @@ dotnet build
Run the `checkout` publisher service alongside a Dapr sidecar. Run the `checkout` publisher service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id checkout --components-path ../../../components -- dotnet run dapr run --app-id checkout --resources-path ../../../components -- dotnet run
``` ```
In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
@ -544,7 +544,7 @@ mvn clean install
Run the `order-processor` subscriber service alongside a Dapr sidecar. Run the `order-processor` subscriber service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar dapr run --app-port 8080 --app-id order-processor --resources-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
``` ```
In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
@ -582,7 +582,7 @@ mvn clean install
Run the `checkout` publisher service alongside a Dapr sidecar. Run the `checkout` publisher service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar dapr run --app-id checkout --resources-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
``` ```
In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
@ -706,7 +706,7 @@ go build .
Run the `order-processor` subscriber service alongside a Dapr sidecar. Run the `order-processor` subscriber service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run . dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --resources-path ../../../components -- go run .
``` ```
In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar. In the `order-processor` subscriber, we're subscribing to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. This enables your app code to talk to the Redis component instance through the Dapr sidecar.
@ -736,7 +736,7 @@ go build .
Run the `checkout` publisher service alongside a Dapr sidecar. Run the `checkout` publisher service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run . dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --resources-path ../../../components -- go run .
``` ```
In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop: In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `orderpubsub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:

View File

@ -55,7 +55,7 @@ pip3 install -r requirements.txt
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- python3 app.py dapr run --app-id order-processor --resources-path ../../../components/ -- python3 app.py
``` ```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. > **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
@ -164,7 +164,7 @@ npm install
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- npm start dapr run --app-id order-processor --resources-path ../../../components/ -- npm start
``` ```
#### Behind the scenes #### Behind the scenes
@ -278,7 +278,7 @@ dotnet build
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- dotnet run dapr run --app-id order-processor --resources-path ../../../components/ -- dotnet run
``` ```
#### Behind the scenes #### Behind the scenes
@ -389,7 +389,7 @@ mvn clean install
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar dapr run --app-id order-processor --resources-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
``` ```
#### Behind the scenes #### Behind the scenes
@ -494,7 +494,7 @@ go build .
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- go run . dapr run --app-id order-processor --resources-path ../../../components/ -- go run .
``` ```
#### Behind the scenes #### Behind the scenes

View File

@ -51,7 +51,7 @@ pip3 install -r requirements.txt
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- python3 app.py dapr run --app-id order-processor --resources-path ../../../components/ -- python3 app.py
``` ```
> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. > **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`.
@ -172,7 +172,7 @@ Verify you have the following files included in the service directory:
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- npm run start dapr run --app-id order-processor --resources-path ../../../components/ -- npm run start
``` ```
The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop. The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
@ -300,7 +300,7 @@ dotnet build
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components/ -- dotnet run dapr run --app-id order-processor --resources-path ../../../components/ -- dotnet run
``` ```
The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop. The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
@ -419,7 +419,7 @@ mvn clean install
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar dapr run --app-id order-processor --resources-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
``` ```
The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop. The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.
@ -538,7 +538,7 @@ go build .
Run the `order-processor` service alongside a Dapr sidecar. Run the `order-processor` service alongside a Dapr sidecar.
```bash ```bash
dapr run --app-id order-processor --components-path ../../../components -- go run . dapr run --app-id order-processor --resources-path ../../../components -- go run .
``` ```
The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop. The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop.

View File

@ -317,9 +317,9 @@ When you run `dapr init`, Dapr creates a default redis `pubsub.yaml` on your loc
For new component files: For new component files:
1. Create a new `components` directory in your app folder containing the YAML files. 1. Create a new `components` directory in your app folder containing the YAML files.
1. Provide the path to the `dapr run` command with the flag `--components-path` 1. Provide the path to the `dapr run` command with the flag `--resources-path`
If you initialized Dapr in [slim mode]({{< ref self-hosted-no-docker.md >}}) (without Docker), you need to manually create the default directory, or always specify a components directory using `--components-path`. If you initialized Dapr in [slim mode]({{< ref self-hosted-no-docker.md >}}) (without Docker), you need to manually create the default directory, or always specify a components directory using `--resources-path`.
{{% /codetab %}} {{% /codetab %}}

View File

@ -65,7 +65,7 @@ In the above file definition:
Launch a Dapr sidecar that will listen on port 3500 for a blank application named `myapp`: Launch a Dapr sidecar that will listen on port 3500 for a blank application named `myapp`:
```bash ```bash
dapr run --app-id myapp --dapr-http-port 3500 --components-path ./my-components dapr run --app-id myapp --dapr-http-port 3500 --resources-path ./my-components
``` ```
{{% alert title="Tip" color="primary" %}} {{% alert title="Tip" color="primary" %}}

View File

@ -62,7 +62,7 @@ Once you have created the component's YAML file, follow these instructions to ap
{{< tabs "Self-Hosted" "Kubernetes" >}} {{< tabs "Self-Hosted" "Kubernetes" >}}
{{% codetab %}} {{% codetab %}}
To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--resources-path`.
{{% /codetab %}} {{% /codetab %}}
{{% codetab %}} {{% codetab %}}

View File

@ -65,7 +65,7 @@ Once you have created the component's YAML file, follow these instructions to ap
{{< tabs "Self-Hosted" "Kubernetes" >}} {{< tabs "Self-Hosted" "Kubernetes" >}}
{{% codetab %}} {{% codetab %}}
To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--resources-path`.
{{% /codetab %}} {{% /codetab %}}
{{% codetab %}} {{% codetab %}}

View File

@ -123,10 +123,10 @@ services:
"--app-id", "nodeapp", "--app-id", "nodeapp",
"--app-port", "3000", "--app-port", "3000",
"--placement-host-address", "placement:50006", # Dapr's placement service can be reach via the docker DNS entry "--placement-host-address", "placement:50006", # Dapr's placement service can be reach via the docker DNS entry
"--components-path", "./components" "--resources-path", "./components"
] ]
volumes: volumes:
- "./components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --components-path argument. - "./components/:/components" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument.
depends_on: depends_on:
- nodeapp - nodeapp
network_mode: "service:nodeapp" # Attach the nodeapp-dapr service to the nodeapp network namespace network_mode: "service:nodeapp" # Attach the nodeapp-dapr service to the nodeapp network namespace

View File

@ -58,7 +58,7 @@ When using the Dapr CLI to run an application, pass the `--log-as-json` option t
```sh ```sh
dapr run \ dapr run \
--app-id orderprocessing \ --app-id orderprocessing \
--components-path ./components/ \ --resources-path ./components/ \
--log-as-json \ --log-as-json \
-- python3 OrderProcessingService.py -- python3 OrderProcessingService.py
``` ```

View File

@ -225,7 +225,7 @@ export DAPR_HOST_IP=127.0.0.1
This is usually due to one of the following issues This is usually due to one of the following issues
- You may have defined the `NAMESPACE` environment variable locally or deployed your components into a different namespace in Kubernetes. Check which namespace your app and the components are deployed to. Read [scoping components to one or more applications]({{< ref "component-scopes.md" >}}) for more information. - You may have defined the `NAMESPACE` environment variable locally or deployed your components into a different namespace in Kubernetes. Check which namespace your app and the components are deployed to. Read [scoping components to one or more applications]({{< ref "component-scopes.md" >}}) for more information.
- You may have not provided a `--components-path` with the Dapr `run` commands or not placed your components into the default components folder for your OS. Read [define a component]({{< ref "get-started-component.md" >}}) for more information. - You may have not provided a `--resources-path` with the Dapr `run` commands or not placed your components into the default components folder for your OS. Read [define a component]({{< ref "get-started-component.md" >}}) for more information.
- You may have a syntax issue in component YAML file. Check your component YAML with the component [YAML samples]({{< ref "components.md" >}}). - You may have a syntax issue in component YAML file. Check your component YAML with the component [YAML samples]({{< ref "components.md" >}}).
## Service invocation is failing and my Dapr service is missing an appId (macOS) ## Service invocation is failing and my Dapr service is missing an appId (macOS)

View File

@ -16,7 +16,8 @@ This table is meant to help users understand the equivalent options for running
| `--app-id` | `--app-id` | `-i` | `dapr.io/app-id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID | | `--app-id` | `--app-id` | `-i` | `dapr.io/app-id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID |
| `--app-port` | `--app-port` | `-p` | `dapr.io/app-port` | This parameter tells Dapr which port your application is listening on | | `--app-port` | `--app-port` | `-p` | `dapr.io/app-port` | This parameter tells Dapr which port your application is listening on |
| `--app-ssl` | `--app-ssl` | | `dapr.io/app-ssl` | Sets the URI scheme of the app to https and attempts an SSL connection | | `--app-ssl` | `--app-ssl` | | `dapr.io/app-ssl` | Sets the URI scheme of the app to https and attempts an SSL connection |
| `--components-path` | `--components-path` | `-d` | not supported | Path for components directory. If empty, components will not be loaded. | | `--components-path` | `--components-path` | `-d` | not supported | **Deprecated** in favor of `--resources-path` |
| `--resources-path` | `--resources-path` | `-d` | not supported | Path for components directory. If empty, components will not be loaded. |
| `--config` | `--config` | `-c` | `dapr.io/config` | Tells Dapr which Configuration CRD to use | | `--config` | `--config` | `-c` | `dapr.io/config` | Tells Dapr which Configuration CRD to use |
| `--control-plane-address` | not supported | | not supported | Address for a Dapr control plane | | `--control-plane-address` | not supported | | not supported | Address for a Dapr control plane |
| `--dapr-grpc-port` | `--dapr-grpc-port` | | not supported | gRPC port for the Dapr API to listen on (default "50001") | | `--dapr-grpc-port` | `--dapr-grpc-port` | | not supported | gRPC port for the Dapr API to listen on (default "50001") |

View File

@ -28,7 +28,8 @@ dapr run [flags] [command]
| `--app-port`, `-p` | `APP_PORT` | | The port your application is listening on | | `--app-port`, `-p` | `APP_PORT` | | The port your application is listening on |
| `--app-protocol`, `-P` | | `http` | The protocol Dapr uses to talk to the application. Valid values are: `http` or `grpc` | | `--app-protocol`, `-P` | | `http` | The protocol Dapr uses to talk to the application. Valid values are: `http` or `grpc` |
| `--app-ssl` | | `false` | Enable https when Dapr invokes the application | | `--app-ssl` | | `false` | Enable https when Dapr invokes the application |
| `--components-path`, `-d` | | Linux/Mac: `$HOME/.dapr/components` <br/>Windows: `%USERPROFILE%\.dapr\components` | The path for components directory | | `--components-path`, `-d` | | Linux/Mac: `$HOME/.dapr/components` <br/>Windows: `%USERPROFILE%\.dapr\components` | **Deprecated** in favor of `--resources-path` |
| `--resources-path`, `-d` | | Linux/Mac: `$HOME/.dapr/components` <br/>Windows: `%USERPROFILE%\.dapr\components` | The path for components directory |
| `--config`, `-c` | | Linux/Mac: `$HOME/.dapr/config.yaml` <br/>Windows: `%USERPROFILE%\.dapr\config.yaml` | Dapr configuration file | | `--config`, `-c` | | Linux/Mac: `$HOME/.dapr/config.yaml` <br/>Windows: `%USERPROFILE%\.dapr\config.yaml` | Dapr configuration file |
| `--dapr-grpc-port` | `DAPR_GRPC_PORT` | `50001` | The gRPC port for Dapr to listen on | | `--dapr-grpc-port` | `DAPR_GRPC_PORT` | `50001` | The gRPC port for Dapr to listen on |
| `--dapr-http-port` | `DAPR_HTTP_PORT` | `3500` | The HTTP port for Dapr to listen on | | `--dapr-http-port` | `DAPR_HTTP_PORT` | `3500` | The HTTP port for Dapr to listen on |

View File

@ -133,7 +133,7 @@ kubectl apply -f azureblob.yaml
### Running locally ### Running locally
To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--resources-path`.
This state store creates a blob file in the container and puts raw state inside it. This state store creates a blob file in the container and puts raw state inside it.

View File

@ -360,7 +360,7 @@ Memory Store does not support modules and cannot be used with query.
Next is to start a Dapr application. Refer to this [component configuration file](../../../../developing-applications/building-blocks/state-management/query-api-examples/components/redis/redis.yml), which contains query indexing schemas. Make sure to modify the `redisHost` to reflect the local forwarding port which `redislabs/rejson` uses. Next is to start a Dapr application. Refer to this [component configuration file](../../../../developing-applications/building-blocks/state-management/query-api-examples/components/redis/redis.yml), which contains query indexing schemas. Make sure to modify the `redisHost` to reflect the local forwarding port which `redislabs/rejson` uses.
```bash ```bash
dapr run --app-id demo --dapr-http-port 3500 --components-path query-api-examples/components/redis dapr run --app-id demo --dapr-http-port 3500 --resources-path query-api-examples/components/redis
``` ```
Now populate the state store with the employee dataset, so you can then query it later. Now populate the state store with the employee dataset, so you can then query it later.