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

Bootiful workload orchestration with Hashicorp ...

Bootiful workload orchestration with Hashicorp Nomad

What if we had a workload orchestrator that allows to run (legacy) Java applications, container and native workload without having to convert everything into a container?

K8s has become standard for running container workload. It is popular for its flexibility, power and wide industry support but it comes with some costs. This is where Hashicorp Nomad steps in as an alternative when you don’t want to containerize your existing applications.

In this talk attendees get a short intro to Nomad and learn to schedule Java, container, GraalVM native Spring Boot workloads running side by side.

Martin Ahrer

May 08, 2023
Tweet

More Decks by Martin Ahrer

Other Decks in Programming

Transcript

  1. MARTIN AHRER MARTIN AHRER Co-founder and head of Freelance software

    architect / developer / clean-code coach Offering services in the Java and DevOps space    Enterprise Java User Group Austria [email protected] @kodepreacher https://www.martinahrer.at Martin Ahrer 2
  2. CONTENT CONTENT Spring Boot deployment options Comparing Nomad and Kubernetes

    Nomad deployment descriptor Demo: Container workload (Spring Boot App) Demo: Native workload (Spring Boot App) Demo: Java workload (Spring Boot App) Martin Ahrer 3
  3. WHAT IS NOMAD? WHAT IS NOMAD? And how does it

    compare with Kubernetes? Martin Ahrer 5 . 1
  4. WHAT IS NOMAD? WHAT IS NOMAD? — https://developer.hashicorp.com/nomad A simple

    and flexible scheduler and orchestrator to deploy and manage containers and non-containerized applications across on-prem and clouds at scale Martin Ahrer 5 . 2
  5. DEPLOYING NOMAD AGENTS DEPLOYING NOMAD AGENTS # Run this as

    a OS service bootiful@server-0$ nomad agent -server -name "server-0" -config=server.hcl # Run this as a OS service bootiful@client-0$ nomad agent -client -name "client-0" -config=client.hcl # Run this on your local machine in development mode bootiful@dev$ nomad agent -dev -config=development.hcl Martin Ahrer 5 . 7
  6. THE 2 MILLION CONTAINER CHALLENGE THE 2 MILLION CONTAINER CHALLENGE

    Kubernetes supports clusters up to 5,000 nodes and 300,000 total containers. Martin Ahrer 5 . 8
  7. THE 2 MILLION CONTAINER CHALLENGE THE 2 MILLION CONTAINER CHALLENGE

    Kubernetes supports clusters up to 5,000 nodes and 300,000 total containers. https://kubernetes.io/docs/setup/best- practices/cluster-large/ Martin Ahrer 5 . 8
  8. THE 2 MILLION CONTAINER CHALLENGE THE 2 MILLION CONTAINER CHALLENGE

    Kubernetes supports clusters up to 5,000 nodes and 300,000 total containers. Nomad can scale to cluster sizes exceeding 10,000 nodes. https://kubernetes.io/docs/setup/best- practices/cluster-large/ Martin Ahrer 5 . 8
  9. THE 2 MILLION CONTAINER CHALLENGE THE 2 MILLION CONTAINER CHALLENGE

    Kubernetes supports clusters up to 5,000 nodes and 300,000 total containers. Nomad can scale to cluster sizes exceeding 10,000 nodes. In 2020 HashiCorp Nomad scheduled 2,000,000 Docker containers on 6,100 hosts in 10 AWS regions in 22 minutes. https://kubernetes.io/docs/setup/best- practices/cluster-large/ Martin Ahrer 5 . 8
  10. THE 2 MILLION CONTAINER CHALLENGE THE 2 MILLION CONTAINER CHALLENGE

    Kubernetes supports clusters up to 5,000 nodes and 300,000 total containers. Nomad can scale to cluster sizes exceeding 10,000 nodes. In 2020 HashiCorp Nomad scheduled 2,000,000 Docker containers on 6,100 hosts in 10 AWS regions in 22 minutes. https://kubernetes.io/docs/setup/best- practices/cluster-large/ https://www.hashicorp.com/c2m Martin Ahrer 5 . 8
  11. WHY WOULD YOU WANT TO USE NOMAD? WHY WOULD YOU

    WANT TO USE NOMAD? Martin Ahrer 6 . 1
  12. DEMO: WORKLOAD DEMO: WORKLOAD namespace "traefik" namespace "bootiful-java" namespace "bootiful-native"

    namespace "bootiful-container" NOMAD CLIENT-0 NOMAD CLIENT-1 NOMAD CLIENT-2 Martin Ahrer 7 . 2
  13. DEMO: CONTAINER WORKLOAD DEMO: CONTAINER WORKLOAD Spring Boot 3, JDK17,

    Spring Data REST, postgresql Executable Boot JAR packaged as Container Startup time ~ 12 sec https://github.com/MartinAhrer/continuousdelivery Martin Ahrer 7 . 3
  14. DEMO: NATIVE WORKLOAD DEMO: NATIVE WORKLOAD Spring Boot 3, GraalVM

    22.3.r17, Spring Data REST, postgresql Packaged as AOT compiled native Linux binary Startup time ~ 0.5 sec https://github.com/MartinAhrer/continuousdelivery Martin Ahrer 7 . 4
  15. LEARN HOW TO BUILD NATIVE WORKLOAD LEARN HOW TO BUILD

    NATIVE WORKLOAD To learn about how to build Spring Boot native apps, join Alina Yurenko’s session in the Auditorium 12:00-12:50 Going Native: Fast and Lightweight Spring Boot Applications with GraalVM Martin Ahrer 7 . 5
  16. DEMO: JAVA WORKLOAD DEMO: JAVA WORKLOAD Spring Boot 3, JDK

    17 Spring Data REST, postgresql Packaged as Executable Boot JAR Startup time ~ 12 sec https://github.com/MartinAhrer/continuousdelivery Martin Ahrer 7 . 6