Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020

72a2082c6a4dd79ad68befb3db911616?s=47 Matt Raible
February 13, 2020

Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020

Remember the choose your own adventure books that you used to read as a kid? This session is a reincarnation of a choose your own adventure book as a conference talk!

You'll learn about Spring Boot, Docker, and Kubernetes in this talk, along with the choices you make in the following areas:

* What kind of application architecture to build? Monolith or microservices?
* Would you like to use Java or Kotlin?
* MySQL, PostgreSQL, or MongoDB?
* Spring MVC or Spring WebFlux?
* Angular, React, or Vue.js?
* PWA or mobile app?
* Istio with Kubernetes or Kubernetes without Istio?

GitHub repos of demos:

* Monolith:
* Microservices:


Matt Raible

February 13, 2020


  1. Ray Tsang and Matt Raible Choose Your Own Adventure with

    JHipster & K8s @saturnism | @mraible
  2. Hello, JHipster! Application Generator Development Platform Popular Open Source

    Project Monoliths, Microservices, and Gateways
  3. Who is Ray Tsang? Developer Advocate at Google Cloud Kubernetes

    Enthusiast JHipster Committer Backpacker, snowboarder, photographer @saturnism on Twitter
  4. Who is Matt Raible? Developer Advocate at Okta Web Framework

    Enthusiast JHipster Committer Skier, rafter, classic VW fan @mraible on Twitter
  5. Choose Your Own Adventure

  6. JHipster Gives You Lots of Options Spring Boot Spring Security

    SQL or NoSQL Maven or Gradle Bootstrap Angular, React, or Vue End-to-End Tests Performance Tests 26,000+ options
  7. Spring Boot

  8. Google Trends for Spring Boot

  9. The Rest of the Java Pack

  10. Monolith vs. Microservice Architecture Monolith Microservices Pro Single app to

    manage Single CI/CD pipeline Low latency between calls Low coupling Faster build / deploy cycle per service Easier to scale out individual services Con Slow build / deploy cycle High coupling Harder to scale out Multiple apps to manage Multiple CI/CD pipeline Multiple EVERYTHING! High latency and issues between calls Proper service boundary
  11. Monolith Legacy forever! At least only one pile of...

  12. Microservices So you like the difficult stuff?

  13. Unpopular Opinion "Monoliths are the future because the problem people

    are trying to solve with microservices doesn’t really line up with reality."
  14. Maven or Gradle?

  15. Java, Kotlin, .NET, or Node? jhipster/jhipster-kotlin jhipster/jhipster-dotnetcore jhipster/generator-jhipster-nodejs

  16. The End

  17. FYI... Micronaut & Quarkus Support is in development npm

    install -g generator-jhipster-micronaut mhipster npm install -g generator-jhipster-quarkus jhipster -d --blueprint quarkus
  18. Which Authentication Type?

  19. Authentication: Session, JWT, or OAuth 2.0? Because friends don't let

    friends write authentication!
  20. MySQL, PostgreSQL, or MongoDB?

  21. Spring MVC or Spring WebFlux?

  22. CRUD with WebFlux?

  23. Angular, React, or Vue.js?

  24. Comparing Angular, React, and Vue.js

  25. Google Trends for Angular, React, and Vue.js

  26. PWA or Mobile?

  27. The End

  28. Yes to PWA! <script> if ('serviceWorker' in navigator) { window.addEventListener('load',

    function() { navigator.serviceWorker.register('/service-worker.js') .then(function () { console.log('Service Worker Registered'); }); }); } </script> src/main/webapp/index.html
  29. PWA Requires HTTPS @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override protected void configure(HttpSecurity http) throws Exception { http.requiresChannel() .requestMatchers(r -> r.getHeader("X-Forwarded-Proto") != null) .requiresSecure(); } }
  30. Want Ionic? Use Ionic4J!

  31. Want React Native? Use Ignite JHipster!

  32. What do you want to build? Monoliths 21 Points Health

    Blog Bug Tracker Microservices Online Store Blog + Store
  33. Let's Get Started!

  34. High Code Quality and Performance by Default

  35. Where to deploy to?

  36. Kubernetes Created by Google in 2014 Based on learnings from

    Google's internal orchestration tool Manages deployment of containers across a cluster of machines Currently managed by Cloud Native Foundation Single deployment target, multiple cloud/on-prem environments
  37. Kubernetes You've chosen the path to become a YAML developer...

    Everything will be YAML from here on! Don't fear. JHipster will generate all the YAMLs for you!
  38. With Istio or Without? • Kubernetes manages deployment of applications

    • Istio manages the services to service communication • Retries • Traces • Monitoring • L7 Routing • L7 Load Balancing (internal and external) • mTLS • Out of the box Observability with Jaeger, Kiali, Prometheus, Grafana
  39. Kubernetes to the Cloud! Run Kubernetes sub-generator Deploy to GKE

    on GCP Have a look at K9s Who let the pods out?!?
  40. Additional Configuration for OAuth 2.0 JHipster uses Keycloak by default

    Configuration is not auto-generated for Kubernetes Remember to configure Issuer, Client ID, and Client Secret
  41. Load Balancer, NodePort, or Ingress... JHipster Gateway has 2 functionalities

    • The frontend code • Routing ("/service/blog/api" → Blog Service) • Has Retries • But 1 extra hop Kubernetes has built-in URL mapping via Ingress • No retries
  42. The End You survived today's encounter with YAML, and the

    paradox of choice. Take the JHipster adventure, and good luck! Congratulations!
  43. Coming Soon: JHipster 7!

  44. Questions? 49 Keep in Touch! @mraible / @saturnism / Presentation Code