k8s初始版本storm

This commit is contained in:
lixikang
2020-05-25 16:48:37 +08:00
parent 0d1396f415
commit fc431fa3bd
53 changed files with 2660 additions and 0 deletions

13
zk-kafka/host.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
HOSTNAME=`hostname -s`
if [[ $HOSTNAME =~ (.*)-([0-9]+)$ ]]; then
ORD=${BASH_REMATCH[2]}
PORT=$((ORD + 9092))
#12.345.67.8 是 LB 的 ip
export KAFKA_CFG_ADVERTISED_LISTENERS="PLAINTEXT://192.168.40.127:$PORT"
else
echo "Failed to get index from hostname $HOST"
exit 1
fi
echo $KAFKA_CFG_ADVERTISED_LISTENERS