X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=README.sh;h=6e6c10eed807b4a0e0be7918e16d8f5f7a25f313;hb=77b9e0bb40647abc7360363bf2034f0fa6f4d7a6;hp=8b568c9537e2f6086e44052c1d18447bdb928339;hpb=50da4f6f74a8f4f567b7af8556480f81256c61dc;p=demos%2Fkafka%2Ftraining diff --git a/README.sh b/README.sh index 8b568c9..6e6c10e 100755 --- a/README.sh +++ b/README.sh @@ -9,7 +9,7 @@ then exit fi -docker-compose up -d zookeeper kafka cli +docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli if [[ $(docker image ls -q $IMAGE) == "" || @@ -23,77 +23,30 @@ else 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 exec cli cub kafka-ready -b kafka:9092 3 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 +sleep 10 -http post :8081/stop -http :8081/status -http :8082/status -http :8083/status -http :8084/status -http :8085/status -http :8000/seen +# tag::foo[] +echo foo | http -v :8081/foo-acks-1 +echo foo | http -v :8082/foo-acks-all +http -v :8000/seen +# end::foo[] -http post :8081/start +# tag::stop[] +docker-compose stop kafka-1 +# end::stop[] -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 +echo bar | http -v :8081/bar-acks-1 +echo bar | http -v :8082/bar-acks-all +http -v :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 +docker-compose stop kafka-3 -http :8000/seen -http post :8000/stop +echo foobar | http -v :8081/foobar-acks-1 +echo foobar | http -v :8082/foobar-acks-all +http -v :8000/seen -docker-compose logs producer +docker-compose stop acks-all acks-1 consumer