From 8d48be94a78ae9e37e06ef26e66397901ada6069 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 4 Jun 2020 23:34:50 +0200 Subject: [PATCH] Create setup-pulsar.md (#601) * Create setup-pulsar.md * Update setup-pulsar.md Co-authored-by: Aman Bhardwaj Co-authored-by: Yaron Schneider --- .../setup-pulsar.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 howto/setup-pub-sub-message-broker/setup-pulsar.md diff --git a/howto/setup-pub-sub-message-broker/setup-pulsar.md b/howto/setup-pub-sub-message-broker/setup-pulsar.md new file mode 100644 index 000000000..d1d3b896d --- /dev/null +++ b/howto/setup-pub-sub-message-broker/setup-pulsar.md @@ -0,0 +1,48 @@ +# Setup-Pulsar + +## Locally +``` +docker run -it \ + -p 6650:6650 \ + -p 8080:8080 \ + --mount source=pulsardata,target=/pulsar/data \ + --mount source=pulsarconf,target=/pulsar/conf \ + apachepulsar/pulsar:2.5.1 \ + bin/pulsar standalone + +``` + +## Kubernetes + +Please refer to the following [Helm chart](https://pulsar.apache.org/docs/en/kubernetes-helm/) Documentation. + +## Create a Dapr component + +The next step is to create a Dapr component for Pulsar. + +Create the following YAML file named pulsar.yaml: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: + namespace: +spec: + type: pubsub.pulsar + metadata: + - name: host + value: #default is localhost:6650 + - name: enableTLS + value: + +``` + +## Apply the configuration + +To apply the Pulsar pub/sub to Kubernetes, use the kubectl CLI: + +`` kubectl apply -f pulsar.yaml `` + +### Running locally ### +The Dapr CLI will automatically create a directory named components in your current working directory with a Redis component. To use Pulsar, replace the pubsub.yaml (or messagebus.yaml for Dapr < 0.6.0) file with the pulsar.yaml above.