The documentation you are viewing is for Dapr v1.7 which is an older version of Dapr. For up-to-date documentation, see the latest version.

自我托管模式下的 Dapr 概述

如何在Windows/Linux/MacOS机器上运行 Dapr 的概述

概述

Dapr 可以配置为在本地开发者机器或生产VM上以自托管模式运行。 每个运行的服务都有一个 Dapr 运行时进程 (或 sidecar) ,配置为使用状态存储, pub/sub,绑定组件和其他构建块。

初始化

Dapr can be initialized with Docker (default) or in slim-init mode. 默认的 Docker 初始通过以下容器和配置提供了开箱即用功能:

  • 一个为状态管理和发布/订阅配置的默认组件的 Redis 容器。
  • 一个用于诊断和追踪的Zipkin容器。
  • 默认的 Dapr 配置和组件安装在 $HOME/.dapr/ (Mac/Linux) 或%USERPROFILE%\.dapr\ (Windows)。

dapr-placement 服务负责管理 actor 分布方案和关键范围设置。 此服务不是作为容器启动的,仅当你使用 Dapr actor 功能时才需要。 For more information on the actor Placement service read actor overview.

Diagram of Dapr in self-hosted Docker mode

使用 Dapr 启动应用程序

You can use the dapr run CLI command to a Dapr sidecar process along with your application.