SlideShare ist ein Scribd-Unternehmen logo
1 von 84
Downloaden Sie, um offline zu lesen
Forging Great Modules:
Standards,Tools and Patterns
Ryan Coleman
Product Owner | Puppet Labs
@ryanycoleman
Friday, August 23, 13
puppetconf.com #puppetconf
Outline
• What’s Forge & What’s There
• Where the Forge is Going
• Module Writing Practices and Tips
Friday, August 23, 13
What is the Puppet Forge?
Just the basics
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
$ puppet help module
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
The Puppet Forge Team
Professional Blacksmiths
Friday, August 23, 13
puppetconf.com #puppetconf
Ryan Coleman
Product Owner
Friday, August 23, 13
puppetconf.com #puppetconf
Melinda Campbell
User Experience Designer
Friday, August 23, 13
puppetconf.com #puppetconf
Alex Dreyer
Pieter Van De Brugen
Forge Engineering
Friday, August 23, 13
puppetconf.com #puppetconf
Hunter Haugen
Ashley Penney
Forge Module Engineering
Friday, August 23, 13
Recent Updates
Slowly but surely, we’re getting there!
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Top Ten Search Terms
Friday, August 23, 13
puppetconf.com #puppetconf
Puppet Labs Module Engineering
Friday, August 23, 13
Coming Soon
to a forge near you
Friday, August 23, 13
puppetconf.com #puppetconf
Quality Over Quantity
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
• Module Quality
Design Jam
• Friday 4:20 - 6:00
• Hunt (Mezzanine
Level)
• http://sched.co/
17fAJn7
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Tools built with the Forge API
• Geppetto IDE
• librarian-puppet
• `puppet module`
• R10K
• MaestroDev Blacksmith
Friday, August 23, 13
Email me or talk to
me about the API!
ryan@puppetlabs.com
Friday, August 23, 13
puppetconf.com #puppetconf
Email ryan@puppetlabs.com for a Travis-driven preview
Friday, August 23, 13
puppetconf.com #puppetconf
GitHub
Flavored
Markdown on
Forge!
Friday, August 23, 13
puppetconf.com #puppetconf
Supported
Puppet Labs
Modules
Friday, August 23, 13
The Puppet Forge
Extended Family
Artisan and Apprentice Blacksmiths
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
CLI!
Ruby Code!
Functions!
Oh My!
Friday, August 23, 13
Development Tools
Friday, August 23, 13
Friday, August 23, 13
puppetconf.com #puppetconf
TextMate
w/Puppet!
Friday, August 23, 13
puppetconf.com #puppetconf
Vim
• vim-pathogen or vundle (for plugins)
• snipmate (like TextMate)
• tabular
• syntastic
• mv-vim-puppet
Friday, August 23, 13
Module Design Patterns
Some thoughts to guide you in the right direction
Friday, August 23, 13
puppetconf.com #puppetconf
Keep it modular
Friday, August 23, 13
An Example: PuppetDB
Friday, August 23, 13
Class Layout and Naming
the boring stuff
Friday, August 23, 13
puppetconf.com #puppetconf
Text
http://ruth-tay.deviantart.com/art/Hydra-121089045
Friday, August 23, 13
Public vs (pseudo) Private Classes
Friday, August 23, 13
puppetconf.com #puppetconf
Private classes should be discrete
Friday, August 23, 13
puppetconf.com #puppetconf
Public classes are for
parameters,
validation and
interacting with
private classes.
Friday, August 23, 13
https://github.com/stdmod/puppet-modules
A community-driven effort to standardize on param names
Friday, August 23, 13
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
The Style Guide
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
puppetconf.com #puppetconf
#PuppetCamp
Friday, August 23, 13
Style Guide Update Soon!
Email suggestions/feedback to ryan@puppetlabs.com
Friday, August 23, 13
Documentation
the most important part!
Friday, August 23, 13
puppetconf.com #puppetconf
Answer these questions
• What technology does your module
manage?
• What does it intend to do?
• How does it do it? (impact on the system)
• How should one use it?
Friday, August 23, 13
http://docs.puppetlabs.com/puppet/3/reference/
modules_documentation.html
Friday, August 23, 13
Module Testing
become a mad scientist!
Friday, August 23, 13
puppetconf.com #puppetconf
http://www.dsrsd.com/img/img_wwrw/Sewer_Web.png
Smoke Testing
Friday, August 23, 13
puppetconf.com #puppetconf
puppet apply ./tests/apache.pp
Friday, August 23, 13
puppetconf.com #puppetconf
http://www.pieterg.com/Media/277
Unit Testing
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
puppetconf.com #puppetconf
http://robots.thoughtbot.com/post/33771089985/rspec-integration-tests-with-capybara
Integration Testing
Friday, August 23, 13
puppetconf.com #puppetconf
Friday, August 23, 13
Versioning & Releasing
Friday, August 23, 13
puppetconf.com #puppetconf
Semantic Versioning
• Based on Major.Minor.Patch scheme
• X.0.0 Major version for breaking change
• 0.X.0 Minor version for new non-
breaking functionality
• 0.0.X Patch version for backwards
compatible bug fixes
Friday, August 23, 13
Data In-Modules
Overview & Call To Action
Friday, August 23, 13
puppetconf.com #puppetconf
Params.pp Meet
Hiera Data
./data/operatingsystem/
Amazon.yaml
Friday, August 23, 13
puppetconf.com #puppetconf
Why put Hiera in modules?
• Eliminate the params.pp pattern
• Allow for swappable data sets
• Introspect data in ruby code
• ??? <--- we need your help
Friday, August 23, 13
http://links.puppetlabs.com/bgtm
Friday, August 23, 13
Friday, August 23, 13
puppetconf.com #puppetconf
Network Too!
Friday, August 23, 13
puppetconf.com #puppetconf
• forge.puppetlabs.com/puppetlabs/gce_compute
• certname == GCE project ID
•
Friday, August 23, 13
Thank You
Ryan Coleman
Product Owner | Puppet Labs
@ryanycoleman
Collaborate. Automate. Ship.
Friday, August 23, 13
puppetconf.com #puppetconf
Don’t Forget...
• Beginners Guide to Writing Modules!
• links.puppetlabs.com/bgtm
• Design Jam on Module Quality
• http://sched.co/16C7ET3
• Spend your GCE Credit with our Module!
• http://forge.puppetlabs.com/puppetlabs/gce_compute
• forge.puppetlabs.com Ryan Coleman
Product Owner | Puppet Forge
@ryanycoleman
ryan@puppetlabs.com
Friday, August 23, 13

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (10)

Puppet-Practitioner
Puppet-PractitionerPuppet-Practitioner
Puppet-Practitioner
 
Modules and the Puppet Forge
Modules and the Puppet ForgeModules and the Puppet Forge
Modules and the Puppet Forge
 
Introducing Puppet Enterprise’s Event Inspector
Introducing Puppet Enterprise’s Event InspectorIntroducing Puppet Enterprise’s Event Inspector
Introducing Puppet Enterprise’s Event Inspector
 
Portable infrastructure with puppet
Portable infrastructure with puppetPortable infrastructure with puppet
Portable infrastructure with puppet
 
Monitoring Cast 1: Puppet & Zabbix
Monitoring Cast 1: Puppet & ZabbixMonitoring Cast 1: Puppet & Zabbix
Monitoring Cast 1: Puppet & Zabbix
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
 
Designing Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles PatternDesigning Puppet: Roles/Profiles Pattern
Designing Puppet: Roles/Profiles Pattern
 
Introduction to Puppet Enterprise
Introduction to Puppet EnterpriseIntroduction to Puppet Enterprise
Introduction to Puppet Enterprise
 

Ähnlich wie Forging Great Modules: Standards, Tools and Patterns - PuppetConf 2013

Unit testing like a pirate #wceu 2013
Unit testing like a pirate #wceu 2013Unit testing like a pirate #wceu 2013
Unit testing like a pirate #wceu 2013
Ptah Dunbar
 
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
Rob Reynolds
 
Unlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part IIUnlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part II
Wayne Walls
 

Ähnlich wie Forging Great Modules: Standards, Tools and Patterns - PuppetConf 2013 (12)

Getting Started with Puppet - PuppetConf 2013
Getting Started with Puppet - PuppetConf 2013Getting Started with Puppet - PuppetConf 2013
Getting Started with Puppet - PuppetConf 2013
 
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
Releasing Puppet: Automating Packaging for Many Platforms or 'Make all the th...
 
Infrastructure as Data - PuppetConf 2013
Infrastructure as Data - PuppetConf 2013Infrastructure as Data - PuppetConf 2013
Infrastructure as Data - PuppetConf 2013
 
DevOps Isn’t Just for WebOps: The Guerrilla’s Guide to Cultural Change
DevOps Isn’t Just for WebOps: The Guerrilla’s Guide to Cultural ChangeDevOps Isn’t Just for WebOps: The Guerrilla’s Guide to Cultural Change
DevOps Isn’t Just for WebOps: The Guerrilla’s Guide to Cultural Change
 
DSL Quest: A WAT Safari - PuppetConf 2013
DSL Quest: A WAT Safari - PuppetConf 2013DSL Quest: A WAT Safari - PuppetConf 2013
DSL Quest: A WAT Safari - PuppetConf 2013
 
How Puppet Labs Tests and Validates Puppet Enterprise
How Puppet Labs Tests and Validates Puppet EnterpriseHow Puppet Labs Tests and Validates Puppet Enterprise
How Puppet Labs Tests and Validates Puppet Enterprise
 
Inclusive and Accessible UX Practices: How Low-Fi Artifacts Promote Whole-Tea...
Inclusive and Accessible UX Practices: How Low-Fi Artifacts Promote Whole-Tea...Inclusive and Accessible UX Practices: How Low-Fi Artifacts Promote Whole-Tea...
Inclusive and Accessible UX Practices: How Low-Fi Artifacts Promote Whole-Tea...
 
Unit testing like a pirate #wceu 2013
Unit testing like a pirate #wceu 2013Unit testing like a pirate #wceu 2013
Unit testing like a pirate #wceu 2013
 
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
Puppet on Windows: Now You're Getting Chocolatey PuppetConf2013
 
Angular.js, Yeomon & Grunt
Angular.js, Yeomon & GruntAngular.js, Yeomon & Grunt
Angular.js, Yeomon & Grunt
 
CarrilloTomPCPDisc4
CarrilloTomPCPDisc4CarrilloTomPCPDisc4
CarrilloTomPCPDisc4
 
Unlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part IIUnlocked Workshop OSCON 2013 - Part II
Unlocked Workshop OSCON 2013 - Part II
 

Mehr von Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
Puppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
Puppet
 

Mehr von Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Forging Great Modules: Standards, Tools and Patterns - PuppetConf 2013