mirror of https://github.com/dapr/docs.git
Create setup-pulsar.md (#601)
* Create setup-pulsar.md * Update setup-pulsar.md Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com> Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
This commit is contained in:
parent
76d6b0779d
commit
8d48be94a7
|
@ -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: <NAME>
|
||||
namespace: <NAMESPACE>
|
||||
spec:
|
||||
type: pubsub.pulsar
|
||||
metadata:
|
||||
- name: host
|
||||
value: <REPLACE WITH PULSAR URL> #default is localhost:6650
|
||||
- name: enableTLS
|
||||
value: <TRUE/FALSE>
|
||||
|
||||
```
|
||||
|
||||
## 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.
|
Loading…
Reference in New Issue