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

Cloud Native Buildpacks - bond between App Devs...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Cloud Native Buildpacks - bond between App Devs and DevOps

Learn how Cloud Native Buildpacks can help both App Developers and DevOps teams deliver applications to productions faster, with less toil and better maintainability.

Avatar for Javier Romero

Javier Romero

June 01, 2020
Tweet

Other Decks in Programming

Transcript

  1. Agenda • Development Workflows • Cloud Native Buildpacks ◦ How

    can the help? ◦ How do they work? • Demo: pack • Demo: kpack
  2. Workflow: Containerized 5 Pain Points: ▪ App Developer: Building multiple

    apps with high standards ▪ DevOps: Day-2 operations - Maintenance
  3. Pain Points: ▪ Dockerfile best practices ◦ Multistage builds ◦

    Minimize number of layers ◦ Leverage build cache ◦ … ▪ App specific best practices ◦ Use JDK during build, JRE during run ◦ Cache node_modules ◦ Memory allocation ◦ … ▪ Not easy to reuse / compose logic into multiple applications Workflow: Containerized - Building 6
  4. Workflow: Containerized - Dependency updates OS ... dependencies app OS

    ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app deps deps deps deps deps
  5. Workflow: Containerized - OS updates OS ... dependencies app OS

    ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS ... dependencies app OS OS OS OS OS
  6. Workflow: Cloud Native Buildpacks 9 Provides: ▪ App Developer: Build

    app to image with little to no setup ▪ DevOps: Update dependencies without source changes OS layer updates without developer intervention
  7. Buildpacks detect build ▪ Run each buildpack’s detect binary against

    the source code ▪ For the first buildpack group that passes detection, executes each buildpack’s build binary, in order ▪ build gathers dependencies, compiles app (if needed), and sets launch command </> Yarn CNB build Node CNB build
  8. Stacks and Builders Stack: two OS images that provide... ▪

    Build-time environment ▪ Run-time environment build image run image stack Builder: complete context for building ▪ Contains buildpack binaries ▪ Contains lifecycle binaries ▪ Image based on build image from stack ▪ Public builders by Google, Heroku, Paketo build image lifecycle buildpack C buildpack B buildpack A
  9. Platforms stack build image run image build image lifecycle buildpack

    C buildpack B buildpack A builder image </> source run image ... dependencies app app image platform ▪ Gather the source code and builder ▪ Execute the lifecycle in container
  10. Rebase run image ... dependencies app run image ▪ Updates

    app image’s stack (i.e. run image) without need to rebuild ▪ Remote registry layer manipulation enables update without downloading app image (rebase happens in seconds!) ▪ ABI guarantee: app behavior is preserved run image ... dependencies app
  11. ▪ CLI ▪ Build and rebase locally: pack build …

    pack rebase … ▪ Additional utilities: pack create-builder … pack package-buildpack … ... ▪ Kubernetes build service ▪ Declarative types to build app images ▪ Schedules image rebuilds based on buildpack and source changes Platforms pack kpack