From 089814c38c18f0cf4c2a5a294205a2b433e119b3 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Thu, 19 Jan 2023 18:21:10 -0600 Subject: [PATCH 01/10] Adding Solace PubSub Component Docs Signed-off-by: TKTheTechie --- .../supported-pubsub/setup-solace-amqp.md | 108 ++++++++++++++++++ daprdocs/data/components/pubsub/generic.yaml | 5 + 2 files changed, 113 insertions(+) create mode 100644 daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md 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 new file mode 100644 index 000000000..13c9fd1e9 --- /dev/null +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md @@ -0,0 +1,108 @@ +--- +type: docs +title: "Solace-AMQP" +linkTitle: "Solace-AMQP" +description: "Detailed documentation on the Solace-AMQP pubsub component" +aliases: + - "/operations/components/setup-pubsub/supported-pubsub/setup-solace-amqp/" +--- + +## Component format + +To setup Solace-AMQP pubsub create a component of type `pubsub.solace.amqp`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pubsub configuration + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: solace +spec: + type: pubsub.solace.amqp + version: v1 + metadata: + - name: url + value: 'amqp://localhost:5672' + - name: username + value: 'default' + - name: password + value: 'default' +``` + +{{% 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 >}}). +{{% /alert %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| 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 user name to connect to the broker with. Only required if anonymous is not specified or set to false | default +| password | Y | The password to connect to the broker with. Only required if anonymous is not specified or set to false. | default +| 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-----"` +| 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\n-----END RSA PRIVATE KEY-----"` + +### Communication using TLS + +To configure communication using TLS, ensure that the Solace broker is configured to support certificates and provide the `caCert`, `clientCert`, `clientKey` metadata in the component configuration. For example: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: solace +spec: + type: pubsub.solace.amqp + version: v1 + metadata: + - name: url + value: "amqps://host.domain[:port]" + - name: username + value: 'default' + - name: password + value: 'default' + - name: caCert + value: ${{ myLoadedCACert }} + - name: clientCert + value: ${{ myLoadedClientCert }} + - name: clientKey + secretKeyRef: + name: mySolaceClientKey + key: mySolaceClientKey +auth: + secretStore: +``` + +Note that while the `caCert` and `clientCert` values may not be secrets, they can be referenced from a Dapr secret store as well for convenience. + +### Publishing/subscribing to topics and queues + +By default, messages are published and subscribed over topics. If you would like your destination to be a queue - prefix the topic with `queue:` and the Solace AMQP component will connect to a queue. + +## Create a Solace broker + +{{< tabs "Self-Hosted" "SaaS">}} + +{{% codetab %}} +You can run a Solace broker [locally using Docker](https://hub.docker.com/r/solace/solace-pubsub-standard): + +```bash +docker run -d -p 8080:8080 -p 55554:55555 -p 8008:8008 -p 1883:1883 -p 8000:8000 -p 5672:5672 -p 9000:9000 -p 2222:2222 --shm-size=2g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --name=solace solace/solace-pubsub-standard +``` + +You can then interact with the server using the client port: `mqtt://localhost:5672` +{{% /codetab %}} + +{{% codetab %}} +You can also sign up for a free SaaS broker on [Solace Cloud](https://console.solace.cloud/login/new-account?product=event-streaming) +{{% /codetab %}} + +{{< /tabs >}} + +## Related links + +- [Basic schema for a Dapr component]({{< ref component-schema >}}) +- Read [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components +- [Pub/Sub building block]({{< ref pubsub >}}) \ No newline at end of file diff --git a/daprdocs/data/components/pubsub/generic.yaml b/daprdocs/data/components/pubsub/generic.yaml index 58fde998f..b844b3fdc 100644 --- a/daprdocs/data/components/pubsub/generic.yaml +++ b/daprdocs/data/components/pubsub/generic.yaml @@ -48,3 +48,8 @@ state: Alpha version: v1 since: "1.8" +- component: Solace-AMQP + link: setup-solace-amqp + state: Alpha + version: v1 + since: "1.10" From d6ce7c1d621dbe222d6a69212fcb45bc487583a1 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:47:07 -0500 Subject: [PATCH 02/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 13c9fd1e9..a3d0e955c 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 @@ -9,7 +9,7 @@ aliases: ## Component format -To setup Solace-AMQP pubsub create a component of type `pubsub.solace.amqp`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pubsub configuration +To setup Solace-AMQP pub/sub, create a component of type `pubsub.solace.amqp`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration. ```yaml apiVersion: dapr.io/v1alpha1 From e33e454b5f2e348d7e4482dfbd872f9d4acee202 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:47:32 -0500 Subject: [PATCH 03/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a3d0e955c..b6ebf90e1 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 @@ -37,7 +37,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 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 user name to connect to the broker with. Only required if anonymous is not specified or set to false | default +| 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 with. Only required if anonymous is not specified or set to false. | default | 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-----"` From 3faa75e0c771904e3b4b70618ff3bb844e12781a Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:47:45 -0500 Subject: [PATCH 04/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b6ebf90e1..ed682e6cc 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 @@ -38,7 +38,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 with. 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` | 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-----"` From 83fd12d803997173b79e579efa92ecc586d4aa71 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:47:53 -0500 Subject: [PATCH 05/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ed682e6cc..f6601bc27 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 @@ -39,7 +39,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` -| 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 +| 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-----"` | 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\n-----END RSA PRIVATE KEY-----"` From 17e5e5017aa933c5e832ffc1feefb55e3f4e9cb2 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:48:10 -0500 Subject: [PATCH 06/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../supported-pubsub/setup-solace-amqp.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 f6601bc27..c923d675e 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 @@ -46,7 +46,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr ### Communication using TLS -To configure communication using TLS, ensure that the Solace broker is configured to support certificates and provide the `caCert`, `clientCert`, `clientKey` metadata in the component configuration. For example: +To configure communication using TLS: + +1. Ensure that the Solace broker is configured to support certificates. +1. Provide the `caCert`, `clientCert`, and `clientKey` metadata in the component configuration. + +For example: ```yaml apiVersion: dapr.io/v1alpha1 From 1f25aa03dc579f168eece99bb2d2ab2400c7d294 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:48:18 -0500 Subject: [PATCH 07/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c923d675e..54263693e 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 @@ -84,7 +84,7 @@ Note that while the `caCert` and `clientCert` values may not be secrets, they ca ### Publishing/subscribing to topics and queues -By default, messages are published and subscribed over topics. If you would like your destination to be a queue - prefix the topic with `queue:` and the Solace AMQP component will connect to a queue. +By default, messages are published and subscribed over topics. If you would like your destination to be a queue, prefix the topic with `queue:` and the Solace AMQP component will connect to a queue. ## Create a Solace broker From 874a6651735e3119429bfe366f13755936f8e28d Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:48:29 -0500 Subject: [PATCH 08/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 54263693e..38411258f 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 @@ -80,7 +80,7 @@ auth: secretStore: ``` -Note that while the `caCert` and `clientCert` values may not be secrets, they can be referenced from a Dapr secret store as well for convenience. +> While the `caCert` and `clientCert` values may not be secrets, they can be referenced from a Dapr secret store as well for convenience. ### Publishing/subscribing to topics and queues From d0492583f632343b697d4fa9b7dd3519e4340581 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:48:36 -0500 Subject: [PATCH 09/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 38411258f..58ae4e5db 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 @@ -101,7 +101,7 @@ You can then interact with the server using the client port: `mqtt://localhost:5 {{% /codetab %}} {{% codetab %}} -You can also sign up for a free SaaS broker on [Solace Cloud](https://console.solace.cloud/login/new-account?product=event-streaming) +You can also sign up for a free SaaS broker on [Solace Cloud](https://console.solace.cloud/login/new-account?product=event-streaming). {{% /codetab %}} {{< /tabs >}} From 5ef2b250f48c391bd4c9a320caca00669034d3e1 Mon Sep 17 00:00:00 2001 From: TKTheTechie Date: Tue, 24 Jan 2023 13:48:47 -0500 Subject: [PATCH 10/10] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-solace-amqp.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: TKTheTechie --- .../components-reference/supported-pubsub/setup-solace-amqp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 58ae4e5db..6bfe09f49 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 @@ -110,4 +110,4 @@ You can also sign up for a free SaaS broker on [Solace Cloud](https://console.so - [Basic schema for a Dapr component]({{< ref component-schema >}}) - Read [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components -- [Pub/Sub building block]({{< ref pubsub >}}) \ No newline at end of file +- [Pub/sub building block]({{< ref pubsub >}}) \ No newline at end of file