diff --git a/tools/pulsar/docker/README.adoc b/tools/pulsar/docker/README.adoc index 0b444dd5..76f489f7 100644 --- a/tools/pulsar/docker/README.adoc +++ b/tools/pulsar/docker/README.adoc @@ -15,13 +15,6 @@ To start the cluster run the following script from project root dir: ./tools/pulsar/docker/standalone/pulsar-start.sh ---- -===== Mac M1 (Arm64) -If you are running on Mac M1 (ARM64) and have issues running the above image, try running the following script from project root dir: -[source,shell] ----- -./tools/pulsar/docker/standalone/pulsar-start-arm64.sh ----- - ==== Stop To stop the cluster run the following script from project root dir: [source,shell] @@ -36,4 +29,18 @@ To completely remove the cluster and volumes run the following script from proje ./tools/pulsar/docker/standalone/pulsar-destroy.sh ---- +==== Mac M1 (Arm64) +If you are running on Mac M1 (ARM64) and have issues running the above commands, +instead use the scripts with the `-arm64` suffix. There is one for each command. + +* `./tools/pulsar/docker/standalone/pulsar-start-arm64.sh` +* `./tools/pulsar/docker/standalone/pulsar-stop-arm64.sh` +* `./tools/pulsar/docker/standalone/pulsar-kill-arm64.sh` + +Also note that the two docker volumes used in this case are also suffixed accordingly: + +* `pulsardata-arm64` +* `pulsarconf-arm64` + +''' More information can be found in the official https://pulsar.apache.org/docs/next/getting-started-docker[Pulsar docs]. diff --git a/tools/pulsar/docker/standalone/pulsar-destroy-arm64.sh b/tools/pulsar/docker/standalone/pulsar-destroy-arm64.sh new file mode 100755 index 00000000..f5abf401 --- /dev/null +++ b/tools/pulsar/docker/standalone/pulsar-destroy-arm64.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Finding and removing Pulsar container..." +docker ps -a | grep "kezhenxu94/pulsar" | awk '{print $1}' | xargs docker rm -f +echo "Removing Pulsar volumes..." +docker volume rm pulsardata-arm64 pulsarconf-arm64 +echo "All traces of Pulsar standalone removed" diff --git a/tools/pulsar/docker/standalone/pulsar-start-arm64.sh b/tools/pulsar/docker/standalone/pulsar-start-arm64.sh index 289a9cc6..ffc0da7d 100755 --- a/tools/pulsar/docker/standalone/pulsar-start-arm64.sh +++ b/tools/pulsar/docker/standalone/pulsar-start-arm64.sh @@ -1,7 +1,7 @@ #!/bin/bash docker run -it -p 6650:6650 -p 8080:8080 \ - --mount source=pulsardata,target=/pulsar/data \ - --mount source=pulsarconf,target=/pulsar/conf \ + --mount source=pulsardata-arm64,target=/pulsar/data \ + --mount source=pulsarconf-arm64,target=/pulsar/conf \ kezhenxu94/pulsar:latest \ bin/pulsar standalone diff --git a/tools/pulsar/docker/standalone/pulsar-stop-arm64.sh b/tools/pulsar/docker/standalone/pulsar-stop-arm64.sh new file mode 100755 index 00000000..8d2fbb92 --- /dev/null +++ b/tools/pulsar/docker/standalone/pulsar-stop-arm64.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "Finding and stopping Pulsar container..." +docker ps -a | grep "kezhenxu94/pulsar" | awk '{print $1}' | xargs docker stop +echo "Container stopped - you can run 'pulsar-start-arm64.sh' when/if you want to restart it"