Former-commit-id: 81dea9a1cd5cfb99d40336e9b81df671966d8c4b Former-commit-id: 6fd449d1c0f14a9657d5c87dd5f97ce36c19253d1.0
parent
fc7fe236f0
commit
f24b712ab7
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
echo "Launching Kafka Connect worker"
|
||||
/etc/confluent/docker/run &
|
||||
#
|
||||
echo "Waiting for Kafka Connect to start listening on localhost:8083 ⏳"
|
||||
while : ; do
|
||||
curl_status=$(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors)
|
||||
echo -e $(date) " Kafka Connect listener HTTP state: " $curl_status " (waiting for 200)"
|
||||
if [ $curl_status -eq 200 ] ; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
cd /usr/share/confluent-hub-components/
|
||||
./start.sh
|
||||
sleep infinity
|
@ -1,17 +1,3 @@
|
||||
#!/bin/bash
|
||||
echo "Launching Kafka Connect worker"
|
||||
/etc/confluent/docker/run &
|
||||
#
|
||||
echo "Waiting for Kafka Connect to start listening on localhost:8083 ⏳"
|
||||
while : ; do
|
||||
curl_status=$(curl -s -o /dev/null -w %{http_code} http://localhost:8083/connectors)
|
||||
echo -e $(date) " Kafka Connect listener HTTP state: " $curl_status " (waiting for 200)"
|
||||
if [ $curl_status -eq 200 ] ; then
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
cd /usr/share/confluent-hub-components/
|
||||
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d @mysql2kafka.json
|
||||
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d @kafka2elasticsearch.json
|
||||
sleep infinity
|
||||
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d @kafka2elasticsearch.json
|
Loading…
Reference in new issue