diff --git a/daprdocs/content/en/concepts/_index.md b/daprdocs/content/en/concepts/_index.md index bcfdf00f6..e685e646b 100644 --- a/daprdocs/content/en/concepts/_index.md +++ b/daprdocs/content/en/concepts/_index.md @@ -1,6 +1,6 @@ --- type: docs -title: "Dapr Concepts" +title: "Dapr concepts" linkTitle: "Concepts" weight: 10 description: "Learn about Dapr including its main features and capabilities" diff --git a/daprdocs/content/en/concepts/dapr-services/_index.md b/daprdocs/content/en/concepts/dapr-services/_index.md new file mode 100644 index 000000000..be981e14a --- /dev/null +++ b/daprdocs/content/en/concepts/dapr-services/_index.md @@ -0,0 +1,7 @@ +--- +type: docs +title: "Dapr services" +linkTitle: "Dapr services" +weight: 800 +description: "Learn about the services that make up Dapr" +--- \ 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 new file mode 100644 index 000000000..11d1de7ba --- /dev/null +++ b/daprdocs/content/en/concepts/dapr-services/sidecar.md @@ -0,0 +1,52 @@ +--- +type: docs +title: "daprd sidecar process reference" +linkTitle: "daprd" +weight: 300 +description: "Detailed information on the daprd process and usage examples" +--- + +## Overview + +The daprd process is what you think of as "Dapr". It is the process that offers the various Dapr [building blocks]({{< ref building-blocks >}}) through HTTP and gRPC APIs to your application. + +The daprd process runs alongside your application as a [sidecar]({{< ref "overview.md#sidecar-architecture" >}}), either as a process in a self-hosted environment or as a container within the application pods in a Kubernetes environment. + +## Installation + +When initializing Dapr in self-hosted mode via `dapr init`, the daprd binary is installed to the`.dapr/bin` directory within your home directory. Running `dapr run` will launch a daprd process alongside your application. + +On Kubernetes, `dapr init -k` will install the [dapr-sidecar-injector service]({{< ref kubernetes-overview.md >}}), which will watch for new pods with the `dapr.io/enabled` annotation and inject a container with the daprd process within the pod. + +## Running 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 >}}). + +### Examples + +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 +``` + +2. Specify the port your application is listening to + +```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 +``` + +4. Enable collection of Prometheus metrics while running your app + +```bash +~/.dapr/bin/daprd --app-id myapp --enable-metrics +```