Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GitOps, Jenkins X &Future of CI/CD

Rakuten Technology Conference 2019

  • Be the first to comment

GitOps, Jenkins X &Future of CI/CD

  1. 1. GitOps, Jenkins X & Future of CI/CD Kohsuke Kawaguchi | CTO, CloudBees, Inc. kkawaguchi@cloudbees.com | @kohsukekawa
  2. 2. 2© 2019 CloudBees, Inc. All Rights Reserved. DORA State of DevOps Reports
  3. 3. 3© 2019 CloudBees, Inc. All Rights Reserved. The Science of Lean Software and DevOps “software delivery is an exercise in continuous improvement, and our research shows that year over year the best keep getting better, and those who fail to improve fall further and further behind.” - Nicole Forsgren
  4. 4. 4© 2019 CloudBees, Inc. All Rights Reserved. Building and scaling high performance technology organisations
  5. 5. 5© 2019 CloudBees, Inc. All Rights Reserved. • Common platform in all clouds • AWS, Azure, GCP • OpenShift, CloudFoundry • Functionalities • Cluster scheduler • Service discovery • Load balancer • Extensibility New “Cloud Operating System” is here
  6. 6. 6© 2019 CloudBees, Inc. All Rights Reserved.
  7. 7. 7© 2019 CloudBees, Inc. All Rights Reserved. DevOps is the new legacy
  8. 8. 8© 2019 CloudBees, Inc. All Rights Reserved. So what is important?
  9. 9. GitOps
  10. 10. 10© 2019 CloudBees, Inc. All Rights Reserved. What? Source: https://www.weave.works/blog/what-is-gitops-really
  11. 11. 11© 2019 CloudBees, Inc. All Rights Reserved. • Transparency without sacrificing auditability & access control • How/who to get changes in • What has happened • Tools agnostic – works with any ”Infrastructure as Code,” not just K8s • Promote higher abstraction and reuse • Review/test before you merge • Trivial roll back, change detection, etc through familiar workflows of Git/GitHub Why?
  12. 12. 12© 2019 CloudBees, Inc. All Rights Reserved. You can have fun tinkering…
  13. 13. 13© 2019 CloudBees, Inc. All Rights Reserved. Or you can just get productive
  14. 14. 14© 2019 CloudBees, Inc. All Rights Reserved. • Figure out the best practice of how to CD cloud native apps • Not just build, test, but reviewing, promotion, changelog, collaboration, etc. • Integrate best of the bleed software in this ecosystem to achieve it • Democratize it by building a pleasant CLI that represents high-level steps • Be opinionated on how to do things • Kubernetes is a means to the end Jenkins X vision
  15. 15. 15© 2019 CloudBees, Inc. All Rights Reserved. Image: https://flic.kr/p/smze69
  16. 16. 16© 2019 CloudBees, Inc. All Rights Reserved. Development Flow We Preach
  17. 17. 17© 2019 CloudBees, Inc. All Rights Reserved. • Use cloud to develop, keep your laptop for what it needs to do • Keep master always releasable • Deploy often and in small increments • Inform other people about where changes are More Best practice we preach
  18. 18. 18© 2019 CloudBees, Inc. All Rights Reserved. Best Practices That Are “Boring”
  19. 19. 19© 2019 CloudBees, Inc. All Rights Reserved. Integrate best of the bleed software in this ecosystem to achieve it
  20. 20. 20© 2019 CloudBees, Inc. All Rights Reserved. MultiCloud Support: jx create cluster
  21. 21. 21© 2019 CloudBees, Inc. All Rights Reserved. • brew tap jenkins-x/jx • brew install jx • jx create cluster Let’s get going
  22. 22. 22© 2019 CloudBees, Inc. All Rights Reserved. • You got all that tools, preconfigured properly • Jenkins, with elastic build agents to build containers • Artifact repository to speed up your builds • Monocular to catalog Helm charts • You got staging & production environments • For all your future apps to be onboarded to Jenkins X What just happened?
  23. 23. 23© 2019 CloudBees, Inc. All Rights Reserved. • Create a new project • jx create spring • Make your existing app work in Jenkins X • jx import Prepare your app
  24. 24. 24© 2019 CloudBees, Inc. All Rights Reserved. • Source code • Wiring for build, deploy, & CD • Jenkinsfile, Dockerfile, helm chart, … • All services configured for you • Repo on GitHub, webhook to Jenkins, Jenkins jobs • Initial release & all running in staging What just happened?
  25. 25. 25© 2019 CloudBees, Inc. All Rights Reserved. • Work locally on a change • Create a PR on GitHub • Have the change reviewed & merged Let’s work on a change
  26. 26. 26© 2019 CloudBees, Inc. All Rights Reserved. • Your PR gets automatically built & tested • App deployed to a PR specific ‘preview environment’ • Allows stakeholders to interact with the app • Click a link in PR to see it • (Then you merge your change) • New master gets automatically built & tested • New release gets created with changelog • Deployed to staging What just happened?
  27. 27. 27© 2019 CloudBees, Inc. All Rights Reserved. • jx promote --version v0.0.3 --env production • Go to GitHub and merge ‘deployment’ PR • (v0.0.3 appears in production) Let’s promote a release to production
  28. 28. Future of CI/CD
  29. 29. 29© 2019 CloudBees, Inc. All Rights Reserved. • Jenkins itself run like a Function-as-a-Service • One build, in a container, then gone • Benefits • Better scalability • Better isolation • Jenkins X already uses Jenkins in this manner • This mode of operation should be available more over time Serverless Jenkins
  30. 30. 30© 2019 CloudBees, Inc. All Rights Reserved. • Defend stability through depth, not just tests GitOps is necessary, but not sufficient for higher velocity
  31. 31. 31© 2019 CloudBees, Inc. All Rights Reserved. • Feature Flags • Circuit Breaker • Canary Deployment • Better Observability How do you defend in depth?
  32. 32. 32© 2019 CloudBees, Inc. All Rights Reserved. • Because there’s nothing like production • Traffic mirroring • A/B testing Leverage Production Traffic
  33. 33. 34© 2019 CloudBees, Inc. All Rights Reserved.
  34. 34. 35© 2019 CloudBees, Inc. All Rights Reserved. Smarter testing ● Situation ○ You are the DevOps team of a BigCo ○ Massive modularized codebase with web of dependencies ○ Big, time consuming tests around them ● Questions ○ I want to cut cost & time of the software delivery process
  35. 35. 36© 2019 CloudBees, Inc. All Rights Reserved. Step 1: Dependency Analysis
  36. 36. 37© 2019 CloudBees, Inc. All Rights Reserved. Step 2: Predictive Test Selection ● ML model predicts useful subset to run ○ Based on information about changes ○ Of 105 changes/mo, 1% is used to train the model ● Impact ○ Only a third of tests are selected ○ Misses just 0.1% of broken changes ○ AWS cost is cut by half 37
  37. 37. 38© 2019 CloudBees, Inc. All Rights Reserved. Deployment Risk Prediction ● Situation ○ You are the SRE team in a BigCo ○ You oversee 100s of apps ○ ~1 deployment/app/day ● Questions ○ Can we flag risky deployments beforehand? 38
  38. 38. 39© 2019 CloudBees, Inc. All Rights Reserved. What they have done ● Train model ○ With 40,000 deployments of which 100 are failures ○ Attributes: app names, commit messages, … ● Impact ○ Predict 99% of failures ○ 5% false alarm rate 39
  39. 39. 40© 2019 CloudBees, Inc. All Rights Reserved. What they have done ● Learning ○ Most outages are estimated as “low risk” by developers ○ Most outages had short time span till approval ○ Long-maintained code is more risky ● Imagine what you can do with this! ○ Require somebody be on call ○ Restrict window of deployment 40
  40. 40. 41© 2019 CloudBees, Inc. All Rights Reserved. Where This Takes Us
  41. 41. 42© 2019 CloudBees, Inc. All Rights Reserved. • Every organization is trying to get better at software delivery • Kubernetes is an enabling technology but it can be a detractor • What’s important is DX, which is GitOps • Jenkins X brings that for K8s without you rolling your own which becomes legacy • CI/CD is continuously evolving, so is Jenkins Wrap Up
  42. 42. Software at the speed of ideas THANK YOU! www.cloudbees.com

×