Devoxx Morocco 2018 - JHipster Microservices with Spring boot 2 and Kubernetes

Devoxx Morocco 2018 - JHipster Microservices with Spring boot 2 and Kubernetes

Learn how to build microservice architectures with JHipster using following options
Classing JHipster Registry based architecture
Using Istio service mesh with Kubernetes

7f408bc67dc9ae3b288ee92d16d3c4c2?s=128

Deepu K Sasidharan

November 27, 2018
Tweet

Transcript

  1. JHipster Microservices with Spring boot 2 and Kubernetes Deepu K

    Sasidharan @deepu105 deepu.js.org
  2. https://jhipster.tech #DevoxxMa @java_hipster

  3. https://jhipster.tech #DevoxxMa @java_hipster

  4. https://jhipster.tech #DevoxxMa @java_hipster ▪ ▪ ▪ ▪ ▪ ▪

  5. https://jhipster.tech #DevoxxMa @java_hipster ▪ ▪ ▪ ▪ ▪ ▪

  6. https://jhipster.tech #DevoxxMa @java_hipster

  7. https://jhipster.tech #DevoxxMa @java_hipster

  8. https://jhipster.tech #DevoxxMa @java_hipster • • • • • • •

    • • • • •
  9. https://jhipster.tech #DevoxxMa @java_hipster • ◦ • ◦ ◦ • ◦

  10. https://jhipster.tech #DevoxxMa @java_hipster

  11. https://jhipster.tech #DevoxxMa @java_hipster

  12. https://jhipster.tech #DevoxxMa @java_hipster

  13. https://jhipster.tech #DevoxxMa @java_hipster

  14. https://jhipster.tech #DevoxxMa @java_hipster

  15. https://jhipster.tech #DevoxxMa @java_hipster

  16. https://jhipster.tech #DevoxxMa @java_hipster

  17. https://jhipster.tech #DevoxxMa @java_hipster

  18. https://jhipster.tech #DevoxxMa @java_hipster $ jhipster import-jdl app.jdl

  19. https://jhipster.tech #DevoxxMa @java_hipster $ gcloud projects create jhipster-demo $ gcloud

    config set project jhipster-demo $ gcloud container clusters create hello-hipster \ --cluster-version 1.10 \ --num-nodes 4 \ --machine-type n1-standard-2 $ gcloud container clusters get-credentials hello-hipster
  20. https://jhipster.tech #DevoxxMa @java_hipster

  21. https://jhipster.tech #DevoxxMa @java_hipster $ cd kubernetes $ ./kubectl-apply.sh $ watch

    kubectl get pods -n jhipster $ kubectl get services -n jhipster
  22. https://jhipster.tech #DevoxxMa @java_hipster

  23. https://jhipster.tech #DevoxxMa @java_hipster $ kubectl expose service jhipster-registry --type=LoadBalancer \

    --name=exposed-registry -n jhipster $ kubectl get service exposed-registry -n jhipster
  24. https://jhipster.tech #DevoxxMa @java_hipster

  25. https://jhipster.tech #DevoxxMa @java_hipster

  26. https://jhipster.tech #DevoxxMa @java_hipster

  27. https://jhipster.tech #DevoxxMa @java_hipster •   •   • • •

      •
  28. https://jhipster.tech #DevoxxMa @java_hipster

  29. https://jhipster.tech #DevoxxMa @java_hipster $ cd ~/ $ export ISTIO_VERSION=1.0.2 $

    curl -L https://git.io/getLatestIstio | sh - $ ln -sf istio-$ISTIO_VERSION istio $ export PATH=~/istio/bin:$PATH $ kubectl apply -f ~/istio/install/kubernetes/helm/istio/templates/crds.yaml $ kubectl apply -f ~/istio/install/kubernetes/istio-demo.yaml \ --as=admin --as-group=system:masters $ kubectl get svc istio-ingressgateway -n istio-system
  30. https://jhipster.tech #DevoxxMa @java_hipster

  31. https://jhipster.tech #DevoxxMa @java_hipster

  32. https://jhipster.tech #DevoxxMa @java_hipster

  33. https://jhipster.tech #DevoxxMa @java_hipster

  34. https://jhipster.tech #DevoxxMa @java_hipster

  35. https://jhipster.tech #DevoxxMa @java_hipster $ jhipster import-jdl app.jdl

  36. https://jhipster.tech #DevoxxMa @java_hipster $ cd kubernetes $ ./kubectl-apply.sh $ watch

    kubectl get pods -n jhipster
  37. https://jhipster.tech #DevoxxMa @java_hipster $ export INGRESS_IP=$(kubectl -n istio-system get svc

    istio-ingressgateway \ -o jsonpath='{.status.loadBalancer.ingress[0].ip}') $ google-chrome store.$INGRESS_IP.nip.io
  38. https://jhipster.tech #DevoxxMa @java_hipster $ kubectl -n istio-system port-forward $(kubectl -n

    istio-system get pod \ -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 $ google-chrome http://localhost:3000 $ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l \ app=prometheus -o jsonpath='{.items[0].metadata.name}') 9090:9090 $ google-chrome http://localhost:9090
  39. https://jhipster.tech #DevoxxMa @java_hipster

  40. https://jhipster.tech #DevoxxMa @java_hipster

  41. https://jhipster.tech #DevoxxMa @java_hipster $ kubectl -n istio-system port-forward $(kubectl -n

    istio-system get pod -l \ app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 $ google-chrome http://localhost:16686 $ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l \ app=servicegraph -o jsonpath='{.items[0].metadata.name}') 8088:8088 $ google-chrome http://localhost:8088/force/forcegraph.html
  42. https://jhipster.tech #DevoxxMa @java_hipster

  43. https://jhipster.tech #DevoxxMa @java_hipster

  44. https://jhipster.tech #DevoxxMa @java_hipster

  45. https://jhipster.tech #DevoxxMa @java_hipster

  46. https://jhipster.tech #DevoxxMa @java_hipster

  47. https://jhipster.tech #DevoxxMa @java_hipster

  48. https://jhipster.tech #DevoxxMa @java_hipster

  49. https://jhipster.tech #DevoxxMa @java_hipster