Porting daprd ref from PR 1662

This commit is contained in:
Ori Zohar 2021-08-11 10:39:55 -07:00
parent 104ee6bda4
commit 55a79b9064
3 changed files with 60 additions and 1 deletions

View File

@ -1,6 +1,6 @@
--- ---
type: docs type: docs
title: "Dapr Concepts" title: "Dapr concepts"
linkTitle: "Concepts" linkTitle: "Concepts"
weight: 10 weight: 10
description: "Learn about Dapr including its main features and capabilities" description: "Learn about Dapr including its main features and capabilities"

View File

@ -0,0 +1,7 @@
---
type: docs
title: "Dapr services"
linkTitle: "Dapr services"
weight: 800
description: "Learn about the services that make up Dapr"
---

View File

@ -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
```