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

Porter: Author, Distribute, and Master Cloud Native Application Bundles

Thorsten Hans
September 16, 2022

Porter: Author, Distribute, and Master Cloud Native Application Bundles

When deploying applications to a cloud platform, we have to deal with more than just our application distributable. Downstream services, systems, clusters, and the desired cloud platform must be instructed to guarantee successful deployments. Additionally, we have to verify that necessary deployment tools are installed and available in the desired version for everyone on the team. Join this talk by Azure MVP and cloud-native enthusiast Thorsten Hans and learn how Cloud Native Application Bundles (CNAB) and Porter will help to build standardized and secure bundles to ship workloads even in air-gapped environments.

Thorsten Hans

September 16, 2022
Tweet

More Decks by Thorsten Hans

Other Decks in Technology

Transcript

  1. What will you see today - We will ”install” a

    cloud-native application which consists of - Some cloud infrastructure automated with Terraform - Dependencies being deployed to Kubernetes using Helm - A containerized application, being deployed to Kubernetes as a helm chart Preview
  2. What we will cover today • Introduction • What is

    CNAB • What is Porter • Hands-On • Conclusion Talking Points
  3. Why are we talking about that • Distributed (cloud-based or

    cloud-native) apps consist of many artifacts • Infrastructure • Application binaries (packages, containers, functions) • Related services • Configuration Data (sensitive and non-sensitive) • Rather complex toolchains are used to manage and interact with them Introduction
  4. Why are we talking about that Pull Docker image(s) Pull

    various scripts or artifacts Provision cloud infrastructure Configure cloud infrastructure Deploy dependencies Deploy application Introduction
  5. Why are we talking about that Introduction az (Azure CLI)

    Bash (Shell Scripts) PowerShell (PowerShell Scripts) terraform (Terraform CLI) tfenv (Terraform Version Manager) nvm (Node Version Manager) npm (Node Package Manager) dotnet (.NET CLI) docker (Docker CLI) kubectl (Kubernetes CLI) helm (Helm CLI) CMD (Batch Files) azcopy (Azure Storage Copy) bicep (Project Bicep CLI)
  6. What we will cover today • Introduction • What is

    CNAB • What is Porter • Hands-On • Conclusion Talking Points
  7. https://cnab.io/ - Cloud-Native Application Bundles (CNAB) - Specifies how distributed

    apps are packaged, installed, mutated, and destroyed - CNAB is cloud agnostic - CNAB artifacts are - easy to share / consume - signed to verify integrity - consumed and stored in trusted locations What is CNAB
  8. Anatomy of a CNAB bundle What is CNAB Application Image(s)

    Invocation Image Bundle Descriptor Cloud Native Application Bundle
  9. Application Image(s) • Your good old application image • Docker

    Image • Although containerized applications are typical use-case, CNAB also works without application images What is CNAB
  10. Invocation Image • Technically it is a Docker image •

    The invocation image contains all required tools • Desired tool configuration applied • Desired version is installed • It contains all templates, manifests, metadata, and configuration • THIS IS THE CLOUD-INSTALLER What is CNAB Source https://media.giphy.com/media/mXnO9IiWWarkI/source.gif
  11. Bundle Descriptor • JSON document containing essential information about the

    CNAB bundle • Application image(s) with its/their digests • Invocation image with its digests • Definitions of inputs and outputs • Can be singed What is CNAB
  12. CNAB Distribution Channels • Bundles are OCI compliant aritfacts •

    The can be stored in OCI Registries • For example a Docker Registry such as Azure Container Registry (ACR) What is CNAB
  13. What we will cover today • Introduction • What is

    CNAB • What is Porter • Hands-On • Conclusion Talking Points
  14. https://porter.sh/ - Open-source CNAB implementation - Establishes patterns to improve

    productivity - Parameters - Outputs - Credentials - Mixins - Makes authoring CNAB bundles easy and offers a single CLI What is Porter
  15. The Porter Manifest - Single YAML Manifest provides all capabilities

    - Porter creates a CNAB bundle from the manifest - Required tools (mixins) will be added to the invocation image by Porter - Dockerfile template can be fully customized - if required What is Porter
  16. Porter mixins - Porter mixins are managed using the porter

    mixin commands - Available mixins - az, aws, gcloud - exec - terraform - Kubernetes - helm3 What is Porter
  17. What we will cover today • Introduction • What is

    CNAB • What is Porter • Hands-On • Conclusion Talking Points
  18. Demo Time § Provision Azure Resource to deal with Terraform

    state correctly § Use Terraform to spin-up the application platform (AKS) § Install 3rd party dependencies in the cluster (NGINX Ingress) § Deploy the application (dockerized .NET API) in the cluster using Helm 3 Adopting the Porter workflow
  19. What we will cover today • Introduction • What is

    CNAB • What is Porter • Hands-On • Conclusion Talking Points
  20. Why should one use it • Keep using the tools

    you know and love • Abstract away the complexities with a single command • Eleminate truck factor • Establish trust • by signing bundles • by distributing your applications using trusted channels Conclusion
  21. Why should one use it • Simplifies cloud-native application lifecycle

    • Everything becomes version-controlled • Installing, and upgrading cloud-native applications becomes • atomic • easy Conclusion