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

Argocd and Tekton, the Dynamic Duo for Gitops Based Continuous I/D/D

Argocd and Tekton, the Dynamic Duo for Gitops Based Continuous I/D/D

Kevin Dubois

February 08, 2023
Tweet

More Decks by Kevin Dubois

Other Decks in Technology

Transcript

  1. @kevindubois Tekton and ArgoCD The Dynamic Duo for GitOps-based Continuous

    I/D/D Kevin Dubois Principal Developer Advocate, Red Hat
  2. @kevindubois Kevin Dubois • Principal Developer Advocate at Red Hat

    • 18+ years of experience building and delivering software applications • Speak English, Dutch, French, Italian • Passionate about improving Dev Experience with Open Source @[email protected] youtube.com/@thekevindubois linkedin.com/in/kevindubois github.com/kdubois
  3. @kevindubois Trial and Onboarding Inner Loop (for Code, Build, Debug

    and Push) Outer Loop (for Code review, Compliance, Security, Test and Deploy) Developer Sandbox Fastest and least friction way, at zero cost, for a developer to try our OpenShift platform, key developer tools and services, and Red Hat cloud services. https://developers.redhat.co m/developer-sandbox OpenShift Local Formerly known as “Red Hat CodeReady Containers” Pre-built development environment, based on OpenShift v4, for quick container-based application development - on developer laptops. https://developers.redhat.co m/products/openshift-local/ overview ◉ Podman Desktop This upstream project enables developers to easily build and share containerized applications, facilitating their transition to Kubernetes. https://podman.io ◉ Docker Desktop extension Enables deployment of local images to OpenShift directly from Docker Desktop. https://github.com/redhat-developer/openshift-dd-ext ◉ OpenShift Dev Spaces Formerly Red Hat CodeReady Workspaces Centralized, shareable, in-browser Kubernetes-based Integrated Development Environment, focused on OpenShift customers. https://developers.redhat.com/products/openshift-dev-spaces/overview ◉ IDE Extensions (for Visual Studio Code, IntelliJ, Eclipse) for Languages (Java, XML, YAML, Apache Camel) and Runtimes (Quarkus, EAP) Makes it easy for developers to build cloud-native and hybrid cloud applications with RH supported languages, and use RH preferred runtimes. ◉ CLI tools: odo OpenShift Developer CLI (command-line interface) that helps developers to build on Kubernetes/OpenShift, hiding Kubernetes complexity and supporting developers to get up and running Maven/Grade tooling (JKube) Adds the ability to bring Java applications to Kubernetes by extending native Maven/Gradle packaging tools. ◉ Dependency analytics Formerly known as “CodeReady Dependency Analytics” Hosted service, reachable by IDE extension and CLI/API for Software Composition Analysis and vulnerability remediation of Java, Javascript, Python, and Go applications. App Studio Hosted, fully managed experience to build full stack applications, easily connect to leading cloud services, adopt DevSecOps practices, and deploy to any hybrid-cloud platform. https://developers.redhat.com/app-studio/overview Plug-ins for CI/CD tools (GitHub Actions, Microsoft Azure DevOps, GitLab Runner, Jenkins) Provide templates for automated deployment of applications to OpenShift OpenShift Pipelines, Tekton Hub, Tekton IDE extension Is a cloud-native CI/CD solution to securely build containerized applications and deploy to OpenShift. Tekton Hub provides a catalog of Tekton task templates. Tekton IDE extension enables developers to create and manage Tekton pipelines from their IDE IDE Extensions (for Visual Studio Code, IntelliJ, Eclipse) for Deployment (OpenShift Connector, Serverless) Enable developers to push their code to OpenShift without needing to build containers, and to also configure serverless deployments. OpenShift GitOps Enables developers to declare and version application and cluster configuration in Git, automate application deployments, configuration drift detection and remediation. kam (Kubernetes application management) enables developers to easily seed GitOps declarative application models in Git. OpenShift Builds Provides a Kubernetes-native build tool on OpenShift. It supports multiple build strategies, and generates container images that are portable across Kubernetes distributions. OpenShift UI tools: OpenShift Dev Console Provides an end-to-end developer experience in OpenShift, across all cloud platforms, for building, deploying, and managing containerized applications and their related services. Web Terminal Runs within the OpenShift Dev Console. It provides a command line interface, pre-loaded with developer-focused CLIs. Helm is a package manager for Kubernetes. We provide support for that packaging in OpenShift, and a certified catalog for developers to quickly create applications based on curated Helm charts. Service Binding Enables developers to easily connect their applications to services running on the OpenShift cluster and Red Hat cloud services. Developer Tools Portfolio
  4. @kevindubois Developer Flow Outer loop Inner loop Pull/Merge Request Production

    Build / Package Code Push Debug Code Review Build Deploy Security Tests Compliance Inner loop Outer loop Developer Test
  5. @kevindubois Today, let’s focus on the “Outer Loop” The outer

    loop consists of the larger team processes that your code flows through on its way to the cluster: code reviews, integration tests, security and compliance. It needs be transparent and fast for developers from all teams. Outer Loop Development
  6. @kevindubois CI - CD - CD Build Test Security Checks

    Release Deploy Stage Deploy Prod Continuous Integration Continuous Delivery Continuous Deployment Manual Auto
  7. @kevindubois Tekton is a Graduated Continuous Delivery Foundation project and

    follows the OpenSSF best practices. Contributions from Google, Red Hat, Cloudbees, IBM, Elastic, Puppet, and many more An open-source project for providing a set of shared and standard components for building Kubernetes-style CI/CD systems https://tekton.dev
  8. @kevindubois Cloud-Native Continuous Integration and Continuous Delivery (CI/CD) Containers Built

    for container apps and runs on Kubernetes Designed with microservices and distributed teams in mind DevOps Serverless Runs serverless with no CI/CD engine to manage and maintain
  9. @kevindubois Step • Runs commands within container(builder image) • Mounts

    volumes, uses env vars • Eg. ‘mvn test’ or ‘git clone’ Task • A list of steps that are executed in sequential order • Takes inputs, outputs parameters Task Run • Runs a individual Task Pipeline • List of tasks defined to run in a certain order • Takes inputs, outputs parameters Pipeline Run • Runs a Pipeline Typed Decoupled Cloud Native Declarative Tekton Concepts Pipeline Resource • Defines referable resources such as source code repo, container images
  10. @kevindubois Task Catalog • Catalog of reusable Tasks • Import

    and compose pipelines • https://hub.tekton.dev/
  11. @kevindubois Tekton CLI(tkn) •List and Describe • Pipeline • Resource

    • Task • Task Run • Pipeline Run •View logs • Task Run • Pipeline Run •https://github.com/tektoncd/cli
  12. @kevindubois The application Push to give energy windmill 1.Sends click

    Kafka Topic 2.Sends the interaction 3. Updates the UI Dashboard: Green Energy Nickname Team Push/Tap to generate energy Cars that needs energy Two teams competing (top 5 players) First wins
  13. @kevindubois Architecture 3: Generate power (REST) Game Dashboard 1: Assign

    player Name & Team (REST) 6: Update dashboard (SSE) 2: Increment player cluster counter 4: Send power event 5: Receive power events
  14. @kevindubois Developer Flow Outer loop Inner loop Pull/Merge Request Production

    Build / Package Code Push Debug Code Review Build Deploy Security Tests Compliance Inner loop Outer loop Developer Test
  15. @kevindubois What is GitOps? Treat everything as code Git is

    the single source of truth Operations through Git workflows
  16. @kevindubois GitOps Application Delivery Model Source Git Repository Image Registry

    CI Config Git Repository Kubernetes CD Pull Request / Commit Push Pull
  17. @kevindubois GitOps Application Delivery Model Push Pull Pull Request Source

    Git Repository Image Registry Config Git Repository Kubernetes Deploy Monitor Detect drift CD Take action
  18. @kevindubois ArgoCD Sync Monitor Detect drift Take action Argo CD

    is a declarative, GitOps continuous delivery tool for Kubernetes. Cluster and application configuration versioned in Git Automatically syncs configuration from Git to clusters Drift detection, visualization and correction
  19. @kevindubois An application scoped Argo CD pulls application deployment and

    configurations into app namespaces Central Hub (Push) Application Scoped (Pull) Cluster Scoped (Pull) Auth Registry Networking Storage Install Operators Namespaces ... App A NS NS NS App A App B NS NS NS App B A central Argo CD pushes Git repository content to remote OpenShift and Kubernetes clusters A cluster-scope Argo CD pulls cluster service configurations into into the Kubernetes cluster Argo CD Instance Deployment Strategies
  20. @kevindubois 32 Learn OpenShift and all Cloud Native for free

    in our web based learning portal Resources Try OpenShift GitOps on our learning portal Red Hat Developers Deep Dive Join our workshops to explore Argo CD, Tekton, Kubernetes, Helm and more! Sign up at developers.redhat.com Find out more about Red Hat’s products and what it offers developers GitOps ebooks Find out more on GitOps with ebooks https://developers.redhat.com/e-books Get more about GitOps on Red Hat Developer Portal!
  21. @kevindubois Start exploring in the OpenShift Sandbox. Learn containers, Kubernetes,

    and OpenShift in your browser. developers.redhat.com/developer-sandbox Try Red Hat's products and technologies without setup or configuration.
  22. @kevindubois Join Red Hat Developer. Build here. Go anywhere. facebook.com/RedHatDeveloper

    youtube.com/RedHatDevelopers twitter.com/rhdevelopers linkedin.com/showcase/red-hat-developer