SlideShare a Scribd company logo
1 of 20
Austin Puppet Users Group
(ATXPUG)
Managing Puppet Complexity
Modules & Complexity
Complexity is generally used to characterize
something with many parts where those parts
interact with each other in multiple ways.
Style
• Make quality a requirement
• Know when to stop (don’t over optimize)
• DRY – Don’t Repeat Yourself
DRY – Don’t repeat yourself
• Imposed Duplication – Apparent lack of
choice
• Inadvertent Duplication – Not realize that
they’re duplicating information
• Impatient Duplication – lazy / duplicate
because it seems easier
• Interdeveloper Duplication – Multiple people
on teams / multiple teams.
Code
• Keep low level knowledge in code
• Reserve Comments for high level expectations
• Foster an environment where it’s easier to
find and reuse existing stuff than to write it
yourself.
Avoid Global data
• Every time you reference global data it ties
you to the other components that share data
– frowned upon since 2.x days but still in a lot
of puppet code
Orthogonal - Safe to Fail
• Independent / lightly coupled systems
– Eliminates effects of unrelated things
– Design self contained things
• Increased productivity & contained risk
Prototype (experiment)
• Architecture
• New functionality in existing systems
• Structure or contents of external data
• Third party tools or components
• Performance issues
• User interface / experience / design
Experiements
• Worry less about correctness, completeness,
robustness and style.
• Focus on design / definition
• Is coupling minimized?
• Can you identify potential sources of
duplication?
Style Guides
• https://docs.puppetlabs.com/guides/style_gui
de.html
Test
• Loosely coupled systems easier to test –
interactions between components are limited.
– Unit testing is easier
– Test in CI pipeline
• Beaker / rspect / puppet lint
Refactor
• Avoid code rot. Don’t let bad code fester and
turn all your code into abandonware
It’s code
• Version control
• Test
• Refactor
• Share.
• forge
Module Template
• Puppet Module Generate – use the boiler
plate
• Use Garethr’s boiler plate – nice & updated
https://github.com/garethr/puppet-module-
skeleton (more assumptions though)
Data Separation
• Some use hiera.. Me no like
• ENC
– Puppet PE
– Foreman
– Homebrew
– ?
• Single source of truth? How?
Parameterized Classes
• Great for ENCs
• Easy to set default values
• Portable / Shareable
Class Inheritance
• Use within a module to reduce repetition
(DRY)
• Inheriting from other modules decreases
modularity, but hard to avoid
– ENC confusion
Code Defensively
• Catch unexpected events before they break
things – gracefully bow out if you don’t
support platform
• Puppet Future parser helps –
– Line error failure reporting
– Type checking (out of stdlib)
I wish
• More modules exposed puppet resources
• Augeus (or similar) was internalized across
every platform so there was an easy meta
catalog instead of is osfamily = yaddy yaddy
yadda
• Open source puppet had strong direction.. 3.7
PE is out.. What next for OS?
Discussions
• I’m out of slides, time for interaction

More Related Content

What's hot

Selenium Camp 2016 - Effective UI tests scaling on Java
Selenium Camp 2016 - Effective UI tests scaling on JavaSelenium Camp 2016 - Effective UI tests scaling on Java
Selenium Camp 2016 - Effective UI tests scaling on JavaSergey Korol
 
Java design patterns
Java design patternsJava design patterns
Java design patternsBrian Zitzow
 
Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...Danny Mulligan
 
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...Ashwin Reddy
 
AATC2016: Exploratory testing an API
AATC2016: Exploratory testing an APIAATC2016: Exploratory testing an API
AATC2016: Exploratory testing an APIMaaret Pyhäjärvi
 

What's hot (6)

Lrug
LrugLrug
Lrug
 
Selenium Camp 2016 - Effective UI tests scaling on Java
Selenium Camp 2016 - Effective UI tests scaling on JavaSelenium Camp 2016 - Effective UI tests scaling on Java
Selenium Camp 2016 - Effective UI tests scaling on Java
 
Java design patterns
Java design patternsJava design patterns
Java design patterns
 
Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...Austin Python Learners Meetup - Everything you need to know about programming...
Austin Python Learners Meetup - Everything you need to know about programming...
 
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...
An Experimentation Toolkit for Robotics Control and Manipulation Tasks using ...
 
AATC2016: Exploratory testing an API
AATC2016: Exploratory testing an APIAATC2016: Exploratory testing an API
AATC2016: Exploratory testing an API
 

Similar to ATXPUG Managing Puppet Complexity

Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet
 
PuppetCamp Austin 2015 Talk - Getting started with puppet
PuppetCamp Austin 2015 Talk - Getting started with puppetPuppetCamp Austin 2015 Talk - Getting started with puppet
PuppetCamp Austin 2015 Talk - Getting started with puppetByron Miller
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...SQALab
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...garrett honeycutt
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentationBhavin Gandhi
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with DatabasesStephen Ritchie
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreDan Poltawski
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programmingJuggernaut Liu
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015Jeremy Brown
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleNoam Kfir
 
Guide to Destroying Codebases The Demise of Clever Code
Guide to Destroying Codebases   The Demise of Clever CodeGuide to Destroying Codebases   The Demise of Clever Code
Guide to Destroying Codebases The Demise of Clever CodeGabor Varadi
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒StephaneBoghossian1
 
Modern Module Development
Modern Module DevelopmentModern Module Development
Modern Module Development_morgan
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 

Similar to ATXPUG Managing Puppet Complexity (20)

Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with Puppet
 
PuppetCamp Austin 2015 Talk - Getting started with puppet
PuppetCamp Austin 2015 Talk - Getting started with puppetPuppetCamp Austin 2015 Talk - Getting started with puppet
PuppetCamp Austin 2015 Talk - Getting started with puppet
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
Java and the JVM
Java and the JVMJava and the JVM
Java and the JVM
 
Automated Testing with Databases
Automated Testing with DatabasesAutomated Testing with Databases
Automated Testing with Databases
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Php traits
Php traitsPhp traits
Php traits
 
Reading Notes : the practice of programming
Reading Notes : the practice of programmingReading Notes : the practice of programming
Reading Notes : the practice of programming
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
Browser Fuzzing with a Twist (and a Shake) -- ZeroNights 2015
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black Hole
 
Guide to Destroying Codebases The Demise of Clever Code
Guide to Destroying Codebases   The Demise of Clever CodeGuide to Destroying Codebases   The Demise of Clever Code
Guide to Destroying Codebases The Demise of Clever Code
 
Terraform training - Modules 🎒
Terraform training - Modules 🎒Terraform training - Modules 🎒
Terraform training - Modules 🎒
 
Modern Module Development
Modern Module DevelopmentModern Module Development
Modern Module Development
 
Design_Patterns_Dr.CM.ppt
Design_Patterns_Dr.CM.pptDesign_Patterns_Dr.CM.ppt
Design_Patterns_Dr.CM.ppt
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 

Recently uploaded

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

ATXPUG Managing Puppet Complexity

  • 1. Austin Puppet Users Group (ATXPUG) Managing Puppet Complexity
  • 2. Modules & Complexity Complexity is generally used to characterize something with many parts where those parts interact with each other in multiple ways.
  • 3. Style • Make quality a requirement • Know when to stop (don’t over optimize) • DRY – Don’t Repeat Yourself
  • 4. DRY – Don’t repeat yourself • Imposed Duplication – Apparent lack of choice • Inadvertent Duplication – Not realize that they’re duplicating information • Impatient Duplication – lazy / duplicate because it seems easier • Interdeveloper Duplication – Multiple people on teams / multiple teams.
  • 5. Code • Keep low level knowledge in code • Reserve Comments for high level expectations • Foster an environment where it’s easier to find and reuse existing stuff than to write it yourself.
  • 6. Avoid Global data • Every time you reference global data it ties you to the other components that share data – frowned upon since 2.x days but still in a lot of puppet code
  • 7. Orthogonal - Safe to Fail • Independent / lightly coupled systems – Eliminates effects of unrelated things – Design self contained things • Increased productivity & contained risk
  • 8. Prototype (experiment) • Architecture • New functionality in existing systems • Structure or contents of external data • Third party tools or components • Performance issues • User interface / experience / design
  • 9. Experiements • Worry less about correctness, completeness, robustness and style. • Focus on design / definition • Is coupling minimized? • Can you identify potential sources of duplication?
  • 11. Test • Loosely coupled systems easier to test – interactions between components are limited. – Unit testing is easier – Test in CI pipeline • Beaker / rspect / puppet lint
  • 12. Refactor • Avoid code rot. Don’t let bad code fester and turn all your code into abandonware
  • 13. It’s code • Version control • Test • Refactor • Share. • forge
  • 14. Module Template • Puppet Module Generate – use the boiler plate • Use Garethr’s boiler plate – nice & updated https://github.com/garethr/puppet-module- skeleton (more assumptions though)
  • 15. Data Separation • Some use hiera.. Me no like • ENC – Puppet PE – Foreman – Homebrew – ? • Single source of truth? How?
  • 16. Parameterized Classes • Great for ENCs • Easy to set default values • Portable / Shareable
  • 17. Class Inheritance • Use within a module to reduce repetition (DRY) • Inheriting from other modules decreases modularity, but hard to avoid – ENC confusion
  • 18. Code Defensively • Catch unexpected events before they break things – gracefully bow out if you don’t support platform • Puppet Future parser helps – – Line error failure reporting – Type checking (out of stdlib)
  • 19. I wish • More modules exposed puppet resources • Augeus (or similar) was internalized across every platform so there was an easy meta catalog instead of is osfamily = yaddy yaddy yadda • Open source puppet had strong direction.. 3.7 PE is out.. What next for OS?
  • 20. Discussions • I’m out of slides, time for interaction