2. Async notification (HTTP for auth, user, billing, order services and message broker for notification service):
git clone https://github.com/alikhanmurzayev/otus_stream_processing.git && cd otus_stream_processing
minikube start --cpus=4 --memory=4g --vm-driver=virtualbox
kubectl apply -f k8s/namespaces.yaml
Obtain a new licence https://www.getambassador.io/aes-community-license-renewal/
helm install -n ambassador --set licenseKey.value=<enter licence key here> \
-f k8s/ambassador.yaml ambassador datawire/ambassador
helm install -f k8s/rabbit.yaml my-rabbit bitnami/rabbitmq -n rabbit
kubectl apply -f k8s/config.yaml -f k8s/postgres.yaml -n postgres
kubectl apply -f k8s/config.yaml -f k8s/auth-app.yaml -n auth
kubectl apply -f k8s/config.yaml -f k8s/user-app.yaml -n user
kubectl apply -f k8s/config.yaml -f k8s/billing-app.yaml -n billing
kubectl apply -f k8s/config.yaml -f k8s/order-app.yaml -n order
kubectl apply -f k8s/config.yaml -f k8s/notification-app.yaml -n notification
for (( ; ; )); do [[ $(kubectl get po -n ambassador | grep "1/1" | wc -l) == 2 ]] \
&& echo "ambassador is up" && break || echo "ambassador is down" && sleep 3; done
kubectl apply -f k8s/ambassador-routes.yaml -f k8s/ambassador-auth.yaml
BASE_URL=$(minikube service list|grep 'ambassador'|grep 'http'|grep -Eo 'http://[^ >]+'|head -1) \
&& until curl --fail $BASE_URL/auth/health; do sleep 3; done \
&& until curl --fail $BASE_URL/user/health; do sleep 1; done \
&& until curl --fail $BASE_URL/billing/health; do sleep 1; done \
&& until curl --fail $BASE_URL/order/health; do sleep 1; done \
&& until curl --fail $BASE_URL/notification/health; do sleep 1; done; echo; echo "services are up"
BASE_URL=$(minikube service list|grep 'ambassador'|grep 'http'|grep -Eo 'http://[^ >]+'|head -1) \
newman run --verbose --global-var "baseUrl=$BASE_URL" collection.json