SlideShare une entreprise Scribd logo
1  sur  50
Puppet in the Pipeline
Anna Kennedy
● Basic workflow
● End-to-end workflows
● Example workflows
● Integration points
● Planning your workflow
Basic workflow:
deploy code from the master to a node
PuppetMaster
agent
VM
code
PuppetMaster
The very first setup you ever did
code
VC repo
PuppetMaster
agent
VM
Maybe we should use version control?
code
VC repo
PuppetMaster
agent
VM
● rsync
● post-commit hook
● r10k
How do we get the code onto the master?
r10k
Git repo
module1
production branch
development branch
module2
production branch
development branch
Puppet Master
$codedir/environments
/production
/module1
/module2
/development
/module1
/module2
r10k
SVN repo
module1
trunk
branches/development
module2
trunk
branches/development
Puppet Master
$codedir/environments
/production
/module1
/module2
/development
/module1
/module2
prod
staging
dev
VC repo
PuppetMaster
agent
VM
Using git branches as environments
prod
staging
dev
VC repo
PuppetMaster
agent
VM
● merge
● manual
● review
● testing
Deploying to environments sequentially
- should this be manual or automatic?
prod
staging
dev
VC repo
PuppetMaster
agent
VM
The Maintenance Workflow
End-to-end workflow:
set up, install, and configure the node
code
git repo
VM
request
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
VM ready
End-to-end workflow
End-to-end workflow: technical options
VM
request
code
git repo
PuppetMaster
● Verbal
● Email
● Form
● Web page
VM
request
VM created
code
git repo
PuppetMaster
● VirtualBox
● Vagrant
● Docker
● VMware
● OpenStack
VM
request
VM created
OS +
puppet
installed
code
git repo
PuppetMaster
● manual
● golden image
● PXE boot
● kickstart /
preseed /
jumpstart /
...
code
git repo
VM
request
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Certificate exchange
● Command line
● API
● Autosign
● Presigned
Certificate exchange
VM
PuppetMaster
puppet agent run
generates CSR
puppet cert sign <vm>
signs certificate
● command line
Signed certificate
Certificate exchange
VMPuppetMaster
puppet agent run
generates CSRcurl --cert my-cert.pem
--key my-private.pem
--cacert ca.pem
-X PUT
-H "Content-Type: text/pson"
--data
'{"desired_state":"signed"}'
https://puppetmaster.vm:8140/pro
duction/certificate_status/<vm>
● api
Signed certificate
Certificate exchange
VM
PuppetMaster
puppet agent run
generates CSR
● autosign
autosign
whitelist or policy based
Signed certificate
Certificate exchange
VM
PuppetMaster
● pre-signed
puppetca --generate <vm>
ssl/certs/<vm>.pem
ssl/certs/ca.pem
ssl/private_keys/<vm>.pem
Signed certificate
code
git repo
VM
request
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
Node classification
● site.pp
● PE console
● Hiera
● ENC
● Node classifier API
● site.pp
Node classification
node ‘web01.example.com’ {
include role::web
}
node ‘*.example.com’ {
include role::basic
}
Node classification
Classify based on facts:
- node name
- os
- kernel
- custom
- etc etc
● PE console
● Hiera
Node classification
site.pp
hiera_include(‘classes’)
hiera.yaml
:hierarchy:
- “node/%{::fqdn}”
- “osfamily/%{::osfamily}
”
- common
debian.yaml
---
classes:
- repos::apt
common.yaml
---
classes:
- base
● ENC
(external node
classifier)
Node classification
= an executable that
can be called by the
PuppetMaster
Returns yaml hash
- classes
- parameters
- environment
Takes one
parameter:
node FQDN
Node classification
curl --cert myserver-cert.pem 
--key myserver-private.pem 
--cacert ca.pem 
-H "Content-Type: application/json" 
https://puppetmaster.vm:4433/classifier-api/v1/groups -d
'
{
"name": "testnode.vm",
"environment": "testing",
"parent": "00000000-0000-4000-8000-000000000000",
"classes": {},
"rule": [
"or",
[
"=",
"name",
"testnode.vm"
]
]
}'
● Node
classifier API
An API interlude
APIs exist for:
● Puppet Master (Server)
● Certificate Authority
● PuppetDB
● Console
An API interlude
Step 1: Authentication of the requesting server
Need:
an ssl certificate for myserver (--cert)
the private key for the certificate (--key)
the CA certificate of the master (--cacert)
Do:
puppet cert generate myserver.vm
Copy from master to myserver:
ssl/certs/myserver.pem
ssl/private_keys/myserver.pem
ssl/certs/ca.pem
An API interlude
Step 2: Configuration of API service
● Puppet Master / Server / CA:
Edit auth.conf:
path /puppet/v3/status
method find
allow *
path /puppet-ca/v1/certificate_status
method find, save
auth any
allow myserver
Edit ca.conf:
certificate-authority: {
certificate-status: {
client-whitelist:
[myserver]
}
}
}
An API interlude
Step 2: Configuration of API service
● PuppetDB:
Edit: certificate-whitelist (optional)
myserver
An API interlude
Step 2: Configuration of API service
● Puppet console:
Edit: rbac-certificate-whitelist
myserver
An API interlude
Step 3:
Don’t mix classification types!
Don’t mix classification types!
If you mix classification types
MAKE SURE YOU KNOW WHAT YOU’RE DOING
Example workflows
code
git repo
VM
request
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
VM ready
End-to-end
workflow
code
git repo
VM
request
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
VM ready
unit
tests
acceptanc
e tests
Workflow
with testing
code
git repo
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
Output
test
results
unit
tests
acceptanc
e tests
Workflow
for testing
VM created
VM created
OS +
puppet
installed
OS +
puppet
installed
Connected to
PuppetMaster
Connected to
PuppetMaster
Installed and
running
Installed and
running
Workflow
FOR testing
Different OSs
code
git repo
Load
increas
e -> VM
request
PuppetMaster
Connected to
PuppetMaster
Installed and
running
VM put into
production
VM created
from golden
image
Rapid-scaling
workflow
Planning your workflow
Planning your workflow
Need to integrate
with legacy systems?
Planning your workflow
What timescales are normal for you?
“ we need rapid
scalability
to cope with load - we
create and destroy
tens of VMs a day”
“ we spin up new
machines less than
once a month, and they
remain in service for
years “
Planning your workflow
What do your end users look like?
Planning your workflow
What do your internal users look like?
Planning your workflow
What does your development process look like?
Summing up
Node classification
● site.pp
● PE console
● Hiera
● ENC
● APIs
Certificate exchange
● Command line
● API
● Autosign
● Presigned
● manual
● golden image
● PXE boot
● kickstart / preseed /
jumpstart
● rsync
● post-commit hook
● r10kcode
git repo
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
VM ready
● Verbal
● Email
● Form
● Web page
VM
request
Integration points
Consideration points:
●uncontrollable factors
●legacy systems
●timescales
●internal and external users
●development process

Contenu connexe

Tendances

Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)
jasondenning
 
Automating Your Salt Tests
Automating Your Salt TestsAutomating Your Salt Tests
Automating Your Salt Tests
Ryan Currah
 

Tendances (20)

Jenkins pipeline as code
Jenkins pipeline as codeJenkins pipeline as code
Jenkins pipeline as code
 
Testing Salt States (part 1)
Testing Salt States (part 1)Testing Salt States (part 1)
Testing Salt States (part 1)
 
Automating Your Salt Tests
Automating Your Salt TestsAutomating Your Salt Tests
Automating Your Salt Tests
 
Continuous testing
Continuous testingContinuous testing
Continuous testing
 
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of TestingPipeline as code using Jenkins -Ministry of Testing
Pipeline as code using Jenkins -Ministry of Testing
 
Bgoug 2019.11 test your pl sql - not your patience
Bgoug 2019.11   test your pl sql - not your patienceBgoug 2019.11   test your pl sql - not your patience
Bgoug 2019.11 test your pl sql - not your patience
 
Dev ops
Dev opsDev ops
Dev ops
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
TYPO3 & Composer
TYPO3 & ComposerTYPO3 & Composer
TYPO3 & Composer
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 
Autotesting rails app
Autotesting rails appAutotesting rails app
Autotesting rails app
 
Bootify your spring application
Bootify your spring applicationBootify your spring application
Bootify your spring application
 
Habitat 301: Building Habitats
Habitat 301: Building HabitatsHabitat 301: Building Habitats
Habitat 301: Building Habitats
 
Git and git hub
Git and git hubGit and git hub
Git and git hub
 
Docker & ci
Docker & ciDocker & ci
Docker & ci
 
Jenkins : Pipeline As Code
Jenkins : Pipeline As CodeJenkins : Pipeline As Code
Jenkins : Pipeline As Code
 
How to write a Dockerfile
How to write a DockerfileHow to write a Dockerfile
How to write a Dockerfile
 
Expressive Microservice Framework Blastoff
Expressive Microservice Framework BlastoffExpressive Microservice Framework Blastoff
Expressive Microservice Framework Blastoff
 
It's a Breeze to develop Airflow (Cloud Native Warsaw)
It's a Breeze to develop Airflow (Cloud Native Warsaw)It's a Breeze to develop Airflow (Cloud Native Warsaw)
It's a Breeze to develop Airflow (Cloud Native Warsaw)
 
Виталий Редько "React + Redux: performance & scalability"
Виталий Редько "React + Redux: performance & scalability"Виталий Редько "React + Redux: performance & scalability"
Виталий Редько "React + Redux: performance & scalability"
 

Similaire à Puppet in the Pipeline

Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
Simplilearn
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
Marcos Quesada
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
Gosuke Miyashita
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
Hendrik Ebbers
 

Similaire à Puppet in the Pipeline (20)

Puppet in the Pipeline
Puppet in the PipelinePuppet in the Pipeline
Puppet in the Pipeline
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easy
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
 
Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
Puppet Tutorial | Puppet Tutorial For Beginners | Puppet Configuration Manage...
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your API...
WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your API...WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your API...
WSO2 Screencast - How to Easily Build a Git-Based CI/CD Pipeline for your API...
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
Gitflow with FME and Autobuilding a Project with the Gitlab Build PipelineGitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
 
Pcp
PcpPcp
Pcp
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applications
 
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD StoryLondon Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
London Adapt or Die: Kubernetes, Containers and Cloud - The MoD Story
 
Docker Docker Docker Chef
Docker Docker Docker ChefDocker Docker Docker Chef
Docker Docker Docker Chef
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
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
 

Puppet in the Pipeline

Notes de l'éditeur

  1. Traditional workflow - bigger businesses
  2. Traditional workflow - bigger businesses
  3. Traditional workflow - bigger businesses
  4. Traditional workflow - bigger businesses
  5. Traditional workflow - bigger businesses
  6. Traditional workflow - bigger businesses
  7. Traditional workflow - bigger businesses
  8. Traditional workflow - bigger businesses
  9. Traditional workflow - bigger businesses
  10. Traditional workflow - bigger businesses
  11. Traditional workflow - bigger businesses
  12. Traditional workflow - bigger businesses
  13. Traditional workflow - bigger businesses
  14. Traditional workflow - bigger businesses