From 4addf47492d30cd097141afe49e627cbda3a1f96 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Fri, 20 Aug 2021 13:38:33 -0700 Subject: [PATCH] Minor updates and linking --- .../en/concepts/dapr-services/_index.md | 4 +- .../en/concepts/dapr-services/sidecar.md | 42 +++++++++++-------- .../operations/hosting/self-hosted/_index.md | 2 +- .../performance-and-scalability/_index.md | 4 +- .../arguments-annotations-overview.md | 2 +- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/daprdocs/content/en/concepts/dapr-services/_index.md b/daprdocs/content/en/concepts/dapr-services/_index.md index be981e14a..3ffe6c412 100644 --- a/daprdocs/content/en/concepts/dapr-services/_index.md +++ b/daprdocs/content/en/concepts/dapr-services/_index.md @@ -1,7 +1,7 @@ --- type: docs -title: "Dapr services" +title: "Overview of the Dapr services" linkTitle: "Dapr services" weight: 800 -description: "Learn about the services that make up Dapr" +description: "Learn about the services that make up the Dapr runtime" --- \ No newline at end of file diff --git a/daprdocs/content/en/concepts/dapr-services/sidecar.md b/daprdocs/content/en/concepts/dapr-services/sidecar.md index 1002c28eb..5012c0532 100644 --- a/daprdocs/content/en/concepts/dapr-services/sidecar.md +++ b/daprdocs/content/en/concepts/dapr-services/sidecar.md @@ -1,20 +1,25 @@ --- type: docs -title: "Dapr sidecar (daprd)" +title: "Dapr sidecar (daprd) overview" linkTitle: "Sidecar" weight: 300 description: "Overview of the Dapr sidecar process" --- -Dapr uses the [sidecar pattern]({{< ref "overview.md#sidecar-architecture" >}}), meaning that the Dapr APIs are exposed on a separate process (i.e. the Dapr sidecar) running alongside your application. The Dapr sidecar process is named `daprd` and is launched in different ways depending on how the hosting environment. +Dapr uses a [sidecar pattern]({{< ref "overview.md#sidecar-architecture" >}}), meaning the Dapr APIs are run and exposed on a separate process (i.e. the Dapr sidecar) running alongside your application. The Dapr sidecar process is named `daprd` and is launched in different ways depending on the hosting environment. -## Self-hosted mode -When Dapr is installed in [self-hosted mode]({{}}), the `daprd` binary is downloaded and placed under the user home directory (`$HOME/.dapr/bin` for Linux/MacOS or `%USERPROFILE%\.dapr\bin\` for Windows). In self hosted mode, running the Dapr CLI run command launches the `daprd` executable together with the provided application executable. This is the recommended way of running the Dapr sidecar when working locally in scenarios such as development and testing. The various arguments that the CLI exposes to configure the sidecar can be found in the [Dapr run command reference]]({{}}). + -## Kubernetes -On Kubernetes, the Dapr control plane includes the [dapr-sidecar-injector service]({{< ref kubernetes-overview.md >}}), which watches for new pods with the `dapr.io/enabled` annotation and injects a container with the `daprd` process within the pod. In this case, sidecar arguments can be passed through annotations as outlined in the **K8S annotations** column in [this table]({{}}). +## Self-hosted with `dapr run` + +When Dapr is installed in [self-hosted mode]({{}}), the `daprd` binary is downloaded and placed under the user home directory (`$HOME/.dapr/bin` for Linux/MacOS or `%USERPROFILE%\.dapr\bin\` for Windows). In self-hosted mode, running the Dapr CLI [`run` command]({{< ref dapr-run.md >}}) launches the `daprd` executable together with the provided application executable. This is the recommended way of running the Dapr sidecar when working locally in scenarios such as development and testing. The various arguments the CLI exposes to configure the sidecar can be found in the [Dapr run command reference]]({{}}). + +## Kubernetes with `dapr-sidecar-injector` + +On [Kubernetes]({{< ref kubernetes.md >}}), the Dapr control plane includes the [dapr-sidecar-injector service]({{< ref kubernetes-overview.md >}}), which watches for new pods with the `dapr.io/enabled` annotation and injects a container with the `daprd` process within the pod. In this case, sidecar arguments can be passed through annotations as outlined in the **Kubernetes annotations** column in [this table]({{}}). ## Running the sidecar directly + In most cases you do not need to run `daprd` explicitly, as the sidecar is either launched by the CLI (self-hosted mode) or by the dapr-sidecar-injector service (Kubernetes). For advanced use cases (debugging, scripted deployments, etc.) the `daprd` process can be launched directly. For a detailed list of all available arguments run `daprd --help` or see this [table]({{< ref arguments-annotations-overview.md >}}) which outlines how the `daprd` arguments relate to the CLI arguments and Kubernetes annotations. @@ -23,23 +28,24 @@ For a detailed list of all available arguments run `daprd --help` or see this [t 1. Start a sidecar along an application by specifying its unique ID. Note `--app-id` is a required field: -```bash -~/.dapr/bin/daprd --app-id myapp -``` + ```bash + ~/.dapr/bin/daprd --app-id myapp + ``` 2. Specify the port your application is listening to -```bash -~/.dapr/bin/daprd --app-id --app-port 5000 -``` + ```bash + ~/.dapr/bin/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: -```bash -~/.dapr/bin/daprd --app-id myapp --components-path ~/.dapr/components -``` + ```bash + ~/.dapr/bin/daprd --app-id myapp --components-path ~/.dapr/components + ``` 4. Enable collection of Prometheus metrics while running your app -```bash -~/.dapr/bin/daprd --app-id myapp --enable-metrics -``` + ```bash + ~/.dapr/bin/daprd --app-id myapp --enable-metrics + ``` diff --git a/daprdocs/content/en/operations/hosting/self-hosted/_index.md b/daprdocs/content/en/operations/hosting/self-hosted/_index.md index 627f44f3b..73aae4b5b 100644 --- a/daprdocs/content/en/operations/hosting/self-hosted/_index.md +++ b/daprdocs/content/en/operations/hosting/self-hosted/_index.md @@ -1,6 +1,6 @@ --- type: docs -title: "Run Dapr in self hosted mode" +title: "Run Dapr in self-hosted mode" linkTitle: "Self-Hosted" weight: 1000 description: "How to get Dapr up and running in your local environment" diff --git a/daprdocs/content/en/operations/performance-and-scalability/_index.md b/daprdocs/content/en/operations/performance-and-scalability/_index.md index a80ba5044..347865437 100644 --- a/daprdocs/content/en/operations/performance-and-scalability/_index.md +++ b/daprdocs/content/en/operations/performance-and-scalability/_index.md @@ -1,7 +1,7 @@ --- type: docs -title: "Performance and Scalability" -linkTitle: "Performance and Scalability" +title: "Performance and scalability statistics of Dapr" +linkTitle: "Performance and scalability" weight: 700 description: "Benchmarks and guidelines for Dapr building blocks" --- diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index cf69b2fc3..229b16a01 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -10,7 +10,7 @@ aliases: This table is meant to help users understand the equivalent options for running Dapr sidecars in different contexts--via the [CLI]({{< ref cli-overview.md >}}) directly, via daprd, or on [Kubernetes]({{< ref kubernetes-overview.md >}}) via annotations. -| daprd | Dapr CLI | CLI shorthand | K8s annotations | Description +| daprd | Dapr CLI | CLI shorthand | Kubernetes annotations | Description |----- | ------- | -----------| ----------| ------------ | | `--allowed-origins` | not supported | | not supported | Allowed HTTP origins (default "*") | | `--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 |