SlideShare une entreprise Scribd logo
1  sur  20
Creating beautiful 
Puppet modules 
with pupet-lint
$(whoami)
http://spuder.github.io 
#spuder
=> Packages 
=> Files 
=> Services
DSL? 
I’ve got dual T1 uplinks
$package=openssh-server 
if [`which yum`]; then 
yum install $package 
elif [`which apt-get`; then 
apt-get install $package 
else 
echo “Neither apt nor yum found”; exit 1 
fi
$package=openssh-server 
package { “$package”: 
ensure => present, 
}
class ssh { 
package {‘openssh-server’: 
manifest init.pp 
ensure => present, 
} 
file {‘/etc/ssh/sshd_config’: 
content => ‘puppet:///ssh/sshd_config', 
owner => ‘root’, 
require => Package[‘openssh-server’], 
} 
service {‘sshd’: 
ensure => ‘running’, 
require => [Package[‘openssh-server’],File[‘/etc/ssh/ssd_} 
}
$ puppet module generate foo-bar 
$ mv foo-bar bar #bug PUP-3124 
$ tree bar/ 
bar/ 
├── README.md 
├── files 
├── manifests 
│ └── init.pp 
├── metadata.json 
├── spec 
├── templates 
└── tests 
└── init.pp 
bar module layout
Name your puppet 
modules
There are two hard things in computer science: 
- cache invalidation 
- naming things 
- off-by-one errors. 
- Phil Karlton
Wrapper Module => devops/ac_mysql 
Base Module => puppetlabs/mysql 
http://bit.do/wrapper-class
Workshop 1 
https://github.com/UCPUG/ucpug-presentations
Puppet-lint
$ puppet parser validate *.pp 
$ puppet-lint *.pp 
alias ppv='puppet parser validate' 
alias ppl='puppet lint --no-80chars-check'
Workshop 2 
https://github.com/UCPUG/ucpug-presentations
Questions?

Contenu connexe

Tendances

Tendances (19)

Tutorial Puppet
Tutorial PuppetTutorial Puppet
Tutorial Puppet
 
Haskell Packageのdeb化
Haskell Packageのdeb化Haskell Packageのdeb化
Haskell Packageのdeb化
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
 
Mule ESB : ssh connector
Mule ESB : ssh connectorMule ESB : ssh connector
Mule ESB : ssh connector
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Virtualbox and Mysql
Virtualbox and MysqlVirtualbox and Mysql
Virtualbox and Mysql
 
Clojure + MongoDB on Heroku
Clojure + MongoDB on HerokuClojure + MongoDB on Heroku
Clojure + MongoDB on Heroku
 
Sessions and cookies in php
Sessions and cookies in phpSessions and cookies in php
Sessions and cookies in php
 
How to send files to remote server via ssh in php
How to send files to remote server via ssh in phpHow to send files to remote server via ssh in php
How to send files to remote server via ssh in php
 
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com PuppetDevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
 
Phishing for Root (How I Got Access to Root on Your Computer With 8 Seconds o...
Phishing for Root (How I Got Access to Root on Your Computer With 8 Seconds o...Phishing for Root (How I Got Access to Root on Your Computer With 8 Seconds o...
Phishing for Root (How I Got Access to Root on Your Computer With 8 Seconds o...
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetPuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By Vishnu
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpad
 
Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015Drupal cambs ansible for drupal april 2015
Drupal cambs ansible for drupal april 2015
 
Python & FUSE
Python & FUSEPython & FUSE
Python & FUSE
 

En vedette

Mga sinaunang kabihasnan sa india
Mga sinaunang kabihasnan sa indiaMga sinaunang kabihasnan sa india
Mga sinaunang kabihasnan sa india
Jared Ram Juezan
 

En vedette (9)

Mga panlilinlang
Mga panlilinlangMga panlilinlang
Mga panlilinlang
 
The Story Of Rama And Sita
The Story Of Rama And SitaThe Story Of Rama And Sita
The Story Of Rama And Sita
 
India
IndiaIndia
India
 
Filipino 9 Elemento ng Elehiya
Filipino 9 Elemento ng ElehiyaFilipino 9 Elemento ng Elehiya
Filipino 9 Elemento ng Elehiya
 
India - Truth Alone Triumphs
India - Truth Alone TriumphsIndia - Truth Alone Triumphs
India - Truth Alone Triumphs
 
Mga sinaunang kabihasnan sa india
Mga sinaunang kabihasnan sa indiaMga sinaunang kabihasnan sa india
Mga sinaunang kabihasnan sa india
 
Filipino 9 Parabula
Filipino 9 ParabulaFilipino 9 Parabula
Filipino 9 Parabula
 
Filipino 9 Epiko ni Rama at Sita
Filipino 9 Epiko ni Rama at SitaFilipino 9 Epiko ni Rama at Sita
Filipino 9 Epiko ni Rama at Sita
 
India Presentation
India PresentationIndia Presentation
India Presentation
 

Similaire à Creating beautiful puppet modules with puppet-lint

Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
Michael Peacock
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
Carlos Sanchez
 
Alessandro sf 2010
Alessandro sf 2010Alessandro sf 2010
Alessandro sf 2010
Puppet
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
garrett honeycutt
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
Ranjit Avasarala
 

Similaire à Creating beautiful puppet modules with puppet-lint (20)

Puppet: What _not_ to do
Puppet: What _not_ to doPuppet: What _not_ to do
Puppet: What _not_ to do
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
Puppet
PuppetPuppet
Puppet
 
ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Stanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet ModulesStanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet Modules
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
 
Alessandro sf 2010
Alessandro sf 2010Alessandro sf 2010
Alessandro sf 2010
 
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
 
Puppet fundamentals
Puppet fundamentalsPuppet fundamentals
Puppet fundamentals
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 

Dernier

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Creating beautiful puppet modules with puppet-lint