diff --git a/README.md b/README.md index e99d95a2590..c8a4a8ada7b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Dapr documentation +[![GitHub License](https://img.shields.io/github/license/dapr/docs?style=flat&label=License&logo=github)](https://github.com/dapr/docs/blob/v1.13/LICENSE) [![GitHub issue custom search in repo](https://img.shields.io/github/issues-search/dapr/docs?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&label=Good%20first%20issues&style=flat&logo=github)](https://github.com/dapr/docs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![Discord](https://img.shields.io/discord/778680217417809931?label=Discord&style=flat&logo=discord)](http://bit.ly/dapr-discord) [![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCtpSQ9BLB_3EXdWAUQYwnRA?style=flat&label=YouTube%20views&logo=youtube)](https://youtube.com/@daprdev) [![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/daprdev?logo=x&style=flat)](https://twitter.com/daprdev) + If you are looking to explore the Dapr documentation, please go to the documentation website: [**https://docs.dapr.io**](https://docs.dapr.io) diff --git a/daprdocs/content/en/concepts/building-blocks-concept.md b/daprdocs/content/en/concepts/building-blocks-concept.md index 1841dd58468..54fe118b473 100644 --- a/daprdocs/content/en/concepts/building-blocks-concept.md +++ b/daprdocs/content/en/concepts/building-blocks-concept.md @@ -21,12 +21,12 @@ Dapr provides the following building blocks: | Building Block | Endpoint | Description | |----------------|----------|-------------| | [**Service-to-service invocation**]({{< ref "service-invocation-overview.md" >}}) | `/v1.0/invoke` | Service invocation enables applications to communicate with each other through well-known endpoints in the form of http or gRPC messages. Dapr provides an endpoint that acts as a combination of a reverse proxy with built-in service discovery, while leveraging built-in distributed tracing and error handling. -| [**State management**]({{< ref "state-management-overview.md" >}}) | `/v1.0/state` | Application state is anything an application wants to preserve beyond a single session. Dapr provides a key/value-based state and query APIs with pluggable state stores for persistence. | [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | `/v1.0/publish` `/v1.0/subscribe`| Pub/Sub is a loosely coupled messaging pattern where senders (or publishers) publish messages to a topic, to which subscribers subscribe. Dapr supports the pub/sub pattern between applications. +| [**Workflows**]({{< ref "workflow-overview.md" >}}) | `/v1.0-beta1/workflow` | The Workflow API enables you to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. The Workflow API can be combined with other Dapr API building blocks. For example, a workflow can call another service with service invocation or retrieve secrets, providing flexibility and portability. +| [**State management**]({{< ref "state-management-overview.md" >}}) | `/v1.0/state` | Application state is anything an application wants to preserve beyond a single session. Dapr provides a key/value-based state and query APIs with pluggable state stores for persistence. | [**Bindings**]({{< ref "bindings-overview.md" >}}) | `/v1.0/bindings` | A binding provides a bi-directional connection to an external cloud/on-premise service or system. Dapr allows you to invoke the external service through the Dapr binding API, and it allows your application to be triggered by events sent by the connected service. | [**Actors**]({{< ref "actors-overview.md" >}}) | `/v1.0/actors` | An actor is an isolated, independent unit of compute and state with single-threaded execution. Dapr provides an actor implementation based on the virtual actor pattern which provides a single-threaded programming model and where actors are garbage collected when not in use. | [**Secrets**]({{< ref "secrets-overview.md" >}}) | `/v1.0/secrets` | Dapr provides a secrets building block API and integrates with secret stores such as public cloud stores, local stores and Kubernetes to store the secrets. Services can call the secrets API to retrieve secrets, for example to get a connection string to a database. | [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | `/v1.0/configuration` | The Configuration API enables you to retrieve and subscribe to application configuration items for supported configuration stores. This enables an application to retrieve specific configuration information, for example, at start up or when configuration changes are made in the store. | [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | `/v1.0-alpha1/lock` | The distributed lock API enables you to take a lock on a resource so that multiple instances of an application can access the resource without conflicts and provide consistency guarantees. -| [**Workflows**]({{< ref "workflow-overview.md" >}}) | `/v1.0-beta1/workflow` | The Workflow API enables you to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. The Workflow API can be combined with other Dapr API building blocks. For example, a workflow can call another service with service invocation or retrieve secrets, providing flexibility and portability. | [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | `/v1.0-alpha1/crypto` | The Cryptography API enables you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your application. \ No newline at end of file diff --git a/daprdocs/content/en/concepts/components-concept.md b/daprdocs/content/en/concepts/components-concept.md index cb2f9e7ec51..d7a4f92ab5b 100644 --- a/daprdocs/content/en/concepts/components-concept.md +++ b/daprdocs/content/en/concepts/components-concept.md @@ -64,13 +64,6 @@ The component is unavailable for a short period of time during reload and reinit The following are the component types provided by Dapr: -### State stores - -State store components are data stores (databases, files, memory) that store key-value pairs as part of the [state management]({{< ref "state-management-overview.md" >}}) building block. - -- [List of state stores]({{< ref supported-state-stores >}}) -- [State store implementations](https://github.com/dapr/components-contrib/tree/master/state) - ### Name resolution Name resolution components are used with the [service invocation]({{< ref "service-invocation-overview.md" >}}) building block to integrate with the hosting environment and provide service-to-service discovery. For example, the Kubernetes name resolution component integrates with the Kubernetes DNS service, self-hosted uses mDNS and clusters of VMs can use the Consul name resolution component. @@ -85,6 +78,20 @@ Pub/sub broker components are message brokers that can pass messages to/from ser - [List of pub/sub brokers]({{< ref supported-pubsub >}}) - [Pub/sub broker implementations](https://github.com/dapr/components-contrib/tree/master/pubsub) +### Workflows + +A [workflow]({{< ref workflow-overview.md >}}) is custom application logic that defines a reliable business process or data flow. Workflow components are workflow runtimes (or engines) that run the business logic written for that workflow and store their state into a state store. + + + +### State stores + +State store components are data stores (databases, files, memory) that store key-value pairs as part of the [state management]({{< ref "state-management-overview.md" >}}) building block. + +- [List of state stores]({{< ref supported-state-stores >}}) +- [State store implementations](https://github.com/dapr/components-contrib/tree/master/state) + ### Bindings External resources can connect to Dapr in order to trigger a method on an application or be called from an application as part of the [bindings]({{< ref bindings-overview.md >}}) building block. @@ -113,13 +120,6 @@ Lock components are used as a distributed lock to provide mutually exclusive acc - [List of supported locks]({{< ref supported-locks >}}) - [Lock implementations](https://github.com/dapr/components-contrib/tree/master/lock) -### Workflows - -A [workflow]({{< ref workflow-overview.md >}}) is custom application logic that defines a reliable business process or data flow. Workflow components are workflow runtimes (or engines) that run the business logic written for that workflow and store their state into a state store. - - - ### Cryptography [Cryptography]({{< ref cryptography-overview.md >}}) components are used to perform crypographic operations, including encrypting and decrypting messages, without exposing keys to your application. diff --git a/daprdocs/content/en/concepts/dapr-services/placement.md b/daprdocs/content/en/concepts/dapr-services/placement.md index 7db47a37491..d94f9a8435d 100644 --- a/daprdocs/content/en/concepts/dapr-services/placement.md +++ b/daprdocs/content/en/concepts/dapr-services/placement.md @@ -2,25 +2,29 @@ type: docs title: "Dapr Placement control plane service overview" linkTitle: "Placement" -description: "Overview of the Dapr placement service" +description: "Overview of the Dapr Placement service" --- -The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). This hash table maps actor IDs to pods or processes so a Dapr application can communicate with the actor.Anytime a Dapr application activates a Dapr actor, the placement updates the hash tables with the latest actor locations. +The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). Grouped by namespace, the hash tables map actor types to pods or processes so a Dapr application can communicate with the actor. Anytime a Dapr application activates a Dapr actor, the Placement service updates the hash tables with the latest actor location. ## Self-hosted mode -The placement service Docker container is started automatically as part of [`dapr init`]({{< ref self-hosted-with-docker.md >}}). It can also be run manually as a process if you are running in [slim-init mode]({{< ref self-hosted-no-docker.md >}}). +The Placement service Docker container is started automatically as part of [`dapr init`]({{< ref self-hosted-with-docker.md >}}). It can also be run manually as a process if you are running in [slim-init mode]({{< ref self-hosted-no-docker.md >}}). ## Kubernetes mode -The placement service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}). +The Placement service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}). ## Placement tables -There is an [HTTP API `/placement/state` for placement service]({{< ref placement_api.md >}}) that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm you just need to set `dapr_placement.metadataEnabled` to true. +There is an [HTTP API `/placement/state` for Placement service]({{< ref placement_api.md >}}) that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm you just need to set `dapr_placement.metadataEnabled` to true. + +{{% alert title="Important" color="warning" %}} +When deploying actors into different namespaces ({{< ref namespaced-actors.md >}}), it is recommended to disable the `metadata-enabled` if you want to prevent retrieving actors from all namespaces. The metadata endpoint is scoped to all namespaces. +{{% /alert %}} ### Usecase: -The placement table API can be used for retrieving the current placement table, which contains all the actors registered. This can be helpful for debugging and allows tools to extract and present information about actors. +The placement table API can be used to retrieve the current placement table, which contains all the actors registered across all namespaces. This is helpful for debugging and allowing tools to extract and present information about actors. ### HTTP Request @@ -61,26 +65,29 @@ updatedAt | timestamp | Timestamp of the actor registered/updated. ```json { - "hostList": [{ - "name": "198.18.0.1:49347", - "appId": "actor1", - "actorTypes": ["testActorType1", "testActorType3"], - "updatedAt": 1690274322325260000 - }, - { - "name": "198.18.0.2:49347", - "appId": "actor2", - "actorTypes": ["testActorType2"], - "updatedAt": 1690274322325260000 - }, - { - "name": "198.18.0.3:49347", - "appId": "actor2", - "actorTypes": ["testActorType2"], - "updatedAt": 1690274322325260000 - } - ], - "tableVersion": 1 + "hostList": [{ + "name": "198.18.0.1:49347", + "namespace": "ns1", + "appId": "actor1", + "actorTypes": ["testActorType1", "testActorType3"], + "updatedAt": 1690274322325260000 + }, + { + "name": "198.18.0.2:49347", + "namespace": "ns2", + "appId": "actor2", + "actorTypes": ["testActorType2"], + "updatedAt": 1690274322325260000 + }, + { + "name": "198.18.0.3:49347", + "namespace": "ns2", + "appId": "actor2", + "actorTypes": ["testActorType2"], + "updatedAt": 1690274322325260000 + } + ], + "tableVersion": 1 } ``` diff --git a/daprdocs/content/en/concepts/faq/_index.md b/daprdocs/content/en/concepts/faq/_index.md new file mode 100644 index 00000000000..430eebd426d --- /dev/null +++ b/daprdocs/content/en/concepts/faq/_index.md @@ -0,0 +1,7 @@ +--- +type: docs +title: "Frequently asked questions and answers" +linkTitle: "FAQs" +weight: 1100 +description: "Learn more about Dapr concepts through frequently asked questions" +--- diff --git a/daprdocs/content/en/concepts/faq.md b/daprdocs/content/en/concepts/faq/faq.md similarity index 97% rename from daprdocs/content/en/concepts/faq.md rename to daprdocs/content/en/concepts/faq/faq.md index 5e4bdf7361d..34d37823f40 100644 --- a/daprdocs/content/en/concepts/faq.md +++ b/daprdocs/content/en/concepts/faq/faq.md @@ -1,8 +1,8 @@ --- type: docs -title: "Frequently asked questions and answers" -linkTitle: "FAQs" -weight: 1000 +title: "General Dapr questions and answers" +linkTitle: "General questions" +weight: 100 description: "Common questions asked about Dapr" --- diff --git a/daprdocs/content/en/concepts/service-mesh.md b/daprdocs/content/en/concepts/faq/service-mesh.md similarity index 99% rename from daprdocs/content/en/concepts/service-mesh.md rename to daprdocs/content/en/concepts/faq/service-mesh.md index 0e3c4cf9ef3..272d16b811b 100644 --- a/daprdocs/content/en/concepts/service-mesh.md +++ b/daprdocs/content/en/concepts/faq/service-mesh.md @@ -2,7 +2,7 @@ type: docs title: "Dapr and service meshes" linkTitle: "Service meshes" -weight: 900 +weight: 200 description: > How Dapr compares to and works with service meshes --- diff --git a/daprdocs/content/en/concepts/isolation-concept.md b/daprdocs/content/en/concepts/isolation-concept.md new file mode 100644 index 00000000000..38c26084cdb --- /dev/null +++ b/daprdocs/content/en/concepts/isolation-concept.md @@ -0,0 +1,45 @@ +--- +type: docs +title: "Isolation" +linkTitle: "Isolation" +weight: 700 +description: How Dapr provides namespacing and isolation +--- + +Dapr namespacing provides isolation and multi-tenancy across many capabilities, giving greater security. Typically applications and components are deployed to namespaces to provide isolation in a given environment, such as Kubernetes. + +Dapr supports namespacing in service invocation calls between applications, when accessing components, sending pub/sub messages in consumer groups, and with actors type deployments as examples. Namespacing isolation is supported in both self-hosted and Kubernetes modes. + +To get started, create and configure your namespace. + +{{< tabs "Self-Hosted" "Kubernetes">}} + +{{% codetab %}} + +In self-hosted mode, specify the namespace for a Dapr instance by setting the `NAMESPACE` environment variable. + +{{% /codetab %}} + +{{% codetab %}} + +On Kubernetes, create and configure the namespace: + +```bash +kubectl create namespace namespaceA +kubectl config set-context --current --namespace=namespaceA +``` + +Then deploy your applications into this namespace. + +{{% /codetab %}} + +{{< /tabs >}} + +Learn how to use namespacing throughout Dapr: + +- [Service Invocation namespaces]({{< ref service-invocation-namespaces.md >}}) +- [How to: Set up pub/sub namespace consumer groups]({{< ref howto-namespace.md >}}) +- Components: + - [How to: Configure pub/sub components with multiple namespaces]({{< ref pubsub-namespaces.md >}}) + - [Scope components to one or more applications]({{< ref component-scopes.md >}}) +- [Namespaced actors]({{< ref namespaced-actors.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/concepts/overview.md b/daprdocs/content/en/concepts/overview.md index 56624053722..bd5e01aa6a9 100644 --- a/daprdocs/content/en/concepts/overview.md +++ b/daprdocs/content/en/concepts/overview.md @@ -45,14 +45,14 @@ Each of these building block APIs is independent, meaning that you can use any n | Building Block | Description | |----------------|-------------| | [**Service-to-service invocation**]({{< ref "service-invocation-overview.md" >}}) | Resilient service-to-service invocation enables method calls, including retries, on remote services, wherever they are located in the supported hosting environment. -| [**State management**]({{< ref "state-management-overview.md" >}}) | With state management for storing and querying key/value pairs, long-running, highly available, stateful services can be easily written alongside stateless services in your application. The state store is pluggable and examples include AWS DynamoDB, Azure Cosmos DB, Azure SQL Server, GCP Firebase, PostgreSQL or Redis, among others. | [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | Publishing events and subscribing to topics between services enables event-driven architectures to simplify horizontal scalability and make them resilient to failure. Dapr provides at-least-once message delivery guarantee, message TTL, consumer groups and other advance features. +| [**Workflows**]({{< ref "workflow-overview.md" >}}) | The workflow API can be combined with other Dapr building blocks to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. +| [**State management**]({{< ref "state-management-overview.md" >}}) | With state management for storing and querying key/value pairs, long-running, highly available, stateful services can be easily written alongside stateless services in your application. The state store is pluggable and examples include AWS DynamoDB, Azure Cosmos DB, Azure SQL Server, GCP Firebase, PostgreSQL or Redis, among others. | [**Resource bindings**]({{< ref "bindings-overview.md" >}}) | Resource bindings with triggers builds further on event-driven architectures for scale and resiliency by receiving and sending events to and from any external source such as databases, queues, file systems, etc. | [**Actors**]({{< ref "actors-overview.md" >}}) | A pattern for stateful and stateless objects that makes concurrency simple, with method and state encapsulation. Dapr provides many capabilities in its actor runtime, including concurrency, state, and life-cycle management for actor activation/deactivation, and timers and reminders to wake up actors. | [**Secrets**]({{< ref "secrets-overview.md" >}}) | The secrets management API integrates with public cloud and local secret stores to retrieve the secrets for use in application code. | [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | The configuration API enables you to retrieve and subscribe to application configuration items from configuration stores. | [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | The distributed lock API enables your application to acquire a lock for any resource that gives it exclusive access until either the lock is released by the application, or a lease timeout occurs. -| [**Workflows**]({{< ref "workflow-overview.md" >}}) | The workflow API can be combined with other Dapr building blocks to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. | [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | The cryptography API provides an abstraction layer on top of security infrastructure such as key vaults. It contains APIs that allow you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your applications. ### Cross-cutting APIs diff --git a/daprdocs/content/en/concepts/terminology.md b/daprdocs/content/en/concepts/terminology.md index 80d5c89d7a2..c75af587b0c 100644 --- a/daprdocs/content/en/concepts/terminology.md +++ b/daprdocs/content/en/concepts/terminology.md @@ -2,7 +2,7 @@ type: docs title: "Dapr terminology and definitions" linkTitle: "Terminology" -weight: 900 +weight: 1000 description: Definitions for common terms and acronyms in the Dapr documentation --- @@ -17,6 +17,8 @@ This page details all of the common terms you may come across in the Dapr docs. | Dapr | Distributed Application Runtime. | [Dapr overview]({{< ref overview.md >}}) | Dapr control plane | A collection of services that are part of a Dapr installation on a hosting platform such as a Kubernetes cluster. This allows Dapr-enabled applications to run on the platform and handles Dapr capabilities such as actor placement, Dapr sidecar injection, or certificate issuance/rollover. | [Self-hosted overview]({{< ref self-hosted-overview >}})
[Kubernetes overview]({{< ref kubernetes-overview >}}) | HTTPEndpoint | HTTPEndpoint is a Dapr resource use to identify non-Dapr endpoints to invoke via the service invocation API. | [Service invocation API]({{< ref service_invocation_api.md >}}) +| Namespacing | Namespacing in Dapr provides isolation, and thus provides multi-tenancy. | Learn more about namespacing [components]({{< ref component-scopes.md >}}), [service invocation]({{< ref service-invocation-namespaces.md >}}), [pub/sub]({{< ref pubsub-namespaces.md >}}), and [actors]({{< ref namespaced-actors.md >}}) | Self-hosted | Windows/macOS/Linux machine(s) where you can run your applications with Dapr. Dapr provides the capability to run on machines in "self-hosted" mode. | [Self-hosted mode]({{< ref self-hosted-overview.md >}}) | Service | A running application or binary. This can refer to your application or to a Dapr application. | Sidecar | A program that runs alongside your application as a separate process or container. | [Sidecar pattern](https://docs.microsoft.com/azure/architecture/patterns/sidecar) + diff --git a/daprdocs/content/en/contributing/daprbot.md b/daprdocs/content/en/contributing/daprbot.md index 14fb29373f0..2e35fd4914b 100644 --- a/daprdocs/content/en/contributing/daprbot.md +++ b/daprdocs/content/en/contributing/daprbot.md @@ -12,7 +12,7 @@ Dapr bot is triggered by a list of commands that helps with common tasks in the | Command | Target | Description | Who can use | Repository | | ---------------- | --------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------- | -| `/assign` | Issue | Assigns an issue to a user or group of users | Anyone | `dapr`, `docs`, `quickstarts`, `cli`, `components-contrib`, `go-sdk`, `js-sdk`, `java-sdk`, `python-sdk`, `dotnet-sdk` | +| `/assign` | Issue | Assigns an issue to a user or group of users | Anyone | `dapr`, `docs`, `quickstarts`, `cli`, `components-contrib`, `go-sdk`, `js-sdk`, `java-sdk`, `python-sdk`, `dotnet-sdk`, `rust-sdk` | | `/ok-to-test` | Pull request | `dapr`: trigger end to end tests
`components-contrib`: trigger conformance and certification tests | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr`, `components-contrib` | | `/ok-to-perf` | Pull request | Trigger performance tests. | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr` | | `/make-me-laugh` | Issue or pull request | Posts a random joke | Users listed in the [bot](https://github.com/dapr/dapr/blob/master/.github/scripts/dapr_bot.js) | `dapr`, `components-contrib` | diff --git a/daprdocs/content/en/contributing/presentations.md b/daprdocs/content/en/contributing/presentations.md index f675510f20b..034cdc4a00b 100644 --- a/daprdocs/content/en/contributing/presentations.md +++ b/daprdocs/content/en/contributing/presentations.md @@ -13,7 +13,7 @@ We welcome community members giving presentations on Dapr and spreading the word {{% alert color="primary" %}} If you're using the PowerPoint template with MacOS, please install the Space Grotesk font to ensure the text is rendered properly: ```sh -brew install --cask homebrew/cask-fonts/font-space-grotesk +brew install --cask font-space-grotesk ``` {{% /alert %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md b/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md index 8a56cf4847c..b831ab6ad2a 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/_index.md @@ -2,7 +2,7 @@ type: docs title: "Actors" linkTitle: "Actors" -weight: 50 +weight: 60 description: Encapsulate code and data in reusable actor objects as a common microservices design pattern --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md index 4351b19cfbe..6153860e7da 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md @@ -2,7 +2,7 @@ type: docs title: "How-to: Enable and use actor reentrancy in Dapr" linkTitle: "How-To: Actor reentrancy" -weight: 70 +weight: 80 description: Learn more about actor reentrancy --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md index 695d27033aa..bb96b9b2326 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md @@ -52,8 +52,20 @@ You would use Dapr Workflow when you need to define and orchestrate complex work [Learn more about Dapr Workflow and how to use workflows in your application.]({{< ref workflow-overview.md >}}) +## Actor types and actor IDs + +Actors are uniquely defined as an instance of an actor type, similar to how an object is an instance of a class. For example, you might have an actor type that implements the functionality of a calculator. There could be many actors of that type distributed across various nodes in a cluster. + +Each actor is uniquely identified by an actor ID. An actor ID can be _any_ string value you choose. If you do not provide an actor ID, Dapr generates a random string for you as an ID. + ## Features +### Namespaced actors + +Dapr supports namespaced actors. An actor type can be deployed into different namespaces. You can call instances of these actors in the same namespace. + +[Learn more about namespaced actors and how they work.]({{< ref namespaced-actors.md >}}) + ### Actor lifetime Since Dapr actors are virtual, they do not need to be explicitly created or destroyed. The Dapr actor runtime: diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md index f6131475e96..7a4cd1ec74c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md @@ -2,7 +2,7 @@ type: docs title: "Actors timers and reminders" linkTitle: "Timers and reminders" -weight: 40 +weight: 50 description: "Setting timers and reminders and performing error handling for your actors" aliases: - "/developing-applications/building-blocks/actors/actors-background" diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md index 0d4017096e9..79c7303aba1 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors-partitioning.md @@ -2,7 +2,7 @@ type: docs title: "How to: Enable partitioning of actor reminders" linkTitle: "How to: Partition reminders" -weight: 50 +weight: 60 description: "Enable actor reminders partitioning for your application" aliases: - "/developing-applications/building-blocks/actors/actors-background" diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md index 16c7bbf4383..e0902e12c1b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/howto-actors.md @@ -2,7 +2,7 @@ type: docs title: "How-to: Interact with virtual actors using scripting" linkTitle: "How-To: Interact with virtual actors" -weight: 60 +weight: 70 description: Invoke the actor method for state management --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md b/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md new file mode 100644 index 00000000000..5954b61a1bf --- /dev/null +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/namespaced-actors.md @@ -0,0 +1,124 @@ +--- +type: docs +title: "Namespaced actors" +linkTitle: "Namespaced actors" +weight: 40 +description: "Learn about namespaced actors" +--- + + +Namespacing in Dapr provides isolation, and thus multi-tenancy. With actor namespacing, the same actor type can be deployed into different namespaces. You can call instances of these actors in the same namespace. + +{{% alert title="Note" color="primary" %}} +Each namespaced actor deployment must use its own separate state store, especially if the same actor type is used across namespaces. In other words, no namespace information is written as part of the actor record, and hence separate state stores are required for each namespace. See [Configuring actor state stores for namespacing]({{< ref "#configuring-actor-state-stores-for-namespacing" >}}) section for examples. +{{% /alert %}} + +## Creating and configuring namespaces + +You can use namespaces either in self-hosted mode or on Kubernetes. + +{{< tabs "Self-Hosted" "Kubernetes">}} + +{{% codetab %}} +In self-hosted mode, you can specify the namespace for a Dapr instance by setting [the `NAMESPACE` environment variable]({{< ref environment.md >}}). + +{{% /codetab %}} + +{{% codetab %}} +On Kubernetes, you can create and configure namepaces when deploying actor applications. For example, start with the following `kubectl` commands: + +```bash +kubectl create namespace namespace-actorA +kubectl config set-context --current --namespace=namespace-actorA +``` + +Then, deploy your actor applications into this namespace (in the example, `namespace-actorA`). + +{{% /codetab %}} + +{{< /tabs >}} + +## Configuring actor state stores for namespacing + +Each namespaced actor deployment **must** use its own separate state store. While you could use different physical databases for each actor namespace, some state store components provide a way to logically separate data by table, prefix, collection, and more. This allows you to use the same physical database for multiple namespaces, as long as you provide the logical separation in the Dapr component definition. + +Some examples are provided below. + +### Example 1: By a prefix in etcd + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: statestore +spec: + type: state.etcd + version: v2 + metadata: + - name: endpoints + value: localhost:2379 + - name: keyPrefixPath + value: namespace-actorA + - name: actorStateStore + value: "true" +``` + +### Example 2: By table name in SQLite + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: statestore +spec: + type: state.sqlite + version: v1 + metadata: + - name: connectionString + value: "data.db" + - name: tableName + value: "namespace-actorA" + - name: actorStateStore + value: "true" +``` + +### Example 3: By logical database number in Redis + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: statestore +spec: + type: state.redis + version: v1 + metadata: + - name: redisHost + value: localhost:6379 + - name: redisPassword + value: "" + - name: actorStateStore + value: "true" + - name: redisDB + value: "1" + - name: redisPassword + secretKeyRef: + name: redis-secret + key: redis-password + - name: actorStateStore + value: "true" + - name: redisDB + value: "1" +auth: + secretStore: +``` + +Check your [state store component specs]({{< ref supported-state-stores.md >}}) to see what it provides. + +{{% alert title="Note" color="primary" %}} +Namespaced actors use the multi-tenant Placement service. With this control plane service where each application deployment has its own namespace, sidecars belonging to an application in namespace "ActorA" won't receive placement information for an application in namespace "ActorB". +{{% /alert %}} + +## Next steps +- [Learn more about the Dapr Placement service]({{< ref placement.md >}}) +- [Placement API reference guide]({{< ref placement_api.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md index d15682d7bd4..7281020f2a5 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/_index.md @@ -2,7 +2,7 @@ type: docs title: "Bindings" linkTitle: "Bindings" -weight: 40 +weight: 50 description: Interface with or be triggered from external systems --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md b/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md index 664e94b6aee..c5bd4cac1fb 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/cryptography/_index.md @@ -2,7 +2,7 @@ type: docs title: "Cryptography" linkTitle: "Cryptography" -weight: 110 +weight: 100 description: "Perform cryptographic operations without exposing keys to your application" --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md index df3fb8b7a08..e3af831aa8b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/_index.md @@ -2,7 +2,7 @@ type: docs title: "Publish & subscribe messaging" linkTitle: "Publish & subscribe" -weight: 30 +weight: 20 description: Secure, scalable messaging between services --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md index 0db19095e99..d97c51b5eb7 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-route-messages.md @@ -40,7 +40,7 @@ scopes: In the programmatic approach, the `routes` structure is returned instead of `route`. The JSON structure matches the declarative YAML: -{{< tabs Python Node "C#" Go PHP>}} +{{< tabs Python JavaScript ".NET" Go PHP>}} {{% codetab %}} ```python diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md index 30072424738..8c718a37090 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-scopes.md @@ -69,17 +69,17 @@ The table below shows which applications are allowed to publish into the topics: | | topic1 | topic2 | topic3 | |------|--------|--------|--------| -| app1 | X | | | -| app2 | | X | X | +| app1 | ✅ | | | +| app2 | | ✅ | ✅ | | app3 | | | | The table below shows which applications are allowed to subscribe to the topics: | | topic1 | topic2 | topic3 | |------|--------|--------|--------| -| app1 | X | X | X | +| app1 | ✅ | ✅ | ✅ | | app2 | | | | -| app3 | X | | | +| app3 | ✅ | | | > Note: If an application is not listed (e.g. app1 in subscriptionScopes) it is allowed to subscribe to all topics. Because `allowedTopics` is not used and app1 does not have any subscription scopes, it can also use additional topics not listed above. @@ -143,17 +143,17 @@ The table below shows which application is allowed to publish into the topics: | | A | B | C | |------|---|---|---| -| app1 | X | | | -| app2 | X | X | | -| app3 | X | X | | +| app1 | ✅ | | | +| app2 | ✅ | ✅ | | +| app3 | ✅ | ✅ | | The table below shows which application is allowed to subscribe to the topics: | | A | B | C | |------|---|---|---| | app1 | | | | -| app2 | X | | | -| app3 | X | X | | +| app2 | ✅ | | | +| app3 | ✅ | ✅ | | ## Example 4: Mark topics as protected @@ -187,17 +187,17 @@ The table below shows which application is allowed to publish into the topics: | | A | B | C | |------|---|---|---| -| app1 | X | X | | -| app2 | | X | | -| app3 | | | X | +| app1 | ✅ | ✅ | | +| app2 | | ✅ | | +| app3 | | | ✅ | The table below shows which application is allowed to subscribe to the topics: | | A | B | C | |------|---|---|---| -| app1 | X | X | | -| app2 | | X | | -| app3 | | | X | +| app1 | ✅ | ✅ | | +| app2 | | ✅ | | +| app3 | | | ✅ | ## Demo diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md index ec48330e35c..28c3cb8f1ec 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md @@ -70,7 +70,7 @@ There are two ways to invoke a non-Dapr endpoint when communicating either to Da ``` ### Using appId when calling Dapr enabled applications -AppIDs are always used to call Dapr applications with the `appID` and `my-method``. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example: +AppIDs are always used to call Dapr applications with the `appID` and `my-method`. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example: ```sh localhost:3500/v1.0/invoke//method/ diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md index 5b4a0ecb98a..7966f4c3295 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/_index.md @@ -2,7 +2,7 @@ type: docs title: "State management" linkTitle: "State management" -weight: 20 +weight: 40 description: Create long running stateful services --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md index fad6afbfdac..fd492d188b6 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-get-save-state.md @@ -537,7 +537,7 @@ Try getting state again. Note that no value is returned. Below are code examples that leverage Dapr SDKs for saving and retrieving multiple states. -{{< tabs Dotnet Java Python Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}} +{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}} {{% codetab %}} @@ -656,6 +656,56 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} +```go +// dependencies +import ( + "context" + "log" + "math/rand" + "strconv" + "time" + + dapr "github.com/dapr/go-sdk/client" +) + +// code +func main() { + const STATE_STORE_NAME = "statestore" + rand.Seed(time.Now().UnixMicro()) + for i := 0; i < 10; i++ { + orderId := rand.Intn(1000-1) + 1 + client, err := dapr.NewClient() + if err != nil { + panic(err) + } + defer client.Close() + ctx := context.Background() + err = client.SaveState(ctx, STATE_STORE_NAME, "order_1", []byte(strconv.Itoa(orderId)), nil) + if err != nil { + panic(err) + } + keys := []string{"key1", "key2", "key3"} + items, err := client.GetBulkState(ctx, STATE_STORE_NAME, keys, nil, 100) + if err != nil { + panic(err) + } + for _, item := range items { + log.Println("Item from GetBulkState:", string(item.Value)) + } + } +} +``` + +To launch a Dapr sidecar for the above example application, run a command similar to the following: + +```bash +dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 go run OrderProcessingService.go +``` + +{{% /codetab %}} + +{{% codetab %}} + ```javascript //dependencies import { DaprClient, HttpMethod, CommunicationProtocolEnum } from '@dapr/dapr'; @@ -738,7 +788,7 @@ State transactions require a state store that supports multi-item transactions. Below are code examples that leverage Dapr SDKs for performing state transactions. -{{< tabs Dotnet Java Python Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}} +{{< tabs Dotnet Java Python Go Javascript "HTTP API (Bash)" "HTTP API (PowerShell)">}} {{% codetab %}} @@ -893,6 +943,79 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} +```go +// dependencies +package main + +import ( + "context" + "log" + "math/rand" + "strconv" + "time" + + dapr "github.com/dapr/go-sdk/client" +) + +// code +func main() { + const STATE_STORE_NAME = "statestore" + rand.Seed(time.Now().UnixMicro()) + for i := 0; i < 10; i++ { + orderId := rand.Intn(1000-1) + 1 + client, err := dapr.NewClient() + if err != nil { + panic(err) + } + defer client.Close() + ctx := context.Background() + err = client.SaveState(ctx, STATE_STORE_NAME, "order_1", []byte(strconv.Itoa(orderId)), nil) + if err != nil { + panic(err) + } + result, err := client.GetState(ctx, STATE_STORE_NAME, "order_1", nil) + if err != nil { + panic(err) + } + + ops := make([]*dapr.StateOperation, 0) + data1 := "data1" + data2 := "data2" + + op1 := &dapr.StateOperation{ + Type: dapr.StateOperationTypeUpsert, + Item: &dapr.SetStateItem{ + Key: "key1", + Value: []byte(data1), + }, + } + op2 := &dapr.StateOperation{ + Type: dapr.StateOperationTypeDelete, + Item: &dapr.SetStateItem{ + Key: "key2", + Value: []byte(data2), + }, + } + ops = append(ops, op1, op2) + meta := map[string]string{} + err = client.ExecuteStateTransaction(ctx, STATE_STORE_NAME, meta, ops) + + log.Println("Result after get:", string(result.Value)) + time.Sleep(2 * time.Second) + } +} +``` + +To launch a Dapr sidecar for the above example application, run a command similar to the following: + +```bash +dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 go run OrderProcessingService.go +``` + +{{% /codetab %}} + +{{% codetab %}} + ```javascript //dependencies import { DaprClient, HttpMethod, CommunicationProtocolEnum } from '@dapr/dapr'; diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md index 2831802729a..59dcf3c3711 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md @@ -28,8 +28,10 @@ The diagram below is an overview of how the outbox feature works: The outbox feature can be used with using any [transactional state store]({{< ref supported-state-stores >}}) supported by Dapr. All [pub/sub brokers]({{< ref supported-pubsub >}}) are supported with the outbox feature. +[Learn more about the transactional methods you can use.]({{< ref "howto-get-save-state.md#perform-state-transactions" >}}) + {{% alert title="Note" color="primary" %}} -Message brokers that work with the competing consumer pattern (for example, [Apache Kafka]({{< ref setup-apache-kafka>}}) are encouraged to reduce the chances of duplicate events. +Message brokers that work with the competing consumer pattern (for example, [Apache Kafka]({{< ref setup-apache-kafka>}})) are encouraged to reduce the chances of duplicate events. {{% /alert %}} ## Usage diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md index a1b87a20ac3..dbd73ca7900 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/_index.md @@ -2,7 +2,7 @@ type: docs title: "Workflow" linkTitle: "Workflow" -weight: 100 +weight: 30 description: "Orchestrate logic across various microservices" --- diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md index f7865f55e9c..fe6f69b63c2 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-patterns.md @@ -586,7 +586,45 @@ The key takeaways from this example are: - The number of parallel tasks can be static or dynamic - The workflow itself is capable of aggregating the results of parallel executions -While not shown in the example, it's possible to go further and limit the degree of concurrency using simple, language-specific constructs. Furthermore, the execution of the workflow is durable. If a workflow starts 100 parallel task executions and only 40 complete before the process crashes, the workflow restarts itself automatically and only schedules the remaining 60 tasks. +Furthermore, the execution of the workflow is durable. If a workflow starts 100 parallel task executions and only 40 complete before the process crashes, the workflow restarts itself automatically and only schedules the remaining 60 tasks. + +It's possible to go further and limit the degree of concurrency using simple, language-specific constructs. The sample code below illustrates how to restrict the degree of fan-out to just 5 concurrent activity executions: + +{{< tabs ".NET" >}} + +{{% codetab %}} + +```csharp + +//Revisiting the earlier example... +// Get a list of N work items to process in parallel. +object[] workBatch = await context.CallActivityAsync("GetWorkBatch", null); + +const int MaxParallelism = 5; +var results = new List(); +var inFlightTasks = new HashSet>(); +foreach(var workItem in workBatch) +{ + if (inFlightTasks.Count >= MaxParallelism) + { + var finishedTask = await Task.WhenAny(inFlightTasks); + results.Add(finishedTask.Result); + inFlightTasks.Remove(finishedTask); + } + + inFlightTasks.Add(context.CallActivityAsync("ProcessWorkItem", workItem)); +} +results.AddRange(await Task.WhenAll(inFlightTasks)); + +var sum = results.Sum(t => t); +await context.CallActivityAsync("PostResults", sum); +``` + +{{% /codetab %}} + +{{< /tabs >}} + +Limiting the degree of concurrency in this way can be useful for limiting contention against shared resources. For example, if the activities need to call into external resources that have their own concurrency limits, like a databases or external APIs, it can be useful to ensure that no more than a specified number of activities call that resource concurrently. ## Async HTTP APIs diff --git a/daprdocs/content/en/developing-applications/integrations/Azure/azure-functions.md b/daprdocs/content/en/developing-applications/integrations/Azure/azure-functions.md index 0de36d3eb4e..782ccfac633 100644 --- a/daprdocs/content/en/developing-applications/integrations/Azure/azure-functions.md +++ b/daprdocs/content/en/developing-applications/integrations/Azure/azure-functions.md @@ -6,9 +6,6 @@ description: "Access Dapr capabilities from your Azure Functions runtime applica weight: 3000 --- -{{% alert title="Note" color="primary" %}} -The Dapr extension for Azure Functions is currently in preview. -{{% /alert %}} Dapr integrates with the [Azure Functions runtime](https://learn.microsoft.com/azure/azure-functions/functions-overview) via an extension that lets a function seamlessly interact with Dapr. - **Azure Functions** provides an event-driven programming model. diff --git a/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md b/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md new file mode 100644 index 00000000000..1eabef6bf61 --- /dev/null +++ b/daprdocs/content/en/developing-applications/integrations/Diagrid/test-containers.md @@ -0,0 +1,21 @@ +--- +type: docs +title: "How to: Integrate using Testcontainers Dapr Module" +linkTitle: "Dapr Testcontainers" +weight: 3000 +description: "Use the Dapr Testcontainer module from your Java application" +--- + +You can use the Testcontainers Dapr Module provided by Diagrid to set up Dapr locally for your Java applications. Simply add the following dependency to your Maven project: + +```xml + + io.diagrid.dapr + testcontainers-dapr + 0.10.x + +``` + +[If you're using Spring Boot, you can also use the Spring Boot Starter.](https://github.com/diagridio/spring-boot-starter-dapr) + +{{< button text="Use the Testcontainers Dapr Module" link="https://github.com/diagridio/testcontainers-dapr" >}} \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/integrations/autoscale-keda.md b/daprdocs/content/en/developing-applications/integrations/autoscale-keda.md index b0b70928c8f..8e160f9a0e4 100644 --- a/daprdocs/content/en/developing-applications/integrations/autoscale-keda.md +++ b/daprdocs/content/en/developing-applications/integrations/autoscale-keda.md @@ -1,7 +1,7 @@ --- type: docs title: "How to: Autoscale a Dapr app with KEDA" -linkTitle: "How to: Autoscale with KEDA" +linkTitle: "KEDA" description: "How to configure your Dapr application to autoscale using KEDA" weight: 3000 --- diff --git a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md index bdd4a7ab020..6b05dfa6076 100644 --- a/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md +++ b/daprdocs/content/en/developing-applications/integrations/gRPC-integration.md @@ -1,7 +1,7 @@ --- type: docs title: "How to: Use the gRPC interface in your Dapr application" -linkTitle: "How to: gRPC interface" +linkTitle: "gRPC interface" weight: 6000 description: "Use the Dapr gRPC API in your application" --- diff --git a/daprdocs/content/en/developing-applications/integrations/github_actions.md b/daprdocs/content/en/developing-applications/integrations/github_actions.md index 15f87ffb484..bc01992cfb0 100644 --- a/daprdocs/content/en/developing-applications/integrations/github_actions.md +++ b/daprdocs/content/en/developing-applications/integrations/github_actions.md @@ -2,7 +2,7 @@ type: docs weight: 5000 title: "How to: Use the Dapr CLI in a GitHub Actions workflow" -linkTitle: "How to: GitHub Actions" +linkTitle: "GitHub Actions" description: "Add the Dapr CLI to your GitHub Actions to deploy and manage Dapr in your environments." --- diff --git a/daprdocs/content/en/developing-applications/integrations/kratix-marketplace.md b/daprdocs/content/en/developing-applications/integrations/kratix-marketplace.md new file mode 100644 index 00000000000..103a7fca2cd --- /dev/null +++ b/daprdocs/content/en/developing-applications/integrations/kratix-marketplace.md @@ -0,0 +1,17 @@ +--- +type: docs +title: "How to: Integrate with Kratix" +linkTitle: "Kratix Marketplace" +weight: 8000 +description: "Integrate with Kratix using a Dapr promise" +--- + +As part of the [Kratix Marketplace](https://docs.kratix.io/marketplace), Dapr can be used to build custom platforms tailored to your needs. + +{{% alert title="Note" color="warning" %}} +The Dapr Helm chart generates static public and private key pairs that are published in the repository. This promise should only be used _locally_ for demo purposes. If you wish to use this promise for more than demo purposes, it's recommended to manually update all the secrets in the promise with keys with your own credentials. +{{% /alert %}} + +Get started by simply installing the Dapr Promise, which installs Dapr on all matching clusters. + +{{< button text="Install the Dapr Promise" link="https://github.com/syntasso/kratix-marketplace/tree/main/dapr" >}} diff --git a/daprdocs/content/en/developing-applications/integrations/kubernetes-operator.md b/daprdocs/content/en/developing-applications/integrations/kubernetes-operator.md new file mode 100644 index 00000000000..fea913ee3ac --- /dev/null +++ b/daprdocs/content/en/developing-applications/integrations/kubernetes-operator.md @@ -0,0 +1,11 @@ +--- +type: docs +title: "How to: Use the Dapr Kubernetes Operator" +linkTitle: "Dapr Kubernetes Operator" +weight: 7000 +description: "Use the Dapr Kubernetes Operator to manage the Dapr control plane" +--- + +You can use the Dapr Kubernetes Operator to manage the Dapr control plane. Use the operator to automate the tasks required to manage the lifecycle of Dapr control plane in Kubernetes mode. + +{{< button text="Install and use the Dapr Kubernetes Operator" link="https://github.com/dapr/dapr-kubernetes-operator" >}} diff --git a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md index e5c526da43f..606ae9fbe8c 100644 --- a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md +++ b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md @@ -42,7 +42,7 @@ dapr run -f ```cmd -dapr run -f -k +dapr run -f -k ``` {{% /codetab %}} @@ -67,7 +67,7 @@ dapr run -f ./path/to/.yaml ```cmd -dapr run -f -k ./path/to/.yaml +dapr run -f ./path/to/.yaml -k ``` {{% /codetab %}} @@ -77,10 +77,27 @@ dapr run -f -k ./path/to/.yaml Once the multi-app template is running, you can view the started applications with the following command: +{{< tabs Self-hosted Kubernetes>}} + +{{% codetab %}} + + ```cmd dapr list ``` +{{% /codetab %}} + +{{% codetab %}} + + +```cmd +dapr list -k +``` +{{% /codetab %}} + +{{< /tabs >}} + ## Stop the multi-app template Stop the multi-app run template anytime with either of the following commands: @@ -109,12 +126,12 @@ dapr stop -f ./path/to/.yaml ```cmd # the template file needs to be called `dapr.yaml` by default if a directory path is given -dapr stop -f -k +dapr stop -f -k ``` or: ```cmd -dapr stop -f -k ./path/to/.yaml +dapr stop -f ./path/to/.yaml -k ``` {{% /codetab %}} diff --git a/daprdocs/content/en/getting-started/quickstarts/_index.md b/daprdocs/content/en/getting-started/quickstarts/_index.md index ff16bc218f7..6507ee635d5 100644 --- a/daprdocs/content/en/getting-started/quickstarts/_index.md +++ b/daprdocs/content/en/getting-started/quickstarts/_index.md @@ -22,13 +22,13 @@ Hit the ground running with our Dapr quickstarts, complete with code samples aim | Quickstarts | Description | | ----------- | ----------- | -| [Publish and Subscribe]({{< ref pubsub-quickstart.md >}}) | Asynchronous communication between two services using messaging. | | [Service Invocation]({{< ref serviceinvocation-quickstart.md >}}) | Synchronous communication between two services using HTTP or gRPC. | +| [Publish and Subscribe]({{< ref pubsub-quickstart.md >}}) | Asynchronous communication between two services using messaging. | +| [Workflow]({{< ref workflow-quickstart.md >}}) | Orchestrate business workflow activities in long running, fault-tolerant, stateful applications. | | [State Management]({{< ref statemanagement-quickstart.md >}}) | Store a service's data as key/value pairs in supported state stores. | | [Bindings]({{< ref bindings-quickstart.md >}}) | Work with external systems using input bindings to respond to events and output bindings to call operations. | | [Actors]({{< ref actors-quickstart.md >}}) | Run a microservice and a simple console client to demonstrate stateful object patterns in Dapr Actors. | | [Secrets Management]({{< ref secrets-quickstart.md >}}) | Securely fetch secrets. | | [Configuration]({{< ref configuration-quickstart.md >}}) | Get configuration items and subscribe for configuration updates. | | [Resiliency]({{< ref resiliency >}}) | Define and apply fault-tolerance policies to your Dapr API requests. | -| [Workflow]({{< ref workflow-quickstart.md >}}) | Orchestrate business workflow activities in long running, fault-tolerant, stateful applications. | | [Cryptography]({{< ref cryptography-quickstart.md >}}) | Encrypt and decrypt data using Dapr's cryptographic APIs. | diff --git a/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md index c1bdc2f0498..ab1d89d0009 100644 --- a/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/actors-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Actors" linkTitle: "Actors" -weight: 75 +weight: 76 description: "Get started with Dapr's Actors building block" --- diff --git a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md index cbfa248c94b..4e40a515912 100644 --- a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Input & Output Bindings" linkTitle: "Bindings" -weight: 74 +weight: 75 description: "Get started with Dapr's Binding building block" --- diff --git a/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md index 1e252e2c5a1..a9c563ba1e0 100644 --- a/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Configuration" linkTitle: Configuration -weight: 77 +weight: 78 description: Get started with Dapr's Configuration building block --- diff --git a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md index 3b459afebfd..372c106a98d 100644 --- a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Publish and Subscribe" linkTitle: "Publish and Subscribe" -weight: 73 +weight: 72 description: "Get started with Dapr's Publish and Subscribe building block" --- diff --git a/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md index 97a8a4b42f7..de12598d24f 100644 --- a/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Secrets Management" linkTitle: "Secrets Management" -weight: 76 +weight: 77 description: "Get started with Dapr's Secrets Management building block" --- diff --git a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md index bfa8427da8c..a0448f0d3dd 100644 --- a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: State Management" linkTitle: "State Management" -weight: 72 +weight: 74 description: "Get started with Dapr's State Management building block" --- @@ -169,14 +169,6 @@ Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quic git clone https://github.com/dapr/quickstarts.git ``` -Install the dependencies for the `order-processor` app: - -```bash -cd ./order-processor -npm install -cd .. -``` - ### Step 2: Manipulate service state In a terminal window, navigate to the `order-processor` directory. diff --git a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md index 4c504aee783..8e1adb0c5fc 100644 --- a/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/workflow-quickstart.md @@ -2,7 +2,7 @@ type: docs title: "Quickstart: Workflow" linkTitle: Workflow -weight: 78 +weight: 73 description: Get started with the Dapr Workflow building block --- diff --git a/daprdocs/content/en/operations/components/component-secrets.md b/daprdocs/content/en/operations/components/component-secrets.md index b7e1f0a51f7..d894865251b 100644 --- a/daprdocs/content/en/operations/components/component-secrets.md +++ b/daprdocs/content/en/operations/components/component-secrets.md @@ -75,15 +75,14 @@ spec: type: bindings.azure.servicebusqueues version: v1 metadata: - -name: connectionString - secretKeyRef: + - name: connectionString + secretKeyRef: name: asbNsConnString key: asbNsConnString - -name: queueName - value: servicec-inputq + - name: queueName + value: servicec-inputq auth: secretStore: - ``` The above "Secret is a string" case yaml tells Dapr to extract a connection string named `asbNsConnstring` from the defined `secretStore` and assign the value to the `connectionString` field in the component since there is no key embedded in the "secret" from the `secretStore` because it is a plain string. This requires the secret `name` and secret `key` to be identical. @@ -95,7 +94,7 @@ The following example shows you how to create a Kubernetes secret to hold the co 1. First, create the Kubernetes secret: ```bash - kubectl create secret generic eventhubs-secret --from-literal=connectionString=********* + kubectl create secret generic eventhubs-secret --from-literal=connectionString=********* ``` 2. Next, reference the secret in your binding: diff --git a/daprdocs/content/en/operations/components/pluggable-components-registration.md b/daprdocs/content/en/operations/components/pluggable-components-registration.md index 10f6a057715..7aecca49458 100644 --- a/daprdocs/content/en/operations/components/pluggable-components-registration.md +++ b/daprdocs/content/en/operations/components/pluggable-components-registration.md @@ -52,7 +52,7 @@ Since you are running Dapr in the same host as the component, verify that this f ### Component discovery and multiplexing -A pluggable component accessible through a [Unix Domain Socket][UDS] (UDS) can host multiple distinct component APIs . During the components' initial discovery process, Dapr uses reflection to enumerate all the component APIs behind a UDS. The `my-component` pluggable component in the example above can contain both state store (`state`) and a pub/sub (`pubsub`) component APIs. +A pluggable component accessible through a [Unix Domain Socket][UDS] (UDS) can host multiple distinct component APIs. During the components' initial discovery process, Dapr uses reflection to enumerate all the component APIs behind a UDS. The `my-component` pluggable component in the example above can contain both state store (`state`) and a pub/sub (`pubsub`) component APIs. Typically, a pluggable component implements a single component API for packaging and deployment. However, at the expense of increasing its dependencies and broadening its security attack surface, a pluggable component can have multiple component APIs implemented. This could be done to ease the deployment and monitoring burden. Best practice for isolation, fault tolerance, and security is a single component API implementation for each pluggable component. diff --git a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md index 612d84bce39..eff5f17cb1b 100644 --- a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md +++ b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md @@ -23,12 +23,12 @@ The table below shows which resources are deployed to which namespaces: | Resource | namespace-a | namespace-b | |------------------------ |-------------|-------------| -| Redis master | X | | -| Redis replicas | X | | -| Dapr's PubSub component | X | X | -| Node subscriber | X | | -| Python subscriber | X | | -| React UI publisher | | X | +| Redis master | ✅ | ❌ | +| Redis replicas | ✅ | ❌ | +| Dapr's PubSub component | ✅ | ✅ | +| Node subscriber | ✅ | ❌ | +| Python subscriber | ✅ | ❌ | +| React UI publisher | ❌ | ✅ | {{% alert title="Note" color="primary" %}} All pub/sub components support limiting pub/sub topics to specific applications using [namespace or component scopes]({{< ref pubsub-scopes.md >}}). diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md index aa26e270496..6fbf8bca32d 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md @@ -49,7 +49,7 @@ The CustomResourceDefinition "configurations.dapr.io" is invalid: spec.preserveU 1. Run the following command to upgrade the `CustomResourceDefinition` to a compatible version: ```sh - kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/5a15b3e0f093d2d0938b12f144c7047474a290fe/charts/dapr/crds/configuration.yaml + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/release-{{% dapr-latest-version short="true" %}}/charts/dapr/crds/configuration.yaml ``` 1. Proceed with the `dapr upgrade --runtime-version {{% dapr-latest-version long="true" %}} -k` command. diff --git a/daprdocs/content/en/operations/observability/tracing/setup-tracing.md b/daprdocs/content/en/operations/observability/tracing/setup-tracing.md index 4fd3f40bca6..9a04f6bc90d 100644 --- a/daprdocs/content/en/operations/observability/tracing/setup-tracing.md +++ b/daprdocs/content/en/operations/observability/tracing/setup-tracing.md @@ -20,7 +20,7 @@ spec: tracing: samplingRate: "1" otel: - endpointAddress: "https://..." + endpointAddress: "myendpoint.cluster.local:4317" zipkin: endpointAddress: "https://..." @@ -32,10 +32,10 @@ The following table lists the properties for tracing: |--------------|--------|-------------| | `samplingRate` | string | Set sampling rate for tracing to be enabled or disabled. | `stdout` | bool | True write more verbose information to the traces -| `otel.endpointAddress` | string | Set the Open Telemetry (OTEL) server address. +| `otel.endpointAddress` | string | Set the Open Telemetry (OTEL) target hostname and optionally port. If this is used, you do not need to specify the 'zipkin' section. | `otel.isSecure` | bool | Is the connection to the endpoint address encrypted. | `otel.protocol` | string | Set to `http` or `grpc` protocol. -| `zipkin.endpointAddress` | string | Set the Zipkin server address. If this is used, you do not need to specify the `otel` section. +| `zipkin.endpointAddress` | string | Set the Zipkin server URL. If this is used, you do not need to specify the `otel` section. To enable tracing, use a configuration file (in self hosted mode) or a Kubernetes configuration object (in Kubernetes mode). For example, the following configuration object changes the sample rate to 1 (every span is sampled), and sends trace using OTEL protocol to the OTEL server at localhost:4317 @@ -66,7 +66,7 @@ turns on tracing for the sidecar. | Environment Variable | Description | |----------------------|-------------| -| `OTEL_EXPORTER_OTLP_ENDPOINT` | Sets the Open Telemetry (OTEL) server address, turns on tracing | +| `OTEL_EXPORTER_OTLP_ENDPOINT` | Sets the Open Telemetry (OTEL) server hostname and optionally port, turns on tracing | | `OTEL_EXPORTER_OTLP_INSECURE` | Sets the connection to the endpoint as unencrypted (true/false) | | `OTEL_EXPORTER_OTLP_PROTOCOL` | Transport protocol (`grpc`, `http/protobuf`, `http/json`) | diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index 05b421b3d81..d32d4b52a39 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,6 +45,8 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| +| May 29th 2024 | 1.13.4
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported (current) | [v1.13.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.4) | +| May 21st 2024 | 1.13.3
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported (current) | [v1.13.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.3) | | April 3rd 2024 | 1.13.2
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported (current) | [v1.13.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.2) | | March 26th 2024 | 1.13.1
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported (current) | [v1.13.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.1) | | March 6th 2024 | 1.13.0
| 1.13.0 | Java 1.11.0
Go 1.10.0
PHP 1.2.0
Python 1.13.0
.NET 1.13.0
JS 3.3.0 | 0.14.0 | Supported (current) | [v1.13.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.13.0) | @@ -136,6 +138,8 @@ General guidance on upgrading can be found for [self hosted mode]({{< ref self-h | 1.11.0 | N/A | 1.11.4 | | 1.12.0 | N/A | 1.12.4 | | 1.13.0 | N/A | 1.13.2 | +| 1.13.0 | N/A | 1.13.3 | +| 1.13.0 | N/A | 1.13.4 | ## Upgrade on Hosting platforms diff --git a/daprdocs/content/en/reference/api/actors_api.md b/daprdocs/content/en/reference/api/actors_api.md index e2c9920a10d..79710612b98 100644 --- a/daprdocs/content/en/reference/api/actors_api.md +++ b/daprdocs/content/en/reference/api/actors_api.md @@ -3,7 +3,7 @@ type: docs title: "Actors API reference" linkTitle: "Actors API" description: "Detailed documentation on the actors API" -weight: 500 +weight: 600 --- Dapr provides native, cross-platform, and cross-language virtual actor capabilities. diff --git a/daprdocs/content/en/reference/api/bindings_api.md b/daprdocs/content/en/reference/api/bindings_api.md index 1dbe37b7ee0..4d113c4f990 100644 --- a/daprdocs/content/en/reference/api/bindings_api.md +++ b/daprdocs/content/en/reference/api/bindings_api.md @@ -3,7 +3,7 @@ type: docs title: "Bindings API reference" linkTitle: "Bindings API" description: "Detailed documentation on the bindings API" -weight: 400 +weight: 500 --- Dapr provides bi-directional binding capabilities for applications and a consistent approach to interacting with different cloud/on-premise services or systems. diff --git a/daprdocs/content/en/reference/api/configuration_api.md b/daprdocs/content/en/reference/api/configuration_api.md index 1d0233af57f..bfb7339029c 100644 --- a/daprdocs/content/en/reference/api/configuration_api.md +++ b/daprdocs/content/en/reference/api/configuration_api.md @@ -3,7 +3,7 @@ type: docs title: "Configuration API reference" linkTitle: "Configuration API" description: "Detailed documentation on the configuration API" -weight: 700 +weight: 800 --- ## Get Configuration diff --git a/daprdocs/content/en/reference/api/distributed_lock_api.md b/daprdocs/content/en/reference/api/distributed_lock_api.md index efa9486ca03..56f4739d6c7 100644 --- a/daprdocs/content/en/reference/api/distributed_lock_api.md +++ b/daprdocs/content/en/reference/api/distributed_lock_api.md @@ -3,7 +3,7 @@ type: docs title: "Distributed Lock API reference" linkTitle: "Distributed Lock API" description: "Detailed documentation on the distributed lock API" -weight: 800 +weight: 900 --- ## Lock diff --git a/daprdocs/content/en/reference/api/placement_api.md b/daprdocs/content/en/reference/api/placement_api.md index a882eb8618e..dde238edf12 100644 --- a/daprdocs/content/en/reference/api/placement_api.md +++ b/daprdocs/content/en/reference/api/placement_api.md @@ -6,10 +6,14 @@ description: "Detailed documentation on the Placement API" weight: 1200 --- -Dapr has an HTTP API `/placement/state` for placement service that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. +Dapr has an HTTP API `/placement/state` for Placement service that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. To enable the placement metadata in self-hosted mode you can either set`DAPR_PLACEMENT_METADATA_ENABLED` environment variable or `metadata-enabled` command line args on the Placement service to `true` to. See [how to run the Placement service in self-hosted mode]({{< ref "self-hosted-no-docker.md#enable-actors" >}}). +{{% alert title="Important" color="warning" %}} +When running placement in [multi-tenant mode]({{< ref namespaced-actors.md >}}), disable the `metadata-enabled` command line args to prevent different namespaces from seeing each other's data. +{{% /alert %}} + If you are using Helm for deployment of the Placement service on Kubernetes then to enable the placement metadata, set `dapr_placement.metadataEnabled` to `true`. ## Usecase @@ -55,25 +59,28 @@ updatedAt | timestamp | Timestamp of the actor registered/updated. ```json { - "hostList": [{ - "name": "198.18.0.1:49347", - "appId": "actor1", - "actorTypes": ["testActorType1", "testActorType3"], - "updatedAt": 1690274322325260000 - }, - { - "name": "198.18.0.2:49347", - "appId": "actor2", - "actorTypes": ["testActorType2"], - "updatedAt": 1690274322325260000 - }, - { - "name": "198.18.0.3:49347", - "appId": "actor2", - "actorTypes": ["testActorType2"], - "updatedAt": 1690274322325260000 - } - ], - "tableVersion": 1 + "hostList": [{ + "name": "198.18.0.1:49347", + "namespace": "ns1", + "appId": "actor1", + "actorTypes": ["testActorType1", "testActorType3"], + "updatedAt": 1690274322325260000 + }, + { + "name": "198.18.0.2:49347", + "namespace": "ns2", + "appId": "actor2", + "actorTypes": ["testActorType2"], + "updatedAt": 1690274322325260000 + }, + { + "name": "198.18.0.3:49347", + "namespace": "ns2", + "appId": "actor2", + "actorTypes": ["testActorType2"], + "updatedAt": 1690274322325260000 + } + ], + "tableVersion": 1 } ``` \ No newline at end of file diff --git a/daprdocs/content/en/reference/api/pubsub_api.md b/daprdocs/content/en/reference/api/pubsub_api.md index 03068cc3b9c..f536771083e 100644 --- a/daprdocs/content/en/reference/api/pubsub_api.md +++ b/daprdocs/content/en/reference/api/pubsub_api.md @@ -3,7 +3,7 @@ type: docs title: "Pub/sub API reference" linkTitle: "Pub/Sub API" description: "Detailed documentation on the pub/sub API" -weight: 300 +weight: 200 --- ## Publish a message to a given topic @@ -177,7 +177,15 @@ Example: { "pubsubname": "pubsub", "topic": "newOrder", - "route": "/orders", + "routes": { + "rules": [ + { + "match": "event.type == order", + "path": "/orders" + } + ] + "default" : "/otherorders" + }, "metadata": { "rawPayload": "true" } @@ -197,7 +205,7 @@ Parameter | Description ### Provide route(s) for Dapr to deliver topic events -In order to deliver topic events, a `POST` call will be made to user code with the route specified in the subscription response. +In order to deliver topic events, a `POST` call will be made to user code with the route specified in the subscription response. Under `routes`, you can provide [rules that match a certain condition to a specific path when a message topic is received.]({{< ref "howto-route-messages.md" >}}) You can also provide a default route for any rules that do not have a specific match. The following example illustrates this point, considering a subscription for topic `newOrder` with route `orders` on port 3000: `POST http://localhost:3000/orders` diff --git a/daprdocs/content/en/reference/api/secrets_api.md b/daprdocs/content/en/reference/api/secrets_api.md index 89e8a405a5d..13d0d799133 100644 --- a/daprdocs/content/en/reference/api/secrets_api.md +++ b/daprdocs/content/en/reference/api/secrets_api.md @@ -3,7 +3,7 @@ type: docs title: "Secrets API reference" linkTitle: "Secrets API" description: "Detailed documentation on the secrets API" -weight: 600 +weight: 700 --- ## Get Secret diff --git a/daprdocs/content/en/reference/api/state_api.md b/daprdocs/content/en/reference/api/state_api.md index 7dc1600d954..b3ad0ab7a4e 100644 --- a/daprdocs/content/en/reference/api/state_api.md +++ b/daprdocs/content/en/reference/api/state_api.md @@ -3,7 +3,7 @@ type: docs title: "State management API reference" linkTitle: "State management API" description: "Detailed documentation on the state management API" -weight: 200 +weight: 400 --- ## Component file diff --git a/daprdocs/content/en/reference/api/workflow_api.md b/daprdocs/content/en/reference/api/workflow_api.md index 5743bfd5a2f..91a19d86407 100644 --- a/daprdocs/content/en/reference/api/workflow_api.md +++ b/daprdocs/content/en/reference/api/workflow_api.md @@ -3,7 +3,7 @@ type: docs title: "Workflow API reference" linkTitle: "Workflow API" description: "Detailed documentation on the workflow API" -weight: 900 +weight: 300 --- {{% alert title="Note" color="primary" %}} diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index b40af670116..a02a04b658c 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -71,10 +71,10 @@ dapr init -s **Specify a runtime version** -You can also specify a specific runtime version. Be default, the latest version is used. +You can also specify a specific runtime version. By default, the latest version is used. ```bash -dapr init --runtime-version 1.13.0 +dapr init --runtime-version 1.13.4 ``` **Install with image variant** diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md b/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md index 4894dedfb82..f3731af00c6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md @@ -2,7 +2,7 @@ type: docs title: "Bindings component specs" linkTitle: "Bindings" -weight: 3000 +weight: 4000 description: The supported external bindings that interface with Dapr aliases: - "/operations/components/setup-bindings/supported-bindings/" diff --git a/daprdocs/content/en/reference/components-reference/supported-configuration-stores/_index.md b/daprdocs/content/en/reference/components-reference/supported-configuration-stores/_index.md index 34114b9605f..b8e80f12216 100644 --- a/daprdocs/content/en/reference/components-reference/supported-configuration-stores/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-configuration-stores/_index.md @@ -2,7 +2,7 @@ type: docs title: "Configuration store component specs" linkTitle: "Configuration stores" -weight: 5000 +weight: 6000 description: The supported configuration stores that interface with Dapr aliases: - "/operations/components/setup-configuration-store/supported-configuration-stores/" diff --git a/daprdocs/content/en/reference/components-reference/supported-cryptography/_index.md b/daprdocs/content/en/reference/components-reference/supported-cryptography/_index.md index d042ab10ea3..c7789d5e4a6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-cryptography/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-cryptography/_index.md @@ -2,7 +2,7 @@ type: docs title: "Cryptography component specs" linkTitle: "Cryptography" -weight: 7000 +weight: 8000 description: The supported cryptography components that interface with Dapr no_list: true --- diff --git a/daprdocs/content/en/reference/components-reference/supported-locks/_index.md b/daprdocs/content/en/reference/components-reference/supported-locks/_index.md index 93a29600654..134e75360dc 100644 --- a/daprdocs/content/en/reference/components-reference/supported-locks/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-locks/_index.md @@ -2,7 +2,7 @@ type: docs title: "Lock component specs" linkTitle: "Locks" -weight: 6000 +weight: 7000 description: The supported locks that interface with Dapr no_list: true --- diff --git a/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md b/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md index 767fafe2dd2..35dffff707d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md @@ -2,7 +2,7 @@ type: docs title: "Middleware component specs" linkTitle: "Middleware" -weight: 9000 +weight: 10000 description: List of all the supported middleware components that can be injected in Dapr's processing pipeline. no_list: true aliases: diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md index 7ebd05eb9af..37837d93c35 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md @@ -2,7 +2,7 @@ type: docs title: "Name resolution provider component specs" linkTitle: "Name resolution" -weight: 8000 +weight: 9000 description: The supported name resolution providers to enable Dapr service invocation no_list: true --- diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md index 9935e3e07ad..ff00c013737 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md @@ -2,7 +2,7 @@ type: docs title: "Pub/sub brokers component specs" linkTitle: "Pub/sub brokers" -weight: 2000 +weight: 1000 description: The supported pub/sub brokers that interface with Dapr aliases: - "/operations/components/setup-pubsub/supported-pubsub/" diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md index 8609225b747..6ff677a122d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md @@ -70,7 +70,7 @@ spec: |--------------------|:--------:|---------|---------| | brokers | Y | A comma-separated list of Kafka brokers. | `"localhost:9092,dapr-kafka.myapp.svc.cluster.local:9093"` | consumerGroup | N | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. If a value for `consumerGroup` is provided, any value for `consumerID` is ignored - a combination of the consumer group and a random unique identifier will be set for the `consumerID` instead. | `"group1"` -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. If a value for `consumerGroup` is provided, any value for `consumerID` is ignored - a combination of the consumer group and a random unique identifier will be set for the `consumerID` instead. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. If a value for `consumerGroup` is provided, any value for `consumerID` is ignored - a combination of the consumer group and a random unique identifier will be set for the `consumerID` instead. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | clientID | N | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. Defaults to `"namespace.appID"` for Kubernetes mode or `"appID"` for Self-Hosted mode. | `"my-namespace.my-dapr-app"`, `"my-dapr-app"` | authRequired | N | *Deprecated* Enable [SASL](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication with the Kafka brokers. | `"true"`, `"false"` | authType | Y | Configure or disable authentication. Supported values: `none`, `password`, `mtls`, `oidc` or `awsiam` | `"password"`, `"none"` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index aa9e65e3723..360bd6ef3e3 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -83,7 +83,7 @@ The above example uses secrets as plain strings. It is recommended to use [a sec | accessKey | Y | ID of the AWS account/role with appropriate permissions to SNS and SQS (see below) | `"AKIAIOSFODNN7EXAMPLE"` | secretKey | Y | Secret for the AWS user/role. If using an `AssumeRole` access, you will also need to provide a `sessionToken` |`"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"` | region | Y | The AWS region where the SNS/SQS assets are located or be created in. See [this page](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ugi&l=na) for valid regions. Ensure that SNS and SQS are available in that region | `"us-east-1"` -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | endpoint | N | AWS endpoint for the component to use. Only used for local development with, for example, [localstack](https://github.com/localstack/localstack). The `endpoint` is unnecessary when running against production AWS | `"http://localhost:4566"` | sessionToken | N | AWS session token to use. A session token is only required if you are using temporary security credentials | `"TOKEN"` | messageReceiveLimit | N | Number of times a message is received, after processing of that message fails, that once reached, results in removing of that message from the queue. If `sqsDeadLettersQueueName` is specified, `messageReceiveLimit` is the number of times a message is received, after processing of that message fails, that once reached, results in moving of the message to the SQS dead-letters queue. Default: `10` | `10` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md index 215d93bf44e..713bdb1cbb7 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md @@ -64,7 +64,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr |--------------------|:--------:|---------|---------| | `connectionString` | Y* | Connection string for the Event Hub or the Event Hub namespace.
* Mutally exclusive with `eventHubNamespace` field.
* Required when not using [Microsoft Entra ID Authentication]({{< ref "authenticating-azure.md" >}}) | `"Endpoint=sb://{EventHubNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key};EntityPath={EventHub}"` or `"Endpoint=sb://{EventHubNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key}"` | `eventHubNamespace` | Y* | The Event Hub Namespace name.
* Mutally exclusive with `connectionString` field.
* Required when using [Microsoft Entra ID Authentication]({{< ref "authenticating-azure.md" >}}) | `"namespace"` -| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | `storageAccountName` | Y | Storage account name to use for the checkpoint store. |`"myeventhubstorage"` | `storageAccountKey` | Y* | Storage account key for the checkpoint store account.
* When using Microsoft Entra ID, it's possible to omit this if the service principal has access to the storage account too. | `"112233445566778899"` | `storageConnectionString` | Y* | Connection string for the checkpoint store, alternative to specifying `storageAccountKey` | `"DefaultEndpointsProtocol=https;AccountName=myeventhubstorage;AccountKey="` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md index 57e3b92868d..8e949e52f7a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md @@ -71,7 +71,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | `connectionString` | Y | Shared access policy connection string for the Service Bus. Required unless using Microsoft Entra ID authentication. | See example above -| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | `namespaceName`| N | Parameter to set the address of the Service Bus namespace, as a fully-qualified domain name. Required if using Microsoft Entra ID authentication. | `"namespace.servicebus.windows.net"` | | `timeoutInSec` | N | Timeout for sending messages and for management operations. Default: `60` |`30` | `handlerTimeoutInSec`| N | Timeout for invoking the app's handler. Default: `60` | `30` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md index 157f960da3e..78b73137ffc 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md @@ -30,7 +30,7 @@ spec: - name: connectionString value: "Endpoint=sb://{ServiceBusNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key};EntityPath={ServiceBus}" # - name: consumerID # Optional: defaults to the app's own ID - # value: "{identifier}" + # value: channel1 # - name: timeoutInSec # Optional # value: 60 # - name: handlerTimeoutInSec # Optional @@ -75,7 +75,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr |--------------------|:--------:|---------|---------| | `connectionString` | Y | Shared access policy connection string for the Service Bus. Required unless using Microsoft Entra ID authentication. | See example above | `namespaceName`| N | Parameter to set the address of the Service Bus namespace, as a fully-qualified domain name. Required if using Microsoft Entra ID authentication. | `"namespace.servicebus.windows.net"` | -| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. (`appID`) value. | +| `consumerID` | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | `timeoutInSec` | N | Timeout for sending messages and for management operations. Default: `60` |`30` | `handlerTimeoutInSec`| N | Timeout for invoking the app's handler. Default: `60` | `30` | `lockRenewalInSec` | N | Defines the frequency at which buffered message locks will be renewed. Default: `20`. | `20` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-gcp-pubsub.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-gcp-pubsub.md index 592c0252e3b..638b0e6176a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-gcp-pubsub.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-gcp-pubsub.md @@ -72,7 +72,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr |--------------------|:--------:|---------|---------| | projectId | Y | GCP project id| `myproject-123` | endpoint | N | GCP endpoint for the component to use. Only used for local development (for example) with [GCP Pub/Sub Emulator](https://cloud.google.com/pubsub/docs/emulator). The `endpoint` is unnecessary when running against the GCP production API. | `"http://localhost:8085"` -| `consumerID` | N | The Consumer ID organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. The `consumerID`, along with the `topic` provided as part of the request, are used to build the Pub/Sub subscription ID | +| `consumerID` | N | The Consumer ID organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. The `consumerID`, along with the `topic` provided as part of the request, are used to build the Pub/Sub subscription ID | Can be set to string value (such as `"channel1"`) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | identityProjectId | N | If the GCP pubsub project is different from the identity project, specify the identity project using this attribute | `"myproject-123"` | privateKeyId | N | If using explicit credentials, this field should contain the `private_key_id` field from the service account json document | `"my-private-key"` | privateKey | N | If using explicit credentials, this field should contain the `private_key` field from the service account json | `-----BEGIN PRIVATE KEY-----MIIBVgIBADANBgkqhkiG9w0B` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md index d6c22d5b552..766678de5a2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md @@ -34,7 +34,7 @@ spec: |-------------------|:--------:|-----------------------------------------------------------------------------------------------------------------------------|----------------------------------------| | address | Y | Address of the KubeMQ server | `"localhost:50000"` | | store | N | type of pubsub, true: pubsub persisted (EventsStore), false: pubsub in-memory (Events) | `true` or `false` (default is `false`) | -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | clientID | N | Name for client id connection | `sub-client-12345` | | authToken | N | Auth JWT token for connection Check out [KubeMQ Authentication](https://docs.kubemq.io/learn/access-control/authentication) | `ew...` | | group | N | Subscriber group for load balancing | `g1` | diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt.md index 33d555f4561..8c4b20e2d8c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt.md @@ -41,7 +41,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | url | Y | Address of the MQTT broker. Can be `secretKeyRef` to use a secret reference.
Use the **`tcp://`** URI scheme for non-TLS communication.
Use the **`ssl://`** URI scheme for TLS communication. | `"tcp://[username][:password]@host.domain[:port]"` -| consumerID | N | The client ID used to connect to the MQTT broker for the consumer connection. Defaults to the Dapr app ID.
Note: if `producerID` is not set, `-consumer` is appended to this value for the consumer connection | `"myMqttClientApp"` +| consumerID | N | The client ID used to connect to the MQTT broker for the consumer connection. Defaults to the Dapr app ID.
Note: if `producerID` is not set, `-consumer` is appended to this value for the consumer connection | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | producerID | N | The client ID used to connect to the MQTT broker for the producer connection. Defaults to `{consumerID}-producer`. | `"myMqttProducerApp"` | qos | N | Indicates the Quality of Service Level (QoS) of the message ([more info](https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/)). Defaults to `1`. |`0`, `1`, `2` | retain | N | Defines whether the message is saved by the broker as the last known good value for a specified topic. Defaults to `"false"`. | `"true"`, `"false"` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt3.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt3.md index ae1d41b5531..bb4649a62f2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt3.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-mqtt3.md @@ -43,7 +43,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | `url` | Y | Address of the MQTT broker. Can be `secretKeyRef` to use a secret reference.
Use the **`tcp://`** URI scheme for non-TLS communication.
Use the **`ssl://`** URI scheme for TLS communication. | `"tcp://[username][:password]@host.domain[:port]"` -| `consumerID` | N | The client ID used to connect to the MQTT broker. Defaults to the Dapr app ID. | `"myMqttClientApp"` +| `consumerID` | N | The client ID used to connect to the MQTT broker. Defaults to the Dapr app ID. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | `retain` | N | Defines whether the message is saved by the broker as the last known good value for a specified topic. Defaults to `"false"`. | `"true"`, `"false"` | `cleanSession` | N | Sets the `clean_session` flag in the connection message to the MQTT broker if `"true"` ([more info](http://www.steves-internet-guide.com/mqtt-clean-sessions-example/)). Defaults to `"false"`. | `"true"`, `"false"` | `caCert` | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | See example below diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md index 5d38c0a80fd..5686211ff0a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md @@ -74,7 +74,7 @@ The above example uses secrets as plain strings. It is recommended to use a [sec | host | Y | Address of the Pulsar broker. Default is `"localhost:6650"` | `"localhost:6650"` OR `"http://pulsar-pj54qwwdpz4b-pulsar.ap-sg.public.pulsar.com:8080"`| | enableTLS | N | Enable TLS. Default: `"false"` | `"true"`, `"false"` | | tenant | N | The topic tenant within the instance. Tenants are essential to multi-tenancy in Pulsar, and spread across clusters. Default: `"public"` | `"public"` | -| consumerID | N | Used to set the subscription name or consumer ID. | `"channel1"` +| consumerID | N | Used to set the subscription name or consumer ID. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | namespace | N | The administrative unit of the topic, which acts as a grouping mechanism for related topics. Default: `"default"` | `"default"` | persistent | N | Pulsar supports two kinds of topics: [persistent](https://pulsar.apache.org/docs/en/concepts-architecture-overview#persistent-storage) and [non-persistent](https://pulsar.apache.org/docs/en/concepts-messaging/#non-persistent-topics). With persistent topics, all messages are durably persisted on disks (if the broker is not standalone, messages are durably persisted on multiple disks), whereas data for non-persistent topics is not persisted to storage disks. | disableBatching | N | disable batching.When batching enabled default batch delay is set to 10 ms and default batch size is 1000 messages,Setting `disableBatching: true` will make the producer to send messages individually. Default: `"false"` | `"true"`, `"false"`| diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md index a591397938e..34c2850375a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md @@ -31,7 +31,7 @@ spec: - name: password value: password - name: consumerID - value: myapp + value: channel1 - name: durable value: false - name: deletedWhenUnused @@ -81,7 +81,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | hostname | N* | The RabbitMQ hostname. *Mutally exclusive with connectionString field | `localhost` | | username | N* | The RabbitMQ username. *Mutally exclusive with connectionString field | `username` | | password | N* | The RabbitMQ password. *Mutally exclusive with connectionString field | `password` | -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | durable | N | Whether or not to use [durable](https://www.rabbitmq.com/queues.html#durability) queues. Defaults to `"false"` | `"true"`, `"false"` | deletedWhenUnused | N | Whether or not the queue should be configured to [auto-delete](https://www.rabbitmq.com/queues.html) Defaults to `"true"` | `"true"`, `"false"` | autoAck | N | Whether or not the queue consumer should [auto-ack](https://www.rabbitmq.com/confirms.html) messages. Defaults to `"false"` | `"true"`, `"false"` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md index b833301b2ea..6a7ee1d391e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-redis-pubsub.md @@ -25,7 +25,7 @@ spec: - name: redisPassword value: "KeFg23!" - name: consumerID - value: "myGroup" + value: "channel1" - name: enableTLS value: "false" ``` @@ -41,7 +41,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | redisHost | Y | Connection-string for the redis host. If `"redisType"` is `"cluster"` it can be multiple hosts separated by commas or just a single host | `localhost:6379`, `redis-master.default.svc.cluster.local:6379` | redisPassword | Y | Password for Redis host. No Default. Can be `secretKeyRef` to use a secret reference | `""`, `"KeFg23!"` | redisUsername | N | Username for Redis host. Defaults to empty. Make sure your redis server version is 6 or above, and have created acl rule correctly. | `""`, `"default"` -| consumerID | N | The consumer group ID | `"myGroup"` +| consumerID | N | The consumer group ID. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | enableTLS | N | If the Redis instance supports TLS with public certificates, can be configured to be enabled or disabled. Defaults to `"false"` | `"true"`, `"false"` | redeliverInterval | N | The interval between checking for pending messages to redeliver. Can use either be Go duration string (for example "ms", "s", "m") or milliseconds number. Defaults to `"60s"`. `"0"` disables redelivery. | `"30s"`, `"5000"` | processingTimeout | N | The amount time that a message must be pending before attempting to redeliver it. Can use either be Go duration string ( for example "ms", "s", "m") or milliseconds number. Defaults to `"15s"`. `"0"` disables redelivery. | `"60s"`, `"600000"` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rocketmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rocketmq.md index b0e397441d4..617b9141a7b 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rocketmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rocketmq.md @@ -26,7 +26,7 @@ spec: - name: producerGroup value: dapr-rocketmq-test-g-p - name: consumerID - value: topic + value: channel1 - name: nameSpace value: dapr-test - name: nameServer @@ -49,7 +49,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | instanceName | N | Instance name | `time.Now().String()` | `dapr-rocketmq-test` | | consumerGroup | N | Consumer group name. Recommend. If `producerGroup` is `null`,`groupName` is used. | | `dapr-rocketmq-test-g-c ` | | producerGroup (consumerID) | N | Producer group name. Recommended. If `producerGroup` is `null`,`consumerID` is used. If `consumerID` also is null, `groupName` is used. | | `dapr-rocketmq-test-g-p` | -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | groupName | N | Consumer/Producer group name. **Depreciated**. | | `dapr-rocketmq-test-g` | | nameSpace | N | RocketMQ namespace | | `dapr-rocketmq` | | nameServerDomain | N | RocketMQ name server domain | | `https://my-app.net:8080/nsaddr` | diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md index aecbc86fc14..71523347e53 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md @@ -41,7 +41,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | url | Y | Address of the AMQP broker. Can be `secretKeyRef` to use a secret reference.
Use the **`amqp://`** URI scheme for non-TLS communication.
Use the **`amqps://`** URI scheme for TLS communication. | `"amqp://host.domain[:port]"` | username | Y | The username to connect to the broker. Only required if anonymous is not specified or set to `false` .| `default` | password | Y | The password to connect to the broker. Only required if anonymous is not specified or set to `false`. | `default` -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | Can be set to string value (such as `"channel1"` in the example above) or string format value (such as `"{podName}"`, etc.). [See all of template tags you can use in your component metadata.]({{< ref "component-schema.md#templated-metadata-values" >}}) | anonymous | N | To connect to the broker without credential validation. Only works if enabled on the broker. A username and password would not be required if this is set to `true`. | `true` | caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` | clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` diff --git a/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md b/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md index 64277d89579..9232b3bbe71 100644 --- a/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md @@ -2,7 +2,7 @@ type: docs title: "Secret store component specs" linkTitle: "Secret stores" -weight: 4000 +weight: 5000 description: The supported secret stores that interface with Dapr aliases: - "/operations/components/setup-secret-store/supported-secret-stores/" diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md index c25a5139e97..e37664a83fd 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md @@ -3,7 +3,7 @@ type: docs title: "State store component specs" linkTitle: "State stores" description: "The supported state stores that interface with Dapr" -weight: 1000 +weight: 4000 aliases: - "/operations/components/setup-state-store/supported-state-stores/" no_list: true diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md index d7ee723eaa0..e33f603617f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md @@ -28,6 +28,9 @@ spec: value: - name: collection value: + # Uncomment this if you wish to use Azure Cosmos DB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -49,7 +52,7 @@ If you wish to use Cosmos DB as an actor store, append the following to the yam | masterKey | Y* | The key to authenticate to the Cosmos DB account. Only required when not using Microsoft Entra ID authentication. | `"key"` | database | Y | The name of the database | `"db"` | collection | Y | The name of the collection (container) | `"collection"` -| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ### Microsoft Entra ID authentication @@ -172,7 +175,9 @@ az cosmosdb sql role assignment create \ --role-definition-id "$ROLE_ID" ``` -## Optimizing Cosmos DB for bulk operation write performance +## Optimizations + +### Optimizing Cosmos DB for bulk operation write performance If you are building a system that only ever reads data from Cosmos DB via key (`id`), which is the default Dapr behavior when using the state management API or actors, there are ways you can optimize Cosmos DB for improved write speeds. This is done by excluding all paths from indexing. By default, Cosmos DB indexes all fields inside of a document. On systems that are write-heavy and run little-to-no queries on values within a document, this indexing policy slows down the time it takes to write or update a document in Cosmos DB. This is exacerbated in high-volume systems. @@ -208,6 +213,18 @@ This optimization comes at the cost of queries against fields inside of document {{% /alert %}} +### Optimizing Cosmos DB for cost savings + +If you intend to use Cosmos DB only as a key-value pair, it may be in your interest to consider converting your state object to JSON and compressing it before persisting it to state, and subsequently decompressing it when reading it out of state. This is because Cosmos DB bills your usage based on the maximum number of RU/s used in a given time period (typically each hour). Furthermore, RU usage is calculated as 1 RU per 1 KB of data you read or write. Compression helps by reducing the size of the data stored in Cosmos DB and subsequently reducing RU usage. + +This savings is particularly significant for Dapr actors. While the Dapr State Management API does a base64 encoding of your object before saving, Dapr actor state is saved as raw, formatted JSON. This means multiple lines with indentations for formatting. Compressing can signficantly reduce the size of actor state objects. For example, if you have an actor state object that is 75KB in size when the actor is hydrated, you will use 75 RU/s to read that object out of state. If you then modify the state object and it grows to 100KB, you will use 100 RU/s to write that object to Cosmos DB, totalling 175 RU/s for the I/O operation. Let's say your actors are concurrently handling 1000 requests per second, you will need at least 175,000 RU/s to meet that load. With effective compression, the size reduction can be in the region of 90%, which means you will only need in the region of 17,500 RU/s to meet the load. + +{{% alert title="Note" color="primary" %}} + +This particular optimization only makes sense if you are saving large objects to state. The performance and memory tradeoff for performing the compression and decompression on either end need to make sense for your use case. Furthermore, once the data is saved to state, it is not human readable, nor is it queryable. You should only adopt this optimization if you are saving large state objects as key-value pairs. + +{{% /alert %}} + ## Related links - [Basic schema for a Dapr component]({{< ref component-schema >}}) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md index a3b1781de70..32150cafe62 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md @@ -36,6 +36,9 @@ spec: value: "expiresAt" # Optional - name: partitionKey value: "ContractID" # Optional + # Uncomment this if you wish to use AWS DynamoDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -58,6 +61,7 @@ In order to use DynamoDB as a Dapr state store, the table must have a primary ke | sessionToken | N |AWS session token to use. A session token is only required if you are using temporary security credentials. | `"TOKEN"` | ttlAttributeName | N |The table attribute name which should be used for TTL. | `"expiresAt"` | partitionKey | N |The table primary key or partition key attribute name. This field is used to replace the default primary key attribute name `"key"`. See the section [Partition Keys]({{< ref "setup-dynamodb.md#partition-keys" >}}). | `"ContractID"` +| actorStateStore | N | Consider this state store for actors. Defaults to "false" | `"true"`, `"false"` {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index 63ee61ac2d0..6b40c5241d2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -34,6 +34,9 @@ spec: value: # Optional. Required if tlsEnable is `true`. - name: key value: # Optional. Required if tlsEnable is `true`. + # Uncomment this if you wish to use Etcd as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -59,6 +62,7 @@ If you are using `v1`, you should continue to use `v1` until you create a new Et | `ca` | N | CA certificate for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN CERTIFICATE-----\nMIIC9TCCA..."` | `cert` | N | TLS certificate for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN CERTIFICATE-----\nMIIDUTCC..."` | `key` | N | TLS key for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN PRIVATE KEY-----\nMIIEpAIB..."` +| `actorStateStore` | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup Etcd diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md index 17d8cc4be3e..50d20f5000e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md @@ -21,7 +21,10 @@ metadata: spec: type: state.in-memory version: v1 - metadata: [] + metadata: + # Uncomment this if you wish to use In-memory as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` > Note: While in-memory does not require any specific metadata for the component to work, `spec.metadata` is a required field. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md index db3fec2ed77..11b9d5a479a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md @@ -41,6 +41,10 @@ spec: value: # Optional. default: "5s" - name: params value: # Optional. Example: "?authSource=daprStore&ssl=true" + # Uncomment this if you wish to use MongoDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" + ``` {{% alert title="Warning" color="warning" %}} @@ -72,6 +76,7 @@ If you wish to use MongoDB as an actor store, add this metadata option to your C | readConcern | N | The read concern to use | `"majority"`, `"local"`,`"available"`, `"linearizable"`, `"snapshot"` | operationTimeout | N | The timeout for the operation. Defaults to `"5s"` | `"5s"` | params | N2 | Additional parameters to use | `"?authSource=daprStore&ssl=true"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` > [1] The `server` and `host` fields are mutually exclusive. If neither or both are set, Dapr returns an error. @@ -85,7 +90,7 @@ If you wish to use MongoDB as an actor store, add this metadata option to your C You can run a single MongoDB instance locally using Docker: ```sh -docker run --name some-mongo -d mongo +docker run --name some-mongo -d -p 27017:27017 mongo ``` You can then interact with the server at `localhost:27017`. If you do not specify a `databaseName` value in your component definition, make sure to create a database named `daprStore`. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md index 65000b4d142..29867aa1e98 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md @@ -35,6 +35,9 @@ spec: value: "" - name: pemContents # Required if pemPath not provided. Pem value. value: "" +# Uncomment this if you wish to use MySQL & MariaDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -59,6 +62,7 @@ If you wish to use MySQL as an actor store, append the following to the yaml. | `pemPath` | N | Full path to the PEM file to use for [enforced SSL Connection](#enforced-ssl-connection) required if pemContents is not provided. Cannot be used in K8s environment | `"/path/to/file.pem"`, `"C:\path\to\file.pem"` | | `pemContents` | N | Contents of PEM file to use for [enforced SSL Connection](#enforced-ssl-connection) required if pemPath is not provided. Can be used in K8s environment | `"pem value"` | | `cleanupIntervalInSeconds` | N | Interval, in seconds, to clean up rows with an expired TTL. Default: `3600` (that is 1 hour). Setting this to values <=0 disables the periodic cleanup. | `1800`, `-1` +| `actorStateStore` | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup MySQL diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md index b023a2ef75d..51cf0a02066 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md @@ -28,6 +28,9 @@ spec: value: "" # Optional, no default - name: tableName value: "" # Optional, defaults to STATE + # Uncomment this if you wish to use Oracle Database as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). @@ -40,6 +43,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | connectionString | Y | The connection string for Oracle Database | `"oracle://user/password@host:port/servicename"` for example `"oracle://demo:demo@localhost:1521/xe"` or for Autonomous Database `"oracle://states_schema:State12345pw@adb.us-ashburn-1.oraclecloud.com:1522/k8j2agsqjsw_daprdb_low.adb.oraclecloud.com"` | oracleWalletLocation | N | Location of the contents of an Oracle Wallet file (required to connect to Autonomous Database on OCI)| `"/home/app/state/Wallet_daprDB/"` | tableName | N | Name of the database table in which this instance of the state store records the data default `"STATE"`| `"MY_APP_STATE_STORE"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## What Happens at Runtime? When the state store component initializes, it connects to the Oracle Database and checks if a table with the name specified with `tableName` exists. If it does not, it creates this table (with columns Key, Value, Binary_YN, ETag, Creation_Time, Update_Time, Expiration_time). diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md index 366bbde0d44..61d5de0f3fb 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md @@ -74,6 +74,9 @@ spec: value: # Optional - name: queryIndexes value: # Optional + # Uncomment this if you wish to use Redis as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -116,9 +119,9 @@ If you wish to use Redis as an actor store, append the following to the yaml. | minIdleConns | N | Minimum number of idle connections to keep open in order to avoid the performance degradation associated with creating new connections. Defaults to `"0"`. | `"2"` | idleCheckFrequency | N | Frequency of idle checks made by idle connections reaper. Default is `"1m"`. `"-1"` disables idle connections reaper. | `"-1"` | idleTimeout | N | Amount of time after which the client closes idle connections. Should be less than server's timeout. Default is `"5m"`. `"-1"` disables idle timeout check. | `"10m"` -| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` | ttlInSeconds | N | Allows specifying a default Time-to-live (TTL) in seconds that will be applied to every state store request unless TTL is explicitly defined via the [request metadata]({{< ref "state-store-ttl.md" >}}). | `600` | queryIndexes | N | Indexing schemas for querying JSON objects | see [Querying JSON objects](#querying-json-objects) +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup Redis diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md index 96d79ac9d64..23b9a10750b 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md @@ -52,6 +52,9 @@ spec: value: "" - name: cleanupIntervalInSeconds value: "3600" + # Uncomment this if you wish to use Microsoft SQL Server as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} diff --git a/daprdocs/content/en/reference/components-reference/supported-workflow-backend/_index.md b/daprdocs/content/en/reference/components-reference/supported-workflow-backend/_index.md index f32f37c87bb..43838d711e2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-workflow-backend/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-workflow-backend/_index.md @@ -2,7 +2,7 @@ type: docs title: "Workflow backend component specs" linkTitle: "Workflow backend" -weight: 9000 +weight: 2000 description: The supported workflow backend that orchestrate workflow and save workflow state no_list: true --- diff --git a/daprdocs/layouts/shortcodes/dapr-latest-version.html b/daprdocs/layouts/shortcodes/dapr-latest-version.html index 108b35c0726..6aa8e1f8137 100644 --- a/daprdocs/layouts/shortcodes/dapr-latest-version.html +++ b/daprdocs/layouts/shortcodes/dapr-latest-version.html @@ -1 +1 @@ -{{- if .Get "short" }}1.13{{ else if .Get "long" }}1.13.0{{ else if .Get "cli" }}1.13.0{{ else }}1.13.0{{ end -}} \ No newline at end of file +{{- if .Get "short" }}1.13{{ else if .Get "long" }}1.13.4{{ else if .Get "cli" }}1.13.4{{ else }}1.13.4{{ end -}} \ No newline at end of file diff --git a/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml b/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml index 4a1e7aae393..3b26889539d 100644 --- a/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml +++ b/daprdocs/static/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml @@ -17,8 +17,8 @@ data: zpages: endpoint: :55679 exporters: - logging: - loglevel: debug + debug: + verbosity: basic azuremonitor: endpoint: "https://dc.services.visualstudio.com/v2/track" instrumentation_key: "" @@ -33,7 +33,7 @@ data: pipelines: traces: receivers: [zipkin] - exporters: [azuremonitor,logging] + exporters: [azuremonitor,debug] --- apiVersion: v1 kind: Service @@ -71,7 +71,7 @@ spec: spec: containers: - name: otel-collector - image: otel/opentelemetry-collector-contrib:0.77.0 + image: otel/opentelemetry-collector-contrib:0.101.0 command: - "/otelcol-contrib" - "--config=/conf/otel-collector-config.yaml" diff --git a/daprdocs/static/images/building_blocks.png b/daprdocs/static/images/building_blocks.png index a6205cae5a1..3665b6daca9 100644 Binary files a/daprdocs/static/images/building_blocks.png and b/daprdocs/static/images/building_blocks.png differ diff --git a/daprdocs/static/images/buildingblocks-overview.png b/daprdocs/static/images/buildingblocks-overview.png index c87e3a366a6..0f889678032 100644 Binary files a/daprdocs/static/images/buildingblocks-overview.png and b/daprdocs/static/images/buildingblocks-overview.png differ diff --git a/daprdocs/static/images/overview.png b/daprdocs/static/images/overview.png index 7888f6a5e2e..fcb57c72f1e 100644 Binary files a/daprdocs/static/images/overview.png and b/daprdocs/static/images/overview.png differ diff --git a/daprdocs/static/presentations/dapr-slidedeck.pptx.zip b/daprdocs/static/presentations/dapr-slidedeck.pptx.zip index 27df424b293..5869ced2e5f 100644 Binary files a/daprdocs/static/presentations/dapr-slidedeck.pptx.zip and b/daprdocs/static/presentations/dapr-slidedeck.pptx.zip differ