2. Image
docker pull apachepulsar/pulsar:3.1.0 && \
docker tag apachepulsar/pulsar:3.1.0 pulsar:3.1.0 && \
docker save -o ./pulsar3.1.0.tar pulsar:3.1.0 && \
docker load < ./pulsar3.1.0.tar
docker pull apachepulsar/pulsar-manager:v0.4.0 && \
docker tag apachepulsar/pulsar-manager:v0.4.0 pulsar-manager:0.4.0 && \
docker save -o ./pulsar-manager0.4.0.tar pulsar-manager:0.4.0 && \
docker load < ./pulsar-manager0.4.0.tar
3. Pulsar
docker run \
--name pulsar \
-p 6650:6650 -p 8080:8080 \
--privileged=true \
--mount source=pulsardata,target=/pulsar/data \
--mount source=pulsarconf,target=/pulsar/conf \
-itd pulsar:3.1.0 bin/pulsar standalone
-
pulsar://192.168.0.123:6650
http://192.168.0.123:8080
4. Pulsar Manager
-
https://github.com/apache/pulsar-manager/blob/master
/src/main/resources/META-INF/sql/mysql-schema.sql -
https://github.com/apache/pulsar-manager/blob/master
/src/main/resources/application.properties
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:postgresql://192.168.0.123:3306/pulsar_manager
spring.datasource.username=root
spring.datasource.password=cipher
docker run \
--name pulsar-manager \
-p 9527:9527 -p 7750:7750 \
--privileged=true \
-v /elf/pulsar-manager/application.properties:/pulsar-manager/pulsar-manager/application.properties \
-e SPRING_CONFIGURATION_FILE=/pulsar-manager/pulsar-manager/application.properties \
-itd pulsar-manager:0.4.0
CSRF_TOKEN=$(curl http://192.168.0.123:7750/pulsar-manager/csrf-token)
curl \
-H 'X-XSRF-TOKEN: $CSRF_TOKEN' \
-H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \
-H "Content-Type: application/json" \
-X PUT http://192.168.0.123:7750/pulsar-manager/users/superuser \
-d '{"name": "admin", "password": "pulsar", "description": "memo", "email": "ns975@126.com"}'
-
http://192.168.0.123:9527
admin - pulsar