From 87b4fa4bc5ec3d473ffb607d42b0758e6cc3b124 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Wed, 25 Jan 2023 14:21:06 -0600 Subject: [PATCH] update dapr run commands Signed-off-by: Hannah Hunter --- .../resiliency-serviceinvo-quickstart.md | 59 ++++++++++--------- .../resiliency/resiliency-state-quickstart.md | 44 +++++++------- .../pluggable-components-registration.md | 2 +- 3 files changed, 55 insertions(+), 50 deletions(-) diff --git a/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-serviceinvo-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-serviceinvo-quickstart.md index 24eac44ac..a1c7722a2 100644 --- a/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-serviceinvo-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-serviceinvo-quickstart.md @@ -55,10 +55,10 @@ pip3 install -r requirements.txt Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-port 8001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- python3 app.py +dapr run --app-port 8001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- python3 app.py ``` -### Step 3: Run the `checkout` service application with resiliency enabled +### Step 3: Run the `checkout` service application In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory. @@ -72,13 +72,13 @@ Install dependencies: pip3 install -r requirements.txt ``` -Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature. +Run the `checkout` service alongside a Dapr sidecar. ```bash -dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- python3 app.py +dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- python3 app.py ``` -By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar: +The Dapr sidecar then loads the resiliency spec located in the resources directory: ```yaml apiVersion: dapr.io/v1alpha1 @@ -283,10 +283,10 @@ npm install Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-port 5001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- npm start +dapr run --app-port 5001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- npm start ``` -### Step 3: Run the `checkout` service application with resiliency enabled +### Step 3: Run the `checkout` service application In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory. @@ -301,13 +301,14 @@ Install dependencies: npm install ``` -Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature. +Run the `checkout` service alongside a Dapr sidecar. ```bash -dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- npm start +dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- npm start ``` -By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar: +The Dapr sidecar then loads the resiliency spec located in the resources directory: + ```yaml apiVersion: dapr.io/v1alpha1 @@ -446,7 +447,7 @@ Once you restart the `order-processor` service, the application will recover sea In the `order-processor` service terminal, restart the application: ```bash -dapr run --app-port 5001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- npm start +dapr run --app-port 5001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- npm start ``` `checkout` service output: @@ -514,10 +515,10 @@ dotnet build Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-port 7001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- dotnet run +dapr run --app-port 7001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- dotnet run ``` -### Step 3: Run the `checkout` service application with resiliency enabled +### Step 3: Run the `checkout` service application In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory. @@ -533,13 +534,13 @@ dotnet restore dotnet build ``` -Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature. +Run the `checkout` service alongside a Dapr sidecar. ```bash -dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- dotnet run +dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- dotnet run ``` -By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar: +The Dapr sidecar then loads the resiliency spec located in the resources directory: ```yaml apiVersion: dapr.io/v1alpha1 @@ -747,10 +748,10 @@ mvn clean install Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar +dapr run --app-id order-processor --resources-path ../../../resources/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar ``` -### Step 3: Run the `checkout` service application with resiliency enabled +### Step 3: Run the `checkout` service application In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory. @@ -765,13 +766,14 @@ Install dependencies: mvn clean install ``` -Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature. +Run the `checkout` service alongside a Dapr sidecar. ```bash -dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar +dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar ``` -By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar: +The Dapr sidecar then loads the resiliency spec located in the resources directory: + ```yaml apiVersion: dapr.io/v1alpha1 @@ -910,7 +912,7 @@ Once you restart the `order-processor` service, the application will recover sea In the `order-processor` service terminal, restart the application: ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar +dapr run --app-id order-processor --resources-path ../../../resources/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar ``` `checkout` service output: @@ -976,10 +978,10 @@ go build . Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-port 6001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- go run . +dapr run --app-port 6001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- go run . ``` -### Step 3: Run the `checkout` service application with resiliency enabled +### Step 3: Run the `checkout` service application In a new terminal window, from the root of the Quickstart directory, navigate to the `checkout` directory. @@ -994,13 +996,14 @@ Install dependencies: go build . ``` -Run the `checkout` service alongside a Dapr sidecar. The `--config` parameter applies a Dapr configuration that enables the resiliency feature. +Run the `checkout` service alongside a Dapr sidecar. ```bash -dapr run --app-id checkout --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3500 -- go run . +dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3500 -- go run . ``` -By enabling resiliency, the resiliency spec located in the components directory is detected and loaded by the Dapr sidecar: +The Dapr sidecar then loads the resiliency spec located in the resources directory: + ```yaml apiVersion: dapr.io/v1alpha1 @@ -1139,7 +1142,7 @@ Once you restart the `order-processor` service, the application will recover sea In the `order-processor` service terminal, restart the application: ```bash -dapr run --app-port 6001 --app-id order-processor --config ../config.yaml --components-path ../../../components/ --app-protocol http --dapr-http-port 3501 -- go run . +dapr run --app-port 6001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- go run . ``` `checkout` service output: diff --git a/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-state-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-state-quickstart.md index 13756b748..b572cb8b1 100644 --- a/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-state-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/resiliency/resiliency-state-quickstart.md @@ -8,7 +8,7 @@ description: "Get started with Dapr's resiliency capabilities via the state mana Observe Dapr resiliency capabilities by simulating a system failure. In this Quickstart, you will: -- Execute a microservice application with resiliency enabled that continuously persists and retrieves state via Dapr's state management API. +- Execute a microservice application that continuously persists and retrieves state via Dapr's state management API. - Trigger resiliency policies by simulating a system failure. - Resolve the failure and the microservice application will resume. @@ -50,9 +50,10 @@ Install dependencies pip3 install -r requirements.txt ``` -### Step 2: Run the application with resiliency enabled +### Step 2: Run the application + +Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory: -Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is: ```yaml apiVersion: dapr.io/v1alpha1 @@ -85,7 +86,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- python3 +dapr run --app-id order-processor --resources-path ../../../resources/ -- python3 ``` Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}). @@ -128,7 +129,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r INFO[0006] Error processing operation component[statestore] output. Retrying... ``` -As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. +As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. ```yaml retryForever: @@ -219,9 +220,10 @@ Install dependencies npm install ``` -### Step 2: Run the application with resiliency enabled +### Step 2: Run the application + +Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory: -Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is: ```yaml apiVersion: dapr.io/v1alpha1 @@ -253,7 +255,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co ``` ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- npm start +dapr run --app-id order-processor --resources-path ../../../resources/ -- npm start ``` Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}). @@ -296,7 +298,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r INFO[0006] Error processing operation component[statestore] output. Retrying... ``` -As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. +As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. ```yaml retryForever: @@ -388,9 +390,9 @@ dotnet restore dotnet build ``` -### Step 2: Run the application with resiliency enabled +### Step 2: Run the application -Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is: +Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory: ```yaml apiVersion: dapr.io/v1alpha1 @@ -422,7 +424,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co ``` ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- dotnet run +dapr run --app-id order-processor --resources-path ../../../resources/ -- dotnet run ``` Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}). @@ -465,7 +467,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r INFO[0006] Error processing operation component[statestore] output. Retrying... ``` -As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. +As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. ```yaml retryForever: @@ -559,9 +561,9 @@ Install dependencies mvn clean install ``` -### Step 2: Run the application with resiliency enabled +### Step 2: Run the application -Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is: +Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory: ```yaml apiVersion: dapr.io/v1alpha1 @@ -593,7 +595,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co ``` ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar +dapr run --app-id order-processor --resources-path ../../../resources/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar ``` Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}). @@ -636,7 +638,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r INFO[0006] Error processing operation component[statestore] output. Retrying... ``` -As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. +As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. ```yaml retryForever: @@ -727,9 +729,9 @@ Install dependencies go build . ``` -### Step 2: Run the application with resiliency enabled +### Step 2: Run the application -Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` command below, the `--config` parameter applies a Dapr configuration that enables the resiliency feature. By enabling resiliency, the resiliency spec located in the components directory is loaded by the `order-processor` sidecar. The resilency spec is: +Run the `order-processor` service alongside a Dapr sidecar. The Dapr sidecar then loads the resiliency spec located in the resources directory: ```yaml apiVersion: dapr.io/v1alpha1 @@ -761,7 +763,7 @@ Run the `order-processor` service alongside a Dapr sidecar. In the `dapr run` co ``` ```bash -dapr run --app-id order-processor --config ../config.yaml --components-path ../../../components -- go run . +dapr run --app-id order-processor --resources-path ../../../resources -- go run . ``` Once the application has started, the `order-processor`service writes and reads `orderId` key/value pairs to the `statestore` Redis instance [defined in the `statestore.yaml` component]({{< ref "statemanagement-quickstart.md#statestoreyaml-component-file" >}}). @@ -804,7 +806,7 @@ Once Redis is stopped, the requests begin to fail and the retry policy titled `r INFO[0006] Error processing operation component[statestore] output. Retrying... ``` -As per the `retryFroever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. +As per the `retryForever` policy, retries will continue for each failed request indefinitely, in 5 second intervals. ```yaml retryForever: diff --git a/daprdocs/content/en/operations/components/pluggable-components-registration.md b/daprdocs/content/en/operations/components/pluggable-components-registration.md index d7e91e347..06a4b6a2e 100644 --- a/daprdocs/content/en/operations/components/pluggable-components-registration.md +++ b/daprdocs/content/en/operations/components/pluggable-components-registration.md @@ -57,7 +57,7 @@ Since you are running Dapr in the same host as the component, verify this folder Define your component using a [component spec]({{< ref component-schema.md >}}). Your component's `type` is derived from the socket name, without the file extension. -Save the component YAML file in the components-path, replacing: +Save the component YAML file in the resources-path, replacing: - `your_socket_goes_here` with your component socket name (no extension) - `your_component_type` with your component type