github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/pulsar/scripts/init-bookies.sh (about) 1 #!/bin/bash 2 echo "waiting zookeeper ready..." 3 zkDomain="${zkServers%%:*}" 4 until echo ruok | nc -q 1 ${zkDomain} 2181 | grep imok; do 5 sleep 1; 6 done; 7 echo "zk is ready, start to config bookkeeper..." 8 python3 /kb-scripts/merge_pulsar_config.py conf/bookkeeper.conf /opt/pulsar/conf/bookkeeper.conf; 9 bin/apply-config-from-env.py conf/bookkeeper.conf; 10 if bin/bookkeeper shell whatisinstanceid; then 11 echo "bookkeeper cluster already initialized"; 12 else 13 echo "bookkeeper init new cluster." 14 bin/bookkeeper shell initnewcluster; 15 fi