$30 off During Our Annual Pro Sale. View Details »

Developer Experience with Java on Kubernetes (DevCon 2022)

Developer Experience with Java on Kubernetes (DevCon 2022)

In the cloud-native world, being a developer might be challenging. The number of technologies and patterns to know can be overwhelming. This session presents an approach based on open-source technologies and focused on improving the inner development loop and continuous delivery on Kubernetes. The end goal is to deliver value continuously, quickly, and reliably.

First, I’ll present several techniques for working locally effectively and productively. Should you run Kubernetes in your development environment? I’ll cover a few different options. Using Java and Spring Boot, we’ll build a cloud-native application following the principles of test-driven development. The inner development loop will be enhanced with Cloud Native Buildpacks, Tilt, Knative, and Telepresence. Continuous integration is a crucial practice for continuous delivery. We’ll check in code regularly, triggering an automated process to build, test, and package the application. Do you use pull requests? Relying on ArgoCD and the GitOps principles, I’ll show you how to work with temporary environments created dynamically when a new pull request is opened.

Finally, we'll use Cartographer to glue together all these different tools and design a golden path to production on Kubernetes, providing a clear separation of concerns and letting developers focus on delivering value.

Thomas Vitale

November 19, 2022
Tweet

More Decks by Thomas Vitale

Other Decks in Technology

Transcript

  1. Thomas Vitale
    DevCon
    Nov 10th, 2022
    Developer Experience
    With Java on Kubernetes
    @vitalethomas

    View Slide

  2. Systematic
    • Software Architect at
    Systematic, Denmark.

    • Author of “Cloud Native Spring
    in Action” (Manning).

    • OSS contributor (Java, Spring,
    Cloud Native Technologies)
    Thomas Vitale
    thomasvitale.com @vitalethomas

    View Slide

  3. View Slide

  4. Problem
    @vitalethomas

    View Slide

  5. Delivering Value
    From idea to production
    Developer
    App Repo Production
    Idea
    @vitalethomas

    View Slide

  6. View Slide

  7. Inner Development Loop
    @vitalethomas
    CODE
    RUN
    TEST
    DEBUG

    View Slide

  8. Developer Experience
    @vitalethomas

    View Slide

  9. Developer Experience
    “Top of mind for everyone”
    @vitalethomas

    View Slide

  10. Developer Experience
    “…developer experience could be defined as a means for
    capturing how developers think and feel about their
    activities within their working environments,

    with the assumption that an improvement of the developer
    experience has positive impacts on characteristics such
    as sustained team and project performance.”

    (F. Fagerholm, J. Münch)
    Developer Experience: Concept and De
    fi
    nition
    (F. Fagerholm, J. Münch)
    @vitalethomas

    View Slide

  11. Value
    @vitalethomas

    View Slide

  12. Developer Experience
    Tools are not enough
    ORGANIZATION
    PROCESSES
    TECHNOLOGY
    CULTURE
    @vitalethomas

    View Slide

  13. Technologies
    Developer experience with Java on Kubernetes
    @vitalethomas

    View Slide

  14. Team Topologies
    Organisational design for software
    @vitalethomas

    View Slide

  15. Continuous Delivery
    Better software faster
    @vitalethomas

    View Slide

  16. Development Workflow
    @vitalethomas

    View Slide

  17. Development Workflow
    Inner Loop and Outer Loop
    Inner Loop
    ‣Code


    ‣Run


    ‣Test


    ‣Debug
    Outer Loop
    ‣CI/CD


    ‣Compliance, security


    ‣Con
    fi
    guration, monitoring


    ‣Production deployment
    git push
    @vitalethomas

    View Slide

  18. Goals
    2 Reduced cognitive load
    3 Clear path to production
    1 Rapid and continuous feedback loop
    @vitalethomas

    View Slide

  19. Cloud Native
    @vitalethomas

    View Slide

  20. From Traditional to Cloud Native
    Application Server, Embedded Server
    Runtime (JVM)
    Middleware (Application Server)
    Application (WAR/EAR)
    Runtime (JVM)
    Application (JAR)
    @vitalethomas

    View Slide

  21. Containers
    @vitalethomas

    View Slide

  22. Moving to Containers
    Application Server, Embedded Server, Container
    Runtime (OCI)
    Application (Container)
    Runtime (JVM)
    Middleware (Application Server)
    Application (WAR/EAR)
    Runtime (JVM)
    Application (JAR)
    @vitalethomas

    View Slide

  23. Cloud Native Buildpacks
    @vitalethomas

    View Slide

  24. Image
    pack build
    Cloud Native Buildpacks
    From source code to container image
    @vitalethomas

    View Slide

  25. Kubernetes
    @vitalethomas

    View Slide

  26. Moving to Kubernetes
    Application Server, Embedded Server, Container, Kubernetes
    Runtime (OCI)
    Middleware


    (Kubernetes)
    Application (Container)
    Runtime (JVM)
    Middleware


    (Application Server)
    Application (WAR/EAR)
    Runtime (JVM)
    Application (JAR)
    Runtime (OCI)
    Application (Container)
    @vitalethomas

    View Slide

  27. Tilt
    @vitalethomas

    View Slide

  28. Tilt
    Continuous development on Kubernetes
    @vitalethomas

    View Slide

  29. Tilt
    Continuous development on Kubernetes
    @vitalethomas

    View Slide

  30. Skaffold
    @vitalethomas

    View Slide

  31. Skaffold
    Continuous development on Kubernetes
    @vitalethomas

    View Slide

  32. Telepresence
    @vitalethomas

    View Slide

  33. Telepresence
    Local-to-remote bridges for fast iterations
    @vitalethomas

    View Slide

  34. Knative
    @vitalethomas

    View Slide

  35. Knative
    Serverless experience on Kubernetes
    @vitalethomas

    View Slide

  36. Serverless Architectures
    Developers focus on code
    Focus on business logic
    Developer
    Platform
    Infrastructure

    Provisioning
    Workload

    Management
    Dynamic

    Scaling
    @vitalethomas

    View Slide

  37. Knative Serving
    Serverless Experience on Kubernetes
    Developer-friendly

    abstractions
    From image to URL
    Autoscaling

    Scaling to zero
    Progressive

    Rollouts
    Request-driven

    Event-driven
    Cloud agnostic
    @vitalethomas

    View Slide

  38. Argo CD
    @vitalethomas

    View Slide

  39. Argo CD
    Continuous Deployment with GitOps
    @vitalethomas

    View Slide

  40. Goals
    2 Reduced cognitive load
    3 Clear path to production
    1 Rapid and continuous feedback loop
    @vitalethomas

    View Slide

  41. Configuration Management
    @vitalethomas

    View Slide

  42. Configuration Management
    On Kubernetes
    @vitalethomas

    View Slide

  43. https://carvel.dev

    View Slide

  44. Capabilities over responsibilities
    @vitalethomas

    View Slide

  45. Developer
    @vitalethomas

    View Slide

  46. Developer Platform
    ?
    @vitalethomas

    View Slide

  47. Developer Platform
    ?
    @vitalethomas

    View Slide

  48. Developer Platform
    @vitalethomas

    View Slide

  49. Cartographer
    @vitalethomas

    View Slide

  50. Cartographer
    Golden paths to production
    @vitalethomas

    View Slide

  51. Delivering Value
    From code to production
    Developer
    App Repo Production
    Application


    Operator
    Security


    Expert
    Platform


    Engineer
    @vitalethomas

    View Slide

  52. Example: Minimal Path
    Source -> Image -> URL
    Deploy to
    Kubernetes
    Package as
    container image
    Checkout

    source code

    View Slide

  53. Goals
    2 Reduced cognitive load
    3 Clear path to production
    1 Rapid and continuous feedback loop
    @vitalethomas

    View Slide

  54. Resources
    @vitalethomas

    View Slide

  55. Resources
    Source code
    • Presentation source code

    • Kadras: Application Platform Toolkit

    • The developer experience and the inner dev loop

    • Docker
    fi
    les vs. Cloud Native Buildpacks

    • Knative and Spring: Bringing back the func

    • Developer Work
    fl
    ow

    • Software Supply Chain Choreography
    @vitalethomas

    View Slide

  56. https://github.com/ThomasVitale/awesome-spring

    View Slide

  57. Discount codes
    Manning
    • 35% discount code, valid for
    all products in all format

    • ctwdevcon22


    • manning.com
    @vitalethomas

    View Slide

  58. Thomas Vitale
    DevCon
    Nov 10th, 2022
    Developer Experience
    With Java on Kubernetes
    @vitalethomas

    View Slide