mirror of https://github.com/dapr/docs.git
Merge branch 'v1.8' into v1.8
This commit is contained in:
commit
bfea6bd295
|
@ -51,10 +51,11 @@ powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master
|
||||||
|
|
||||||
#### Install without administrative rights
|
#### Install without administrative rights
|
||||||
|
|
||||||
If you do not have admin rights, you can install Dapr to an alternate directory via the `DAPR_INSTALL_DIR` environment variable.
|
If you do not have admin rights, you can install Dapr to an alternate directory via the `DAPR_INSTALL_DIR` environment variable. The script below creates the directory if it does not exist.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
$script=iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1; $block=[ScriptBlock]::Create($script); invoke-command -ScriptBlock $block -ArgumentList "", "$HOME/dapr"
|
$Env:DAPR_INSTALL_DIR = "<your_alt_install_dir_path>"
|
||||||
|
$script=iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1; $block=[ScriptBlock]::Create($script); invoke-command -ScriptBlock $block -ArgumentList "", "$Env:DAPR_INSTALL_DIR"
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% /codetab %}}
|
{{% /codetab %}}
|
||||||
|
|
|
@ -30,3 +30,4 @@ Hit the ground running with our Dapr quickstarts, complete with code samples aim
|
||||||
| Actors | Coming soon. |
|
| Actors | Coming soon. |
|
||||||
| Observability | Coming soon. |
|
| Observability | Coming soon. |
|
||||||
| Configuration | Coming soon. |
|
| Configuration | Coming soon. |
|
||||||
|
| Distributed Lock | Coming soon. |
|
||||||
|
|
|
@ -64,7 +64,9 @@ For Kubernetes:
|
||||||
{{% /codetab %}}
|
{{% /codetab %}}
|
||||||
|
|
||||||
{{% codetab %}}
|
{{% codetab %}}
|
||||||
|
<!-- IGNORE_LINKS -->
|
||||||
Verify you have an [Azure subscription](https://azure.microsoft.com/free/).
|
Verify you have an [Azure subscription](https://azure.microsoft.com/free/).
|
||||||
|
<!-- END_IGNORE -->
|
||||||
|
|
||||||
1. Open and log into the [Azure portal](https://ms.portal.azure.com/#create/Microsoft.Cache) to start the Azure Redis Cache creation flow.
|
1. Open and log into the [Azure portal](https://ms.portal.azure.com/#create/Microsoft.Cache) to start the Azure Redis Cache creation flow.
|
||||||
1. Fill out the necessary information.
|
1. Fill out the necessary information.
|
||||||
|
|
|
@ -10,12 +10,11 @@ Dapr has a metadata API that returns information about the sidecar allowing runt
|
||||||
|
|
||||||
## Components
|
## Components
|
||||||
Each loaded component provides its name, type and version and also information about supported features in the form of component capabilities.
|
Each loaded component provides its name, type and version and also information about supported features in the form of component capabilities.
|
||||||
These features are available for the [state store]({{< ref supported-state-stores.md >}}), [pub/sub]({{< ref supported-pubsub.md >}}) and [binding]({{< ref supported-bindings.md >}}) component types. The table below shows the component type and the list of capabilities for a given version. This list might grow in future and only represents the capabilities of the loaded components.
|
These features are available for the [state store]({{< ref supported-state-stores.md >}}) and [binding]({{< ref supported-bindings.md >}}) component types. The table below shows the component type and the list of capabilities for a given version. This list might grow in future and only represents the capabilities of the loaded components.
|
||||||
|
|
||||||
Component type | Capabilites
|
Component type | Capabilites
|
||||||
---------------| ------------
|
---------------| ------------
|
||||||
State Store | ETAG, TRANSACTION, ACTOR, QUERY_API
|
State Store | ETAG, TRANSACTION, ACTOR, QUERY_API
|
||||||
Pub/Sub | TTL
|
|
||||||
Binding | INPUT_BINDING, OUTPUT_BINDING
|
Binding | INPUT_BINDING, OUTPUT_BINDING
|
||||||
|
|
||||||
## Attributes
|
## Attributes
|
||||||
|
|
|
@ -28,7 +28,7 @@ spec:
|
||||||
- name: retain
|
- name: retain
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: cleanSession
|
- name: cleanSession
|
||||||
value: "true"
|
value: "false"
|
||||||
- name: backOffMaxRetries
|
- name: backOffMaxRetries
|
||||||
value: "0"
|
value: "0"
|
||||||
```
|
```
|
||||||
|
@ -43,9 +43,9 @@ The above example uses secrets as plain strings. It is recommended to use a secr
|
||||||
|--------------------|:--------:|---------|---------|
|
|--------------------|:--------:|---------|---------|
|
||||||
| url | Y | Address of the MQTT broker. Can be `secretKeyRef` to use a secret reference. <br> Use the **`tcp://`** URI scheme for non-TLS communication. <br> Use the **`ssl://`** URI scheme for TLS communication. | `"tcp://[username][:password]@host.domain[:port]"`
|
| url | Y | Address of the MQTT broker. Can be `secretKeyRef` to use a secret reference. <br> Use the **`tcp://`** URI scheme for non-TLS communication. <br> 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. | `"myMqttClientApp"`
|
||||||
| qos | N | Indicates the Quality of Service Level (QoS) of the message. Defaults to `0`. |`1`
|
| 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"`
|
| 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"`. Defaults to `"true"`. | `"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. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
|
| caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
|
||||||
| clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
|
| clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n<base64-encoded DER>\n-----END CERTIFICATE-----"`
|
||||||
| clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n<base64-encoded PKCS8>\n-----END RSA PRIVATE KEY-----"`
|
| clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n<base64-encoded PKCS8>\n-----END RSA PRIVATE KEY-----"`
|
||||||
|
@ -112,7 +112,7 @@ spec:
|
||||||
- name: retain
|
- name: retain
|
||||||
value: "false"
|
value: "false"
|
||||||
- name: cleanSession
|
- name: cleanSession
|
||||||
value: "false"
|
value: "true"
|
||||||
- name: backoffMaxRetries
|
- name: backoffMaxRetries
|
||||||
value: "0"
|
value: "0"
|
||||||
```
|
```
|
||||||
|
@ -121,6 +121,8 @@ spec:
|
||||||
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 >}}).
|
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 >}}).
|
||||||
{{% /alert %}}
|
{{% /alert %}}
|
||||||
|
|
||||||
|
Note that in the case, the value of the consumer ID is random every time Dapr restarts, so we are setting `cleanSession` to true as well.
|
||||||
|
|
||||||
## Create a MQTT broker
|
## Create a MQTT broker
|
||||||
|
|
||||||
{{< tabs "Self-Hosted" "Kubernetes">}}
|
{{< tabs "Self-Hosted" "Kubernetes">}}
|
||||||
|
@ -129,7 +131,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
|
||||||
You can run a MQTT broker [locally using Docker](https://hub.docker.com/_/eclipse-mosquitto):
|
You can run a MQTT broker [locally using Docker](https://hub.docker.com/_/eclipse-mosquitto):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d -p 1883:1883 -p 9001:9001 --name mqtt eclipse-mosquitto:1.6.9
|
docker run -d -p 1883:1883 -p 9001:9001 --name mqtt eclipse-mosquitto:1.6
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then interact with the server using the client port: `mqtt://localhost:1883`
|
You can then interact with the server using the client port: `mqtt://localhost:1883`
|
||||||
|
@ -157,7 +159,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: mqtt
|
- name: mqtt
|
||||||
image: eclipse-mosquitto:1.6.9
|
image: eclipse-mosquitto:1.6
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: default
|
- name: default
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
type: docs
|
||||||
|
title: "In Memory"
|
||||||
|
linkTitle: "In Memory"
|
||||||
|
description: "Detailed documentation on the In Memory state component"
|
||||||
|
aliases:
|
||||||
|
- "/operations/components/setup-state-store/supported-state-stores/setup-inmemory/"
|
||||||
|
---
|
||||||
|
|
||||||
|
The In Memory state store component is useful for development purposes and works inside of a single machine boundary.
|
||||||
|
|
||||||
|
{{% alert title="Warning" color="warning" %}}
|
||||||
|
This component **shouldn't be used for production**. It is developer only and will never be stable. If you come across a scenario and want to use it in production, you can submit an issue and discuss it with the community.
|
||||||
|
|
||||||
|
{{% /alert %}}
|
||||||
|
|
||||||
|
## Component format
|
||||||
|
To setup in-memory state store, create a component of type `state.in-memory`. See [this guide]({{< ref "howto-get-save-state.md#step-1-setup-a-state-store" >}}) on how to create and apply a state store configuration.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: dapr.io/v1alpha1
|
||||||
|
kind: Component
|
||||||
|
metadata:
|
||||||
|
name: <NAME>
|
||||||
|
namespace: <NAMESPACE>
|
||||||
|
spec:
|
||||||
|
type: state.in-memory
|
||||||
|
version: v1
|
||||||
|
metadata: []
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: While in-memory does not require any specific metadata for the component to work, `spec.metadata` is a required field.
|
||||||
|
|
||||||
|
## Related links
|
||||||
|
- [Basic schema for a Dapr component]({{< ref component-schema >}})
|
||||||
|
- Learn [how to create and configure state store components]({{< ref howto-get-save-state.md >}})
|
||||||
|
- Read more about the [state management building block]({{< ref state-management >}})
|
|
@ -64,6 +64,17 @@
|
||||||
etag: false
|
etag: false
|
||||||
ttl: false
|
ttl: false
|
||||||
query: false
|
query: false
|
||||||
|
- component: In Memory
|
||||||
|
link: setup-inmemory
|
||||||
|
state: Developer-only
|
||||||
|
version: v1
|
||||||
|
since: "1.8"
|
||||||
|
features:
|
||||||
|
crud: true
|
||||||
|
transactions: true
|
||||||
|
etag: true
|
||||||
|
ttl: true
|
||||||
|
query: false
|
||||||
- component: JetStream KV
|
- component: JetStream KV
|
||||||
link: setup-jetstream-kv
|
link: setup-jetstream-kv
|
||||||
state: Alpha
|
state: Alpha
|
||||||
|
|
Loading…
Reference in New Issue