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.

CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)

880 views

Published on

CI / CD / Automation 已逐漸變成軟體開發中的新顯學,你的團隊還沒開始將重複性的工作轉為自動化?那也許你應該要盡快嘗試看看。在這場分享中和大家聊一聊目前在導入 CI / CD / Automation 的一些經驗,又在過程中遭遇到哪些雷、哪些坑。

Published in: Technology

CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)

  1. 1. Cheng Wei Chen @ Agile Tour Kaohsiung 2017Photo by Alex Jones on Unsplash CI / CD / 自動化 你還沒準備好!?
  2. 2. Cheng Wei Chen 陳 正瑋 DevOps Engineer @ 得寬科技 http://chengweichen.com
  3. 3. 2013 100 % Laravel JetBrains ( )
  4. 4. PHP/Laravel http://www.laravel-dojo.com
  5. 5. 你是老闆 / 決策者嗎?
  6. 6. 對於實際負責現場的員工
  7. 7. 有時候很怕遇到一種狀況
  8. 8. 老闆:「我昨天聽見⋯⋯我覺 得我們公司應該要導入⋯⋯」 NEW WAY
  9. 9. Photo by Paul on Unsplash !!! ???
  10. 10. DevOps CI / CD 社群真實案例
  11. 11. Photo by Matthew Henry on Unsplash CI / CD
  12. 12. 201620051930 1995 20001990 Agile 2008 conference, Andrew Clay Shafer and Patrick Debois discussed “Agile Infrastructure” 2009/06/23, O’Reilly Velocity, “10+ Deploys per Day Dev and Ops Cooperation at Flickr” 2009 - DevOpsDays Ghent in Belgium 2010 - Book Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation 2013 - Book The Phoenix Project 2010 : http://finding-marbles.com/2012/04/15/a-brief-history-of-agile-and-lean-events/ , https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software , 
 http://www.jianshu.com/p/f40209023006 , http://itrevolution.com/the-history-of-devops/ , http://www.tocinstitute.org/history-of-toc.html
  13. 13. 201620051930 1995 20001990 Agile 2008 conference, Andrew Clay Shafer and Patrick Debois discussed “Agile Infrastructure” 2009/06/23, O’Reilly Velocity, “10+ Deploys per Day Dev and Ops Cooperation at Flickr” 2009 - DevOpsDays Ghent in Belgium 2010 - Book Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation 2013 - Book The Phoenix Project 2010 : http://finding-marbles.com/2012/04/15/a-brief-history-of-agile-and-lean-events/ , https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software , 
 http://www.jianshu.com/p/f40209023006 , http://itrevolution.com/the-history-of-devops/ , http://www.tocinstitute.org/history-of-toc.html
  14. 14. Photo by Sweet Ice Cream Photography on Unsplash CI / CD / Automation 軟體開發新顯學 !!! ??? Photo by Paul on Unsplash
  15. 15. 1930s – PDCA-Cycle 20162005 1992 – Crystal 1930 2002 – TDD 2007 – Kanban for Software Development 2009 – Lean Startup 1995 20001990 2010 1999 – User Stories 1999 – eXtreme Programming 1995 – Scrum 2001 – Agile Manifesto 2007 – Agile Retrospectives 1993 – Refactoring 1995 – Pair Programming 1999 – Continuous Integration 2006 – BDD 1940s – Kanban & Toyota Production Systems / Lean 2003 – Lean Software Development 2009 – Software Craftsmanship Manifesto 2008 – Clean Code 2009 - DevOps 2006 – AWS 2012 – Ansible 2009 – Chef 2005 – Puppet 2007 – VirtualBox 1999 – VMware 2005 – Git 2010 - Continuous Delivery : http://finding-marbles.com/2012/04/15/a-brief-history-of-agile-and-lean-events/ , https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software , 
 http://www.jianshu.com/p/f40209023006 , http://itrevolution.com/the-history-of-devops/ , http://www.tocinstitute.org/history-of-toc.html 1984 – TOC
  16. 16. : http://finda.photo/image/11418 工程師 自動化
  17. 17. 工程師愛自動化https://www.youtube.com/watch?v=WRkJn5N77jM
  18. 18. : https://unsplash.com/photos/Fixg8KipOg8 Trigger ScriptsInterface ServiceFlow 什麼是自動化?
  19. 19. : https://unsplash.com/photos/Fixg8KipOg8 shell scripts (provisioning) cron + shell scripts CI Server + CI Jobs IFTTT Event triggered / Alerts Trigger ScriptsInterface ServiceFlow 舉例
  20. 20. code build test release deploy operateplan Continuous Integration Continuous Delivery Automation CI/CD/Automation Continuous Deployment CIcommit dev stagingtest testprod deploy environment dev staging prod local Infrastructure as Code
  21. 21. 自動化能夠帶來許多好處
  22. 22. 消除重複的工作
  23. 23. 提升軟體的交付速度 (節省時間?)
  24. 24. 降低成本、消除浪費
  25. 25. 降低人為錯誤
  26. 26. 消除對個體或團隊的依賴
  27. 27. more…
  28. 28. 通常當我們聽見 自動化的好處時
  29. 29. Photo by Andrew Neel on Unsplash
  30. 30. 等到實際換你上場時...
  31. 31. https://www.offworlddesigns.com/game-over-t-shirt/ 梗圖:陣亡的瑪莉歐(水管工人)
  32. 32. 理想與現實的差距
  33. 33. _____萬事起頭難
  34. 34. 會遇到的坑,比想像的多 Oooops
  35. 35. 該從何處開始著手?
  36. 36. code build test release deploy operateplan Continuous Integration Continuous Delivery Automation 從何處開始著手? Continuous Deployment CIcommit dev stagingtest testprod deploy environment dev staging prod local Infrastructure as Code
  37. 37. Deploy 從痛點開始 stagingdev test test production staging test production Project-1 Project-2 production Project-3 x10 x5 x3 舉例
  38. 38. 應用程式所需的 environment? Deploy 從小處開始 如何取得 Artifacts? 是否有其他初始化的動作? 如何因應「部署失敗」? 如何連上主機? 需要額外的組態管理? 如何因應「重新部署」? 舉例
  39. 39. 該選用哪種技術 / 工具?
  40. 40. 技術及工具的決策? add or delete AWS Route53 DNS AWS SDK for Python Ansible Module - route53 AWS SDK for PHP • php • API • Ansible • 舉例
  41. 41. 技術及工具的決策? Ansible AWS SDK 梗圖:料理東西軍,你要選哪道菜?
  42. 42. 標準與客製
  43. 43. 應用程式所需的 environment? Deploy 自動化前,先標準化 如何取得 Artifacts? 是否有其他初始化的動作? 如何因應「部署失敗」? 如何連上主機? 需要額外的組態管理? 如何因應「重新部署」? x2 x2 x3 x3x2 x3 x2 舉例
  44. 44. 大致標準化,預留客製空間 tasks: - name: download artifacts get_url: artifacts.zip - name: setup env templates: nginx.conf - name: reload nginx services: nginx reload tasks: - name: download scripts get_url: deploy.sh - name: run scripts command: sh deploy.sh
  45. 45. 為了自動化而自動化 不要
  46. 46. https://xkcd.com/1205/
  47. 47. 即是 Code 就有 需求與優先順序
  48. 48. 看見全貌! 不過度專注局部 感謝 Ruddy 老師
  49. 49. 在非瓶頸設備省下的 每個小時都是虛幻的。 感謝 高德拉特博士 感謝 葉秉哲 前輩
  50. 50. 多而繁雜的細節
  51. 51. code build test release deploy operateplan Continuous Integration Continuous Delivery Automation 以 pipeline 為例 Continuous Deployment CIcommit dev stagingtest testprod deploy environment dev staging prod local Infrastructure as Code
  52. 52. Photo by Mike Wilson on Unsplash 你就是水管工人!
  53. 53. 好書非讀不可
  54. 54. 好書非讀不可
  55. 55. 技術轉移及技能喪失
  56. 56. In their efforts to compensate for the unreliability of human performance, the designers of automated control systems have unwittingly created opportunities for new error types that can be even more serious than those they were seeking to avoid. —James Reason
  57. 57. 更多的文件、培訓、訓練
  58. 58. 持續改善及持續維護
  59. 59. 持續改善勝過追求完美 START
  60. 60. 自動化需要人力、工時
  61. 61. 好書非讀不可 https://landing.google.com/sre/book.html
  62. 62. Summary
  63. 63. : http://finda.photo/image/11418 工程師 自動化
  64. 64. : http://finda.photo/image/11418 工程師 自動化 老闆 省時、省錢、省資源
  65. 65. : https://unsplash.com/photos/Fixg8KipOg8 Trigger ScriptsInterface ServiceFlow 什麼是自動化?
  66. 66. 自動化能夠帶來許多好處
  67. 67. 但自動化的坑,比你想像的多 Oooops
  68. 68. 自動化需要的資源(人力、工時), 也比你想像的多
  69. 69. 自動化需要的評估關鍵, 也同樣比你想像的多
  70. 70. • • • • • 思考並評估 Photo by Paul on Unsplash
  71. 71. • • • • • 思考並評估 Photo by Paul on Unsplash
  72. 72. 好書非讀不可
  73. 73. CD https://www.infoq.com/articles/Continuous-Delivery-Maturity-Model
  74. 74. 好書非讀不可 https://landing.google.com/sre/book.html
  75. 75. • Operator-triggered manual action • Operator-written, system-specific automation • Externally maintained generic automation • Internally maintained, system-specific automation • Autonomous systems that need no human intervention 自動化的演進 https://landing.google.com/sre/book.html Photo by Paul on Unsplash
  76. 76. Photo by Sweet Ice Cream Photography on Unsplash 自動化是一種力量倍增器,但不是萬靈丹!
  77. 77. 反覆評估、持續改善 Photo by Sweet Ice Cream Photography on Unsplash 迭代
  78. 78. 工商服務
  79. 79. https://devopstw.club
  80. 80. 尋求志工、贊助 : https://pixabay.com/en/building-joy-planning-plans-1080592/ , https://pixabay.com/en/baby-hand-dad-200760/
  81. 81. 尋求講者及講題 : https://www.pexels.com/photo/man-person-suit-united-states-of-america-2281/
  82. 82. Photo by Clark Tibbs on Unsplash Thank You

×