Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices with Istio, JHipster and Kubernetes

Microservices with Istio, JHipster and Kubernetes

My presentation for Geekle Java Summit

Istio service-mesh is one of the coolest kid on the block. Istio moves the responsibility of service discovery, load balancing, circuit breaking, monitoring, etc from the application to the platform(Kubernetes) thus letting the developers focus on the business code. But setting it up could be a daunting task for beginners and pros alike, this is where JHipster steps in and makes everything a cakewalk. As a bonus learn how Istio works in the process. JHipster is a widely-used OSS application development platform for creating web applications and microservices in minutes You will learn how to create a production-grade java microservice architecture with Spring Boot, Istio, Docker, Kubernetes & JHipster and deploy it to cloud under 30 minutes.

Deepu K Sasidharan

March 30, 2021
Tweet

More Decks by Deepu K Sasidharan

Other Decks in Programming

Transcript

  1. https://deepu.tech @deepu105 About me Deepu K Sasidharan JHipster co-lead developer

    Developer Advocate @ Adyen OSS aficionado, author, speaker @deepu105 deepu.tech deepu105
  2. https://deepu.tech @deepu105 What does Istio do? • Service discovery  •

    Automatic load balancing  • Routing, circuit breaking, retries, fail-overs, fault injection • Policy enforcement for access control, rate limiting, A/B testing, traffic splits, and quotas • Automatic Metrics, logs, and traces  • Secure service-to-service communication
  3. https://deepu.tech @deepu105 Prerequisite - Cluster Create GCP Project : $

    gcloud projects create jhipster-demo - Enable billing $ gcloud config set project jhipster-demo $ gcloud services enable container.googleapis.com Create GKE Cluster : $ gcloud container clusters create hello-hipster \ --num-nodes 4 \ --machine-type n1-standard-2 \ --cluster-version latest Set Credentials: $ gcloud container clusters get-credentials hello-hipster
  4. https://deepu.tech @deepu105 Prerequisite - Istio Install Istio : $ cd

    ~/ $ export ISTIO_VERSION=1.8.2 $ curl -L https://istio.io/downloadIstio | sh - $ ln -sf istio-$ISTIO_VERSION istio $ export PATH=~/istio/bin:$PATH
  5. https://deepu.tech @deepu105 Prerequisite - Istio Install Istio in GKE cluster

    : $ istioctl install --set profile=demo -y Get Ingress Gateway IP: $ kubectl get svc istio-ingressgateway -n istio-system
  6. https://deepu.tech @deepu105 Prerequisite - Addons Install Istio Addons in GKE

    cluster : $ cd ~/istio $ kubectl apply -f samples/addons/grafana.yaml $ kubectl apply -f samples/addons/prometheus.yaml $ kubectl apply -f samples/addons/kiali.yaml $ kubectl apply -f samples/addons/extras/zipkin.yaml
  7. https://deepu.tech @deepu105 JHipster in the wild Most popular Rapid Application

    Development platform for Java web applications and microservices ▪ 18k+ stars, 40k projects and 600+ contributors on GitHub ▪ 2M+ installations & 20k+ app generations per month ▪ 300k+ overall users ▪ 300+ companies using JHipster ▪ 140+ plugins
  8. https://deepu.tech @deepu105 What can you actually do with JHipster? ▪

    Generate simple monolith web applications ▪ Generate complete microservice architectures ▪ Generate domain model (entities) ▪ Generate CI/CD pipelines ▪ Deploy to the cloud or containers ▪ And lot more
  9. https://deepu.tech @deepu105 Code quality & developer experience ▪ Developer experience

    oriented ▪ Production grade code quality (Look at our sonar scores) − ▪ Best practices on any combinations selected ▪ Fully working CRUD apps out of the box ▪ Production grade security ▪ You would only have to do business logic code and UX design
  10. https://deepu.tech @deepu105 JDL JHipster Domain Language JDL : http://bit.ly/istio-jdl Reference

    : https://www.jhipster.tech/jdl/ Studio : https://start.jhipster.tech/jdl-studio/ Samples : https://github.com/jhipster/jdl-samples $ jhipster download <raw url> Note we are using JHipster v7.0.0-beta.1 as there is a bug related to reactive gateways and istio in v7.0.0
  11. https://deepu.tech @deepu105 Build & Push images $ ./gradlew bootJar -Pprod

    jib -Djib.to.image=deepu105/store $ ./gradlew bootJar -Pprod jib -Djib.to.image=deepu105/invoice $ ./gradlew bootJar -Pprod jib -Djib.to.image=deepu105/product $ ./gradlew bootJar -Pprod jib -Djib.to.image=deepu105/notification
  12. https://deepu.tech @deepu105 Is it worth the hype? + Kubernetes Native

    microservices + Reduced responsibilities for dev(Service discovery, security, telemetry, etc) + No need to write/maintain any code for some of the complex parts of a microservice architecture. + A/B testing, canary releases, and lot more - New compared to other stable options - Slightly higher resource usage (CPU, Memory) - Higher running costs - Business logic related policies might be trickier
  13. https://deepu.tech @deepu105 What can Istio do? • Service discovery  •

    Automatic load balancing  • Routing, circuit breaking, retries, fail-overs, fault injection • Policy enforcement for access control, rate limiting, A/B testing, traffic splits, and quotas • Metrics, logs, and traces  • Secure service-to-service communication • And more...
  14. https://deepu.tech @deepu105 Main website https://jhipster.tech JHipster online https://start.jhipster.tech GitHub https://github.com/jhipster/generator-jhipster

    Twitter https://twitter.com/java_hipster Stack Overflow https://stackoverflow.com/questions/tagged/jhipster?sort=newest More information on JHipster