Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Shipping Code like a keptn: Continuous Delivery & Automated Operations on k8s

This talk shows how keptn works, why we built it and which problems it solves for modern software projects

  • Identifiez-vous pour voir les commentaires

  • Soyez le premier à aimer ceci

Shipping Code like a keptn: Continuous Delivery & Automated Operations on k8s

  1. 1. @grabnerandi#DevoxxPL Platinum Sponsor: Shipping Code like a x Automating your Delivery Pipelines so you can focus on code Andreas Grabner Dynatrace www.keptn.sh @keptnProject github.com/keptn
  2. 2. Confidential 2 PROD (1) WhatIhave,I want& Idon‘twantinmodern softwaredelivery & operations • I have artifacts built throughmyCIpushed to • I have tests that validate functionality& performance • Ihave a list of quality, scalability &performancecritera • Iwant to automate deploy, test, validate & promote • Iwant to automateoperational tasks e.g: rollback, ... • Idon‘t want to build & maintain deployment pipelines, tool-integrations or auto-remediation scripts • Idon‘t want to create or modify kubernetes, Istio or Helm charts v1.0 v2.0 v3.0 STAGE (4) STAGE (1)STAGE (2) PROD (2) PROD (4) v4.0 PROD (3)
  3. 3. Confidential 3 https://keptn.sh/docs/0.x.x/installation/ 1. GKE Cluster 2. Signedup for DynatraceFreeTrial &Installed DynatraceOneAgent k8sOperator
  4. 4. Confidential 4 https://keptn.sh/docs/0.x.x/installation/ 1. GitHub Org &keptn CLI from https://github.com/keptn/keptn/releases/tag/0.x.x 2. Install keptn with default uniform (GitHub, Helm, Jmeter,Pitometer, Gatekeeper, Slack, Dynatrace,Jenkins...) 3. Connectkeptn to my GitHub Org (Support for GitLabs, Bitbucket... Arefollowing) 4. Createproject &onboard a service based on https://keptn.sh/docs/0.x.x/usecases/onboard-carts-service/ $ keptn install $ keptn create project keptn-sample shipyard.yaml $ keptn onboard service simplenodeservice [values.yaml deployment.yaml ...] $ keptn configure --org=agrabner-keptn-sample --user=ghuser --token=ghtoken
  5. 5. Confidential 5 v1.0 90/100 $ keptn new artifact sampleservice:1.0
  6. 6. Confidential 6 v1.0 v2.0 v3.0 v4.0 10/10095/100100/100 $ keptn new artifact sampleservice:1.0$ keptn new artifact sampleservice:2.0$ keptn new artifact sampleservice:3.0$ keptn new artifact sampleservice:4.0
  7. 7. Confidential 8 Why did we build ? Because cloud native delivery and operations is a BIG challenge! Cloud Native
  8. 8. Confidential 9 Commit Cycle Time = Speed to Market MTTR Mean Time to Remediate 4.8 days 4 hours ~ 10min 12.5 days 2 days ~ 1 hour The reality and evidence supports it! https://dynatrace.ai/acsurvey Only < 5% is „Cloud Native“
  9. 9. Confidential 10 Quote: “Pipelines seem to be becoming our new future un-managable legacy code!“ First: solves the Continuous Delivery Problem!
  10. 10. Second: Continuous Delivery is NOT ENOUGH!
  11. 11. Continuous Delivery – Launch control Launch operations are supervised and controlled from several control rooms (also known as a firing room). The controllers are in control of pre-launch checks, the booster and spacecraft. Once the rocket has cleared the launch tower (usually within the first 10–15 seconds), is when control is switched over to the Mission Control Center
  12. 12. Continuous Operations – Mission Control A mission control center (MCC, sometimes called a flight control center or operations center) is a facility that manages space flights, usually from the point of launch until landing or the end of the mission. It is part of the ground segment of spacecraft operations. A staff of flight controllers and other support personnel monitor all aspects of the mission using telemetry, and send commands to the vehicle using ground stations
  13. 13. Mission Control “Automated Operations” Launch Control “Continuous Deployment” keptn accelerates building autonomous clouds Event-driven runbook automation Productionproblemscan beautomaticallyremediatedin real-timebyexecutingrunbooksthatrequirenomanual intervention. Self-healing blue/green deployments Deploymentsthatfollowthe“Operationsas Code” paradigmautomaticallyremediateproblemsandget yourdeploymentpipelineworkingagain inundera minute. Automated multistage unbreakable delivery pipelines GitOps-enableddeliverypipelineswithautomated qualitygates supportautomatedtestingandmonitoring- as-a-service.
  14. 14. Designed for modern applications GitOps-based collaboration AllkeptnworkflowsarebasedontheGitOps paradigm. Operator patterns for all logic components Logiccomponentscan bereusedforother operationaltasks. Monitoring and operations as code Developer-friendlydefinitionofmonitoringand operationaltasks. Built on and for Kubernetes Builtformoderncloud-nativeenvironments. Event-driven and serverless Powerfulwitha minimal resourcefootprint. Pluggable tooling Alltoolsleveragedbykeptn can bereplacedbased onyourtoolpreferences.
  15. 15. Confidential 19 Keptn: Define Uniform (Tooling) & Shipyard (Pipelines) shipyard.yaml stages: - name: "stage" deployment_strategy: "direct" test_strategy: "performance" - name: "prod" deployment_strategy: "blue_green" Uniform.yaml services: - name: "dockerhub" - name: "jenkins-service" subscribedchannels: - new-artifact - deployment-finished - name: "slack-service" prodstage Autonomous Cloud Control Plane keptnistio $ keptn wear uniform.yaml $ keptn create project sample shipyard.yaml prodstage
  16. 16. Confidential 20 Keptn: Update Tooling and Pipeline shipyard.yaml stages: - name: "stage" deployment_strategy: "direct" test_strategy: "performance" - name: "security" deployment_strategy: "blue_green" test_strategy: "functional" - name: "prod" deployment_strategy: "blue_green" Uniform.yaml services: - name: "dockerhub" - name: "jenkins-service" subscribedchannels: - new-artifact - deployment-finished - name: "slack-service" - name: "dynatrace-service" subscribedchannels: - configuration-changed - deployment-finished Autonomous Cloud Control Plane $ keptn update uniform.yaml $ keptn update project sample shipyard.yaml prodstagekeptnistio prodstagesecurity security
  17. 17. Confidential 21 keptn – Shipping through unbreakable continuous delivery pipelines Autonomous Cloud Control Plane prodstage new artifact sample:4.0 2: deploy (direct) 3: test (performance) 4: evaluate (scalability KPIs) 6: deploy (blue/green) 7: evaluate (business KPIs) 8: operate (NoOps) 5: conf-update sample:4.0 1: conf-update sample:4.0 problem
  18. 18. 22Confidential An inside look to Pitometer
  19. 19. 23Confidential Pitometer explained Source: Dynatrace Source: Prometheus Source: Neoload Source: ABC... Grader: Threshold Grader: T-System Grader: Baseline Grader: XYZ... Metric Source & Query Grading Details & Metric Score Validation Specfile Total Scoring Objectives 2 Parse Specfile 3 Retrieve Values: Pass query for each Indicator to Source 4 Score Metric: Pass values for each Indicator to Grader 5 Compare overall metric score to Objective 1 Initialize Sources & Grader Pitometer
  20. 20. 24Confidential Pitometer is a part of @keptnProject - A metrics-based grading of a deployment Metric Source & Query Grading Details & Metric Score Pitometer Specfile Total Scoring Objectives 2GB Allocated Bytes (from Prometheus) > 2GB: 0 Points < 2GB: 20 Points 5% 2% < 2%: 0 Points < 5%: 10 Points > 5%: 20 Points Conversion Rate (Dynatrace) GraderSource If value: 3GB Score: 0 If value: 3.9% Score: 10 Total Score: 10
  21. 21. 25Confidential Pitometer: Run standalone - https://github.com/keptn/pitometer Init Source Source Grader Run Result
  22. 22. 26Confidential Pitometer: Dynatrace Smartscape data source Horizontal Dependencies VerticalDependencies toRelationships:runsOn fromRelationships:calls toRelationships:calls
  23. 23. 27Confidential Pitometer: Dynatrace Smartscape data source example Smartscape Example: toRelationship:calls Grading Example: only 1 is allowed
  24. 24. 28Confidential Pitometer: Whats coming in July 2019
  25. 25. 29Confidential Storing (in Mongo), comparing across builds & visualization Percentage to previous build Values TestRunX Calculated Thresholds
  26. 26. 30Confidential • https://keptn.sh • Install and go throughuse cases • Learnconcepts Learnhow touse keptn
  27. 27. 31Confidential • https://github.com/keptn • Watch it, star it, fork it • Read and understand source code • Extend, improve, fix Moredetails?
  28. 28. 32Confidential • https://github.com/keptn-contrib • Find examples andtemplates • Be part of the keptn ecosystem Write yourownkeptn service
  29. 29. 33Confidential • https://github.com/keptn/community • @keptnproject • keptn@dynatrace.com • keptn.slack.com • Biweekly communitymeetings • Zoom https://dynatrace.zoom.us/j/578828410 • Notes https://tinyurl.com/keptn-meeting-notes Jointhecommunity
  30. 30. @grabnerandi#DevoxxPL Platinum Sponsor: Shipping Code like a x Automating your Delivery Pipelines so you can focus on code Andreas Grabner Dynatrace