Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Puppet Camp Germany 2020 - Puppet Control Repo and GIT

487 Aufrufe

Veröffentlicht am

Three different examples on GIT workflows for Puppet Control Repository.
Starting from single branch to multiple long living branches.

Veröffentlicht in: Internet
  • Als Erste(r) kommentieren

Puppet Camp Germany 2020 - Puppet Control Repo and GIT

  1. 1. Puppet Control Repository and GIT Martin Alfke - example42 GmbH
  2. 2. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 2 Puppet Trainer since 2011 CEO & Co-Founder example42 GmbH tuxmea (Twitter, GitHub, Slack) About me
  3. 3. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 3 Puppet Control-Repo Simple GIT workflow GIT workflow with staging branch GIT Flow Topics covered:
  4. 4. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Puppet Control Repo 4 Image: tatlin
  5. 5. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Puppet Control Repo 5 One repository for your own code Separation of upstream modules (Puppetfile or git submodules) Branches will become Puppet environments Either empty repo or example42 Puppet System Infrastructure Construction Kit (PSICK on GitHub). Image: tatlin
  6. 6. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Puppet Control Repo 6 Image: tatlin App-DEV development testing production
  7. 7. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Puppet Control Repo 7 Image: tatlin App-DEV development testing production Puppet DEV production
  8. 8. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Puppet Control Repo 8 Image: tatlin App-DEV development testing production Puppet DEV production production production Application Stages Puppet Environments
  9. 9. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Simple GIT workflow 9 Image: tatlin
  10. 10. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Simple GIT workflow 10 One long living protected branch (production) Differences between stages are in Hiera. Activating features using feature flags. Image: tatlin
  11. 11. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Simple GIT workflow 11 All changes come via feature branches Prevent special chars like +, -, %, ... these environments will not get deployed. Image: tatlin
  12. 12. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 12 Simple GIT workflow
  13. 13. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Simple GIT workflow 13 Pro: Easy to learn, easy to handle Con: No real staging of code, code changes affect all stages (when activated) Image: tatlin
  14. 14. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT workflow with staging branch 14 Image: tatlin
  15. 15. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT workflow with staging branch 15 Network separation between development and production? Separate GIT servers and Puppet Masters? Image: tatlin
  16. 16. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT workflow with staging branch 16 All code must be developed in development zone No code may be added in production, except via merge requests. CI/CD Systems synchronizes code base using a staging branch Image: tatlin
  17. 17. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 17 GIT workflow with staging branch
  18. 18. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT workflow with staging branch 18 Pro: Security separation is taken care on Con: Needs automatic merging and staging, no manual merges. Image: tatlin
  19. 19. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 19 Image: tatlin
  20. 20. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 20 Image: tatlin ITIL processes? Strict code separation between development and production required? Hot fixes and Features must be possible?
  21. 21. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 21 Image: tatlin No merges between branches! Each branch is an individual development. Cherry-Pick into next stage.
  22. 22. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 22 GIT Flow
  23. 23. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 23 GIT Flow
  24. 24. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 24 Image: tatlin Each feature branch may consist of a single commit only. Use git commit --amend or git squash
  25. 25. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 25
  26. 26. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 26 Image: tatlin GIT Flow Requires knowledge on - squashing - rebasing - solving merge conflicts
  27. 27. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH 27 GIT Flow
  28. 28. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH GIT Flow 28 Image: tatlin Pro: Branch specific development possible Con: needs deeper understanding on GIT more work to bring changes into desired branch
  29. 29. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Summary 29 Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains. - Steve Jobs
  30. 30. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Conclusion 30 Image: tatlin
  31. 31. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Conclusion 31 Start simple and expand when learning. - K.I.S.S. Automate everything, also your code deployment! GIT has a learning curve. Take care on that! Learn GIT! Never adopt complex workflows if you don’t need them! “If you use all your smartness to write the code, you have none left to debug it.” (David Schmidt)
  32. 32. Puppet Control Repository and GIT - PuppetCamp Europe 2020 - Martin Alfke © example42 GmbH Conclusion 2 32 Stop social distancing! We need physical distance! Take care on people who need help!
  33. 33. Puppet Control Repository and GIT Martin Alfke - example42 GmbH

×