X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=README.sh;h=4f7f0174b3017808dfa613ec453e81c42601adfc;hb=b731ace5dfbcf51f996dea631106d53f7ac85d73;hp=8b568c9537e2f6086e44052c1d18447bdb928339;hpb=50da4f6f74a8f4f567b7af8556480f81256c61dc;p=demos%2Fkafka%2Ftraining diff --git a/README.sh b/README.sh index 8b568c9..4f7f017 100755 --- a/README.sh +++ b/README.sh @@ -25,75 +25,13 @@ fi echo "Waiting for the Kafka-Cluster to become ready..." docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1 docker-compose up setup - docker-compose up -d - -sleep 15 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen - -http post :8081/stop -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen - -http post :8081/start - -sleep 1 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen -sleep 1 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen -sleep 1 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen -sleep 1 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen -sleep 1 -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen - -http post :8081/stop -http :8081/status -http post :8082/stop -http :8082/status -http post :8083/stop -http :8083/status -http post :8084/stop -http :8084/status -http post :8085/stop -http :8085/status - -http :8000/seen -http post :8000/stop - -docker-compose logs producer +while ! [[ $(http -b :8080/actuator/health | jq -r .status) =~ "UP" ]]; do echo Waiting for :8080/actuator/health; sleep 1; done + +# tag::http[] +echo -n bar | http -v :8080/foo +echo -n foo | http -v :8080/bar X-id:666 +# end::http[] +# tag::kafkacat[] +docker-compose exec cli kafkacat -b kafka:9092 -t test -f "%p|%o|%k=%s|%h\n" -e +# end::kafkacat[]