SlideShare a Scribd company logo
1 of 34
Download to read offline
;
Testing your puppet codeTesting your puppet code
Julien PivottoJulien Pivotto
Libre Software Meeting 2013Libre Software Meeting 2013
July 15, 2013July 15, 2013
;
Introduction
Testing tools
Jenkins
Conclusion
1 Introduction
Automation
Vagrant
Puppet in a large scale
Puppet code
2 Testing tools
Style and linting
Catalogs
rspec-puppet
3 Jenkins
4 Conclusion
Homework
Conclusion
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Julien PivottoJulien Pivotto
• sysadmin @ inuitssysadmin @ inuits
• open-source defender for 7+ yearsopen-source defender for 7+ years
• devops believerdevops believer
• @roidelapluie on twitter/github@roidelapluie on twitter/github
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Infrastructure as Code
• Keep your environments under SCMKeep your environments under SCM
• Overview of complete environmentsOverview of complete environments
• Reduce the deployment timeReduce the deployment time
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Keep all environments the same
http://www.flickr.com/photos/bobvietnam/4828291896/
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Packaging with FPM
• Ruby gemRuby gem
• package a directory (and much more)package a directory (and much more)
• Support .deb, .rpmSupport .deb, .rpm
• Package the code with several prefixesPackage the code with several prefixes
• /etc/puppet/environments/infradev/etc/puppet/environments/infradev
• /etc/puppet/environments/uat/etc/puppet/environments/uat
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Vagrant
• Create virtual machinesCreate virtual machines
• Provision themProvision them
• Destroy & recreateDestroy & recreate
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Vagrant
• Chef, scripts, puppet, . . .Chef, scripts, puppet, . . .
• Backend: Virtualbox, KVM, . . .Backend: Virtualbox, KVM, . . .
• A lot of baseboxes availableA lot of baseboxes available
• http://vagrantup.comhttp://vagrantup.com
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Vagrant
• Local testingLocal testing
• The same environment as the targetThe same environment as the target
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Puppet environments
• Multiple environmentsMultiple environments
• The same tree for all the environmentsThe same tree for all the environments
• Pushing changes to UAT/prod on-demandPushing changes to UAT/prod on-demand
• Small changes vs big releasesSmall changes vs big releases
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Hiera
• Storing the data in Hiera(-gpg)Storing the data in Hiera(-gpg)
• Usernames, password, IP addressesUsernames, password, IP addresses
• Hiera is made to be structuredHiera is made to be structured
• Using one hiera repo for all the environmentsUsing one hiera repo for all the environments
• Using Hiera in your manifests, not in your modulesUsing Hiera in your manifests, not in your modules
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Hiera tree
• %{environment}/%{hostname}%{environment}/%{hostname}
• %{environment}/common%{environment}/common
• infradev/www45.yamlinfradev/www45.yaml
• infradev/common.yamlinfradev/common.yaml
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Keeping clean puppet modules
http://www.flickr.com/photos/aurelie_solenne/8340968061/
• Make them readableMake them readable
• Make them reusable and sharableMake them reusable and sharable
• Don’t puppetize everythingDon’t puppetize everything
• User generated content is not puppetizedUser generated content is not puppetized
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Use the right structure for your modules
• Package, config, servicePackage, config, service
• module::package, module::config, module::servicemodule::package, module::config, module::service
• Parameterized classesParameterized classes
http://www.slideshare.net/PuppetLabs/modern-module-development-ken-barber-2012-edinburgh-
puppet-camp
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Distribution-agnostic puppet modules
• You don’t have to support all the distrosYou don’t have to support all the distros
• Adding support for another distro should be easyAdding support for another distro should be easy
$config_dir = $configroot ? {
undef => $::operatingsystem ? {
/Debian|Ubuntu/ => ’/etc/apache2’,
/CentOS|RedHat/ => ’/etc/httpd’,
default => ’/etc/httpd’,
},
default => $configroot,
}
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Automation
Vagrant
Puppet in a large scale
Puppet code
Puppet function
• The fail function prevents catalog to be appliedThe fail function prevents catalog to be applied
• The notify function prints a warningThe notify function prints a warning
if (!$leftsubnet) and (!$leftsubnets) {
fail(’$leftsubnets and $leftsubnet both empty’)
}
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
Puppet parser
• Included in puppetIncluded in puppet
• Validating the syntaxValidating the syntax
• puppet parser validate init.pppuppet parser validate init.pp
• find . -name ’*.pp’ -exec puppet parser validate
+ ;
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
Puppet lint
http://www.flickr.com/photos/voyages-provence/8127668094/
• Follow the puppet style guideFollow the puppet style guide
• Two-space soft tabTwo-space soft tab
• align fat comma arrows (=>) within blocks of attributesalign fat comma arrows (=>) within blocks of attributes
• http://docs.puppetlabs.com/guides/style_guide.htmlhttp://docs.puppetlabs.com/guides/style_guide.html
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
Cucumber puppet
• Write scenariosWrite scenarios
• Easy to read (full sentences)Easy to read (full sentences)
• Use your manifestsUse your manifests
• Need some tricks to work with Puppet 3Need some tricks to work with Puppet 3
• DiscontinuedDiscontinued
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
Cucumber example
Cucumber
Feature: General catalog policy
In order to ensure applicability of a host’s catalog
As a manifest developer
I want all catalogs to obey some general rules
Scenario Outline: Compile and verify catalog
Given a node specified by "features/yaml/<hostname>."
When I compile its catalog
Then compilation should succeed
And all resource dependencies should resolve
Examples:
| hostname |
| localhost |
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
rspec-puppet
• Check what is the behaviour of puppetCheck what is the behaviour of puppet
• Separate tests per modulesSeparate tests per modules
• Add context, facts, . . .Add context, facts, . . .
• Test custom functions, hosts, manifests, . . .Test custom functions, hosts, manifests, . . .
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
rspec-puppet
Start with rspec puppet
gem install rspec-puppet
gem install puppet
cd my-module
rspec-puppet-init
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
rspec-puppet
spec/defines/connection_spec.rb
require ’spec_helper’
describe ’openswan::connection’ do
describe ’should require rightsubnet or rightsubnets’ do
let(:title) { ’foobar’ }
let (:params) { {
:ike => ’aes256-sha1;modp1024’,
:esp => ’aes256-sha1;modp1024’,
:leftsubnet => ’8.8.5.5’,
:right => ’84.54.105.5’,
:left => ’68.65.98.6’,
:foreignip => ’45.25.5.5’,
:localtestip => ’82.8.8.8’, } }
it do
expect {
should contain_file("/etc/ipsec.d/foobar.conf")
}.to raise_error(Puppet::Error, /$rightsubnets and $rightsubnet cannot be both empty/)
end
end
end
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
rspec-puppet
Second example
require ’spec_helper’
describe ’apache’, :type => :class do
let (:facts) { {
:operatingsystem => ’CentOS’,
:osfamily => ’RedHat’,
} }
describe ’without parameters’ do
it { should create_class(’apache’) }
it { should include_class(’apache::service’) }
it { should contain_apache__listen(’80’) }
it { should contain_apache__namevhost(’80’) }
end
end
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Style and linting
Catalogs
rspec-puppet
rspec-puppet
• should, should_notshould, should_not
• should contain_packageshould contain_package
• contain_foo__bar(’baz’) (for foo::bar)contain_foo__bar(’baz’) (for foo::bar)
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Integration with jenkins
• Pulling, testing and deploymentsPulling, testing and deployments
• Push-Test-Package-DeployPush-Test-Package-Deploy
• Continuous integrationContinuous integration
• Continuous deliveryContinuous delivery
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Jenkins pipelines
• Build pipelinesBuild pipelines
• Overview of what happensOverview of what happens
• Getting notified about what failedGetting notified about what failed
• Promoted build pluginPromoted build plugin
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Jenkins pipelines
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Advantages of CI
• You trust your codeYou trust your code
• ReproducabilityReproducability
• You get metrics: number of warning, . . .You get metrics: number of warning, . . .
• You have a backlogYou have a backlog
• It is easy!It is easy!
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Promotions
• Provides buttons you can clickProvides buttons you can click
• Trigger actionsTrigger actions
• deploy to other environmentsdeploy to other environments
• Get a mail with the changesGet a mail with the changes
• Have a log of who deployedHave a log of who deployed
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Promotions
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Homework
Conclusion
Homework
• Integrating tests with git hooksIntegrating tests with git hooks
• Integrating tests with VIIntegrating tests with VI
• github.com/philandstuff/fizzgiggithub.com/philandstuff/fizzgig
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Homework
Conclusion
Conclusion
• Use nice & simple Puppet modulesUse nice & simple Puppet modules
• Continuous integrationContinuous integration
• Multiple environmentsMultiple environments
• Readability & reusabilityReadability & reusability
• Tools exist and work togetherTools exist and work together
Julien Pivotto Testing your puppet code
;
Introduction
Testing tools
Jenkins
Conclusion
Homework
Conclusion
Contact
Julien PivottoJulien Pivotto
julien@inuits.eujulien@inuits.eu
@roidelapluie@roidelapluie
INUITS bvbaINUITS bvba
Duboisstraat 50Duboisstraat 50
2060 Antwerp2060 Antwerp
BelgiumBelgium
+32 473 441 636+32 473 441 636
https://inuits.euhttps://inuits.eu
Julien Pivotto Testing your puppet code

More Related Content

What's hot

Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...Puppet
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureYury Tsarev
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Getting the maximum out of systemd
Getting the maximum out of systemdGetting the maximum out of systemd
Getting the maximum out of systemdJulien Pivotto
 
Test Driven Development with Puppet
Test Driven Development with Puppet Test Driven Development with Puppet
Test Driven Development with Puppet Puppet
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Chef
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Puppet
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Puppet
 
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, PuppetPuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, PuppetPuppet
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T Puppet
 
Jenkins Shared Libraries
Jenkins Shared LibrariesJenkins Shared Libraries
Jenkins Shared LibrariesXPeppers
 
Cooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesCooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesSergey Dzyuban
 
2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting WorkshopSimon Bennetts
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins AutomationJulien Pivotto
 
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Aaron Meurer
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with PuppetMiguel Zuniga
 

What's hot (20)

Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
Workshop: Know Before You Push 'Go': Using the Beaker Acceptance Test Framewo...
 
ContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven InfrastructureContainerCon - Test Driven Infrastructure
ContainerCon - Test Driven Infrastructure
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Getting the maximum out of systemd
Getting the maximum out of systemdGetting the maximum out of systemd
Getting the maximum out of systemd
 
Test Driven Development with Puppet
Test Driven Development with Puppet Test Driven Development with Puppet
Test Driven Development with Puppet
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
 
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, PuppetPuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
 
Jenkins Shared Libraries
Jenkins Shared LibrariesJenkins Shared Libraries
Jenkins Shared Libraries
 
Cooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesCooking the Cake for Nuget packages
Cooking the Cake for Nuget packages
 
2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
State of the Jenkins Automation
State of the Jenkins AutomationState of the Jenkins Automation
State of the Jenkins Automation
 
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
Conda: A Cross-Platform Package Manager for Any Binary Distribution (SciPy 2014)
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
 

Viewers also liked

Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Puppet
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...Puppet
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Puppet
 
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12Puppet
 
Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Timothy Spann
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSBamdad Dashtban
 

Viewers also liked (7)

Power of Puppet 4
Power of Puppet 4Power of Puppet 4
Power of Puppet 4
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
Continuous Development with Jenkins - Stephen Connolly at PuppetCamp Dublin '12
 
Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 

Similar to Testing your puppet code

Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Swiss Big Data User Group
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as CodeKris Buytaert
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Complete python toolbox for modern developers
Complete python toolbox for modern developersComplete python toolbox for modern developers
Complete python toolbox for modern developersJan Giacomelli
 
20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortestingKazuhiro Oinuma
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...Yury Bushmelev
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvMarkus Zapke-Gründemann
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodeKris Buytaert
 
Automating MySQL operations with Puppet
Automating MySQL operations with PuppetAutomating MySQL operations with Puppet
Automating MySQL operations with PuppetKris Buytaert
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development WorkflowJeffery Smith
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseMaarten Balliauw
 
Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Kris Buytaert
 
Smarter deployments with octopus deploy
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deployThibaud Gravrand
 
Testing your infallibleness
Testing your infalliblenessTesting your infallibleness
Testing your infalliblenessCorey Osman
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopOlinData
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopPuppet
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 

Similar to Testing your puppet code (20)

Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as Code
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Complete python toolbox for modern developers
Complete python toolbox for modern developersComplete python toolbox for modern developers
Complete python toolbox for modern developers
 
20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting20120524 english lt2_pythontoolsfortesting
20120524 english lt2_pythontoolsfortesting
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
Automating MySQL operations with Puppet
Automating MySQL operations with PuppetAutomating MySQL operations with Puppet
Automating MySQL operations with Puppet
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development Workflow
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Organize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterpriseOrganize your chickens: NuGet for the enterprise
Organize your chickens: NuGet for the enterprise
 
Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.
 
Smarter deployments with octopus deploy
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deploy
 
Testing your infallibleness
Testing your infalliblenessTesting your infallibleness
Testing your infallibleness
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 

More from Julien Pivotto

What's New in Prometheus and Its Ecosystem
What's New in Prometheus and Its EcosystemWhat's New in Prometheus and Its Ecosystem
What's New in Prometheus and Its EcosystemJulien Pivotto
 
Prometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingPrometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingJulien Pivotto
 
What's new in Prometheus?
What's new in Prometheus?What's new in Prometheus?
What's new in Prometheus?Julien Pivotto
 
Introduction to Grafana Loki
Introduction to Grafana LokiIntroduction to Grafana Loki
Introduction to Grafana LokiJulien Pivotto
 
Why you should revisit mgmt
Why you should revisit mgmtWhy you should revisit mgmt
Why you should revisit mgmtJulien Pivotto
 
Observing the HashiCorp Ecosystem From Prometheus
Observing the HashiCorp Ecosystem From PrometheusObserving the HashiCorp Ecosystem From Prometheus
Observing the HashiCorp Ecosystem From PrometheusJulien Pivotto
 
Monitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusMonitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusJulien Pivotto
 
5 tips for Prometheus Service Discovery
5 tips for Prometheus Service Discovery5 tips for Prometheus Service Discovery
5 tips for Prometheus Service DiscoveryJulien Pivotto
 
Prometheus and TLS - an Introduction
Prometheus and TLS - an IntroductionPrometheus and TLS - an Introduction
Prometheus and TLS - an IntroductionJulien Pivotto
 
Powerful graphs in Grafana
Powerful graphs in GrafanaPowerful graphs in Grafana
Powerful graphs in GrafanaJulien Pivotto
 
HAProxy as Egress Controller
HAProxy as Egress ControllerHAProxy as Egress Controller
HAProxy as Egress ControllerJulien Pivotto
 
Improved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and AlertmanagerImproved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and AlertmanagerJulien Pivotto
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with KeycloakJulien Pivotto
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaborationJulien Pivotto
 
Incident Resolution as Code
Incident Resolution as CodeIncident Resolution as Code
Incident Resolution as CodeJulien Pivotto
 
Monitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusMonitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusJulien Pivotto
 
Monitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusMonitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusJulien Pivotto
 
An introduction to Ansible
An introduction to AnsibleAn introduction to Ansible
An introduction to AnsibleJulien Pivotto
 

More from Julien Pivotto (20)

The O11y Toolkit
The O11y ToolkitThe O11y Toolkit
The O11y Toolkit
 
What's New in Prometheus and Its Ecosystem
What's New in Prometheus and Its EcosystemWhat's New in Prometheus and Its Ecosystem
What's New in Prometheus and Its Ecosystem
 
Prometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is comingPrometheus: What is is, what is new, what is coming
Prometheus: What is is, what is new, what is coming
 
What's new in Prometheus?
What's new in Prometheus?What's new in Prometheus?
What's new in Prometheus?
 
Introduction to Grafana Loki
Introduction to Grafana LokiIntroduction to Grafana Loki
Introduction to Grafana Loki
 
Why you should revisit mgmt
Why you should revisit mgmtWhy you should revisit mgmt
Why you should revisit mgmt
 
Observing the HashiCorp Ecosystem From Prometheus
Observing the HashiCorp Ecosystem From PrometheusObserving the HashiCorp Ecosystem From Prometheus
Observing the HashiCorp Ecosystem From Prometheus
 
Monitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusMonitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with Prometheus
 
5 tips for Prometheus Service Discovery
5 tips for Prometheus Service Discovery5 tips for Prometheus Service Discovery
5 tips for Prometheus Service Discovery
 
Prometheus and TLS - an Introduction
Prometheus and TLS - an IntroductionPrometheus and TLS - an Introduction
Prometheus and TLS - an Introduction
 
Powerful graphs in Grafana
Powerful graphs in GrafanaPowerful graphs in Grafana
Powerful graphs in Grafana
 
YAML Magic
YAML MagicYAML Magic
YAML Magic
 
HAProxy as Egress Controller
HAProxy as Egress ControllerHAProxy as Egress Controller
HAProxy as Egress Controller
 
Improved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and AlertmanagerImproved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and Alertmanager
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
 
Incident Resolution as Code
Incident Resolution as CodeIncident Resolution as Code
Incident Resolution as Code
 
Monitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusMonitor your CentOS stack with Prometheus
Monitor your CentOS stack with Prometheus
 
Monitor your CentOS stack with Prometheus
Monitor your CentOS stack with PrometheusMonitor your CentOS stack with Prometheus
Monitor your CentOS stack with Prometheus
 
An introduction to Ansible
An introduction to AnsibleAn introduction to Ansible
An introduction to Ansible
 

Recently uploaded

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 

Recently uploaded (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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
 

Testing your puppet code

  • 1. ; Testing your puppet codeTesting your puppet code Julien PivottoJulien Pivotto Libre Software Meeting 2013Libre Software Meeting 2013 July 15, 2013July 15, 2013
  • 2. ; Introduction Testing tools Jenkins Conclusion 1 Introduction Automation Vagrant Puppet in a large scale Puppet code 2 Testing tools Style and linting Catalogs rspec-puppet 3 Jenkins 4 Conclusion Homework Conclusion Julien Pivotto Testing your puppet code
  • 3. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Julien PivottoJulien Pivotto • sysadmin @ inuitssysadmin @ inuits • open-source defender for 7+ yearsopen-source defender for 7+ years • devops believerdevops believer • @roidelapluie on twitter/github@roidelapluie on twitter/github Julien Pivotto Testing your puppet code
  • 4. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Infrastructure as Code • Keep your environments under SCMKeep your environments under SCM • Overview of complete environmentsOverview of complete environments • Reduce the deployment timeReduce the deployment time Julien Pivotto Testing your puppet code
  • 5. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Keep all environments the same http://www.flickr.com/photos/bobvietnam/4828291896/ Julien Pivotto Testing your puppet code
  • 6. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Packaging with FPM • Ruby gemRuby gem • package a directory (and much more)package a directory (and much more) • Support .deb, .rpmSupport .deb, .rpm • Package the code with several prefixesPackage the code with several prefixes • /etc/puppet/environments/infradev/etc/puppet/environments/infradev • /etc/puppet/environments/uat/etc/puppet/environments/uat Julien Pivotto Testing your puppet code
  • 7. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Vagrant • Create virtual machinesCreate virtual machines • Provision themProvision them • Destroy & recreateDestroy & recreate Julien Pivotto Testing your puppet code
  • 8. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Vagrant • Chef, scripts, puppet, . . .Chef, scripts, puppet, . . . • Backend: Virtualbox, KVM, . . .Backend: Virtualbox, KVM, . . . • A lot of baseboxes availableA lot of baseboxes available • http://vagrantup.comhttp://vagrantup.com Julien Pivotto Testing your puppet code
  • 9. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Vagrant • Local testingLocal testing • The same environment as the targetThe same environment as the target Julien Pivotto Testing your puppet code
  • 10. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Puppet environments • Multiple environmentsMultiple environments • The same tree for all the environmentsThe same tree for all the environments • Pushing changes to UAT/prod on-demandPushing changes to UAT/prod on-demand • Small changes vs big releasesSmall changes vs big releases Julien Pivotto Testing your puppet code
  • 11. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Hiera • Storing the data in Hiera(-gpg)Storing the data in Hiera(-gpg) • Usernames, password, IP addressesUsernames, password, IP addresses • Hiera is made to be structuredHiera is made to be structured • Using one hiera repo for all the environmentsUsing one hiera repo for all the environments • Using Hiera in your manifests, not in your modulesUsing Hiera in your manifests, not in your modules Julien Pivotto Testing your puppet code
  • 12. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Hiera tree • %{environment}/%{hostname}%{environment}/%{hostname} • %{environment}/common%{environment}/common • infradev/www45.yamlinfradev/www45.yaml • infradev/common.yamlinfradev/common.yaml Julien Pivotto Testing your puppet code
  • 13. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Keeping clean puppet modules http://www.flickr.com/photos/aurelie_solenne/8340968061/ • Make them readableMake them readable • Make them reusable and sharableMake them reusable and sharable • Don’t puppetize everythingDon’t puppetize everything • User generated content is not puppetizedUser generated content is not puppetized Julien Pivotto Testing your puppet code
  • 14. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Use the right structure for your modules • Package, config, servicePackage, config, service • module::package, module::config, module::servicemodule::package, module::config, module::service • Parameterized classesParameterized classes http://www.slideshare.net/PuppetLabs/modern-module-development-ken-barber-2012-edinburgh- puppet-camp Julien Pivotto Testing your puppet code
  • 15. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Distribution-agnostic puppet modules • You don’t have to support all the distrosYou don’t have to support all the distros • Adding support for another distro should be easyAdding support for another distro should be easy $config_dir = $configroot ? { undef => $::operatingsystem ? { /Debian|Ubuntu/ => ’/etc/apache2’, /CentOS|RedHat/ => ’/etc/httpd’, default => ’/etc/httpd’, }, default => $configroot, } Julien Pivotto Testing your puppet code
  • 16. ; Introduction Testing tools Jenkins Conclusion Automation Vagrant Puppet in a large scale Puppet code Puppet function • The fail function prevents catalog to be appliedThe fail function prevents catalog to be applied • The notify function prints a warningThe notify function prints a warning if (!$leftsubnet) and (!$leftsubnets) { fail(’$leftsubnets and $leftsubnet both empty’) } Julien Pivotto Testing your puppet code
  • 17. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet Puppet parser • Included in puppetIncluded in puppet • Validating the syntaxValidating the syntax • puppet parser validate init.pppuppet parser validate init.pp • find . -name ’*.pp’ -exec puppet parser validate + ; Julien Pivotto Testing your puppet code
  • 18. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet Puppet lint http://www.flickr.com/photos/voyages-provence/8127668094/ • Follow the puppet style guideFollow the puppet style guide • Two-space soft tabTwo-space soft tab • align fat comma arrows (=>) within blocks of attributesalign fat comma arrows (=>) within blocks of attributes • http://docs.puppetlabs.com/guides/style_guide.htmlhttp://docs.puppetlabs.com/guides/style_guide.html Julien Pivotto Testing your puppet code
  • 19. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet Cucumber puppet • Write scenariosWrite scenarios • Easy to read (full sentences)Easy to read (full sentences) • Use your manifestsUse your manifests • Need some tricks to work with Puppet 3Need some tricks to work with Puppet 3 • DiscontinuedDiscontinued Julien Pivotto Testing your puppet code
  • 20. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet Cucumber example Cucumber Feature: General catalog policy In order to ensure applicability of a host’s catalog As a manifest developer I want all catalogs to obey some general rules Scenario Outline: Compile and verify catalog Given a node specified by "features/yaml/<hostname>." When I compile its catalog Then compilation should succeed And all resource dependencies should resolve Examples: | hostname | | localhost | Julien Pivotto Testing your puppet code
  • 21. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet rspec-puppet • Check what is the behaviour of puppetCheck what is the behaviour of puppet • Separate tests per modulesSeparate tests per modules • Add context, facts, . . .Add context, facts, . . . • Test custom functions, hosts, manifests, . . .Test custom functions, hosts, manifests, . . . Julien Pivotto Testing your puppet code
  • 22. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet rspec-puppet Start with rspec puppet gem install rspec-puppet gem install puppet cd my-module rspec-puppet-init Julien Pivotto Testing your puppet code
  • 23. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet rspec-puppet spec/defines/connection_spec.rb require ’spec_helper’ describe ’openswan::connection’ do describe ’should require rightsubnet or rightsubnets’ do let(:title) { ’foobar’ } let (:params) { { :ike => ’aes256-sha1;modp1024’, :esp => ’aes256-sha1;modp1024’, :leftsubnet => ’8.8.5.5’, :right => ’84.54.105.5’, :left => ’68.65.98.6’, :foreignip => ’45.25.5.5’, :localtestip => ’82.8.8.8’, } } it do expect { should contain_file("/etc/ipsec.d/foobar.conf") }.to raise_error(Puppet::Error, /$rightsubnets and $rightsubnet cannot be both empty/) end end end Julien Pivotto Testing your puppet code
  • 24. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet rspec-puppet Second example require ’spec_helper’ describe ’apache’, :type => :class do let (:facts) { { :operatingsystem => ’CentOS’, :osfamily => ’RedHat’, } } describe ’without parameters’ do it { should create_class(’apache’) } it { should include_class(’apache::service’) } it { should contain_apache__listen(’80’) } it { should contain_apache__namevhost(’80’) } end end Julien Pivotto Testing your puppet code
  • 25. ; Introduction Testing tools Jenkins Conclusion Style and linting Catalogs rspec-puppet rspec-puppet • should, should_notshould, should_not • should contain_packageshould contain_package • contain_foo__bar(’baz’) (for foo::bar)contain_foo__bar(’baz’) (for foo::bar) Julien Pivotto Testing your puppet code
  • 26. ; Introduction Testing tools Jenkins Conclusion Integration with jenkins • Pulling, testing and deploymentsPulling, testing and deployments • Push-Test-Package-DeployPush-Test-Package-Deploy • Continuous integrationContinuous integration • Continuous deliveryContinuous delivery Julien Pivotto Testing your puppet code
  • 27. ; Introduction Testing tools Jenkins Conclusion Jenkins pipelines • Build pipelinesBuild pipelines • Overview of what happensOverview of what happens • Getting notified about what failedGetting notified about what failed • Promoted build pluginPromoted build plugin Julien Pivotto Testing your puppet code
  • 29. ; Introduction Testing tools Jenkins Conclusion Advantages of CI • You trust your codeYou trust your code • ReproducabilityReproducability • You get metrics: number of warning, . . .You get metrics: number of warning, . . . • You have a backlogYou have a backlog • It is easy!It is easy! Julien Pivotto Testing your puppet code
  • 30. ; Introduction Testing tools Jenkins Conclusion Promotions • Provides buttons you can clickProvides buttons you can click • Trigger actionsTrigger actions • deploy to other environmentsdeploy to other environments • Get a mail with the changesGet a mail with the changes • Have a log of who deployedHave a log of who deployed Julien Pivotto Testing your puppet code
  • 32. ; Introduction Testing tools Jenkins Conclusion Homework Conclusion Homework • Integrating tests with git hooksIntegrating tests with git hooks • Integrating tests with VIIntegrating tests with VI • github.com/philandstuff/fizzgiggithub.com/philandstuff/fizzgig Julien Pivotto Testing your puppet code
  • 33. ; Introduction Testing tools Jenkins Conclusion Homework Conclusion Conclusion • Use nice & simple Puppet modulesUse nice & simple Puppet modules • Continuous integrationContinuous integration • Multiple environmentsMultiple environments • Readability & reusabilityReadability & reusability • Tools exist and work togetherTools exist and work together Julien Pivotto Testing your puppet code
  • 34. ; Introduction Testing tools Jenkins Conclusion Homework Conclusion Contact Julien PivottoJulien Pivotto julien@inuits.eujulien@inuits.eu @roidelapluie@roidelapluie INUITS bvbaINUITS bvba Duboisstraat 50Duboisstraat 50 2060 Antwerp2060 Antwerp BelgiumBelgium +32 473 441 636+32 473 441 636 https://inuits.euhttps://inuits.eu Julien Pivotto Testing your puppet code