Tag für die Übung ergänzt
[demos/kafka/training] / README.sh
index 8b568c9..937f00e 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -25,75 +25,41 @@ 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 producer
 
-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
+echo "Sennding message to :8080/foo..."
+# tag::time[]
+time echo foo | http -v :8080/foo
+# end::time[]
 
-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
+docker-compose up -d
 
 sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
 sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
 sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
 sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
 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
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
+sleep 1
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
+sleep 1
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
+sleep 1
+echo "Sennding message to :8080/foo..."
+time echo foo | http -v :8080/foo
 
-http :8000/seen
-http post :8000/stop
+http -v :8000/seen
 
-docker-compose logs producer
+docker-compose stop