SlideShare a Scribd company logo
Puppet Systems Infrastructure Construction Kit
Alessandro Franceschi

@alvagante
Puppet masters' dilemmas
Make sense of the whole: Language,
resources, classes, modules, facts,
variables, templates, hiera...
Decide how to classify nodes
Manage configurations variety
Find and integrate existing modules:

Try, integrate, use, wrap.

Adapt, fight, fork.

Or write from them scratch.
Design Hiera hierarchies.
What's data.

How's data.

Who uses data.
Puppet masters' dilemmas
10 years of public Puppet ramblings
2008 Example(42) Puppet infrastructures

First set of example42 modules
2010 Puppi
2010 Example42 NextGen modules
2012 Puppet Playground
2014 Tiny Puppet
2016 Reusable control-repo
2017 PSICK module and control-repo
10 years of public

Puppet ramblings
A state of the (current) art

Puppet control-repo

github.com/example42/psick
An Infrastructure

Puppet module

github.com/example42/puppet-psick
Requires Puppet 4.6 or later
Usable (cherry picking single
elements) by:

- Puppet Beginners who can cope
with just [YAML] data over DSL

- Experienced Sysadmins who know
how to configure their files
- Puppet Experts interested in
radically alternative approaches to
Puppet dilemmas
A control-repo with psick powers

Support for Linux, Windows [and...]

Toolset for the Puppet developer

Multi OS Puppet installer

CI with GitLab, Travis, Jenkins

Sample hiera datasets 

Docker image building

Testing local code on containers

Testing local code on Vagrant VMs

Multiple configurable Vagrant env

Multi OS Vagrant boxes

Automatic control-repo docs

Noop and no-noop management

Control-repo spec tests

Control-repo integration tests

Quick Puppet Enterprise test env

Fabric integration [...]
A control-repo with

psick powers

github.com/example42/psick
An Infrastructure puppet module

What is an Infrastructure module?!
Install:
puppet module install example42/psick
Usage:
include psick
Nothing is done by default.

Everything is configured via Hiera.
It has 3 opt-in functions:

- classification

- base profiles for common use cases

- tp profiles for [any] application
An Infrastructure

puppet module

github.com/example42/puppet-psick
Classification with psick module
Phased classification:

[firstrun] -> pre -> base -> profiles



Hiera deep merge lookup to OS dependent hashes

with the classes to include in each phase
psick::enable_firstrun: true #Def: false

psick::firstrun::linux_classes:

aws_sdk: psick::aws::sdk

psick::firstrun::windows_classes:

hostname: psick::hostname



psick::pre::linux_classes:

repo: psick::repo

users: psick::users

psick::base::linux_classes:

mail: psick::postfix::tp

ssh: psick::openssh

sudo: psick::sudo

network: network



psick::pre::windows_classes:

hosts: psick::hosts::resource

psick::base::windows_classes:

features: psick::windows::features

registry: psick::windows::registry
Classification with psick
psick profiles
Ready for use and cherry pick profiles to manage common
system and applications configurations.
Alternative to dedicated modules
psick::profiles::linux_classes:

time: psick::time



psick::time::servers:
- pool.ntp.org
A partial list of base profiles for common settings:
- psick::hosts - Manage /etc/hosts
- psick::motd - Manage /etc/motd and /etc/issue
- psick::nfs - Manage NFS client and server
- psick::sudo - Manage sudo configuration
- psick::sysctl - Manage sysctl settings
- psick::firewall - Manage firewalling
- psick::openssh - tp profile and keygen define
- psick::hardening - Manage system hardening
- psick::network - Manage networking
- psick::puppet - Manage Puppet components
- psick::users - Manage users
- psick::time - Manage time and timezones
A list of application specific profiles:
- psick::ansible - Manage Ansible installation
- psick::aws - Manage AWS client tools and VPC setup
- psick::bolt - Manage Bolt installation
- psick::docker - Docker installation and build tools
- psick::foreman - Foreman installation
- psick::git - Git installation and configuration
- psick::gitlab - GitLab installation and config
- psick::mariadb - Manage Mariadb
- psick::mysql - Manage Mysql
- psick::mongo - Manage Mongo
- psick::php - Manage php and modules
- psick::oracle - Manage Oracle prereq and setup
- psick::sensu - Manage Sensu
psick profiles
Tiny Puppet and tp profiles
Standard set of profiles to manage
applications with Tiny Puppet (tp).


psick::profiles::linux_classes:

web: psick::apache::tp



psick::apache::tp::resources_hash:
tp::conf:
apache::openkills.info.conf:
base_dir: conf
template: psick/apache/vh.conf.erb
options_hash:
ServerName: openskills.info
ServerAlias:
- openskills.info
AddDefaultCharset: ISO-8859-1
apache::deny_git.conf:
base_dir: conf
source: puppet:///modules/psick/
apache/deny_git.conf
tp::dir:
apache::openskills.info:
vcsrepo: git
source: git@git:alvagante/osk.git
path: /var/www/html/openskills.info
Tiny Puppet and tp profiles
demo
Start to play around
git clone https://github.com/example42/psick
cd psick

bin/puppet_install.sh # To install latest Puppet agent 

bin/puppet_setup.sh # Installs required gems and runs r10k
cd vagrant/environment/<env>/

vagrant status [vm]

vagrant up [vm]

vi ../../../hieradata/* ...

vagrant provision [vm]
Work on a new control-repo based on psick
git clone https://github.com/example42/psick
cd psick
./psick create
cd /path/to/yournew_control-repop
git status
vi ...

git add [...]
demo
Explore the control-repo
# The first manifest parsed by Puppet server

manifests/site.pp
# r10k Puppetfile and directory for public modules

Puppetfile modules/
# Sample Hiera configuration file and data directory
hiera.yaml hieradata/
# Directory with different Vagrant environments
vagrant/


# Tools for various tasks (used in dev and CI)
bin/
# CI integration
.gitlab-ci.yml Jenkinsfile .travis.yml
# Control repo spec tests
spec/ Gemfile Rakefile
# Local profiles
site/
demo
Test local code with Vagrant
• Multiple Vagrant environments
ls -l vagrant/environments/
• Each one customisable via config.yaml
cd vagrant/environments/ostest

vi config.yaml
• Start the Vagrant VM you want
host $ cd vagrant/environments/ostest

host $ vagrant status

host $ vagrant up centos7.ostest.psick.io
• Test your code and data
host $ vi ../../../hieradata/nodes/
centos7.ostest.psick.io.yaml

host $ vagrant ssh centos7.ostest.psick.io

vm $ sudo su -

vm # /vagrant_puppet/bin/papply.sh
demo
Where to customise
• Psick control-repo is just the starting
point for a greenfield modern Puppet
setup
• Define a way to set your nodes
defining variables (the ones used in
hiera.yaml)
• Decide how to manage classification
• For each element to configure choose:

1 - Use a public module (add it to
Puppetfile)

2 - Use a psick profile

3 - Write a custom profile (add to
Puppetfile or directly in site/
profile/)
• Review hiera.yaml logic and
customise data in hieradata/
• Customise your Vagrant environments
• Customise CI pipelines
PSICK the control-repo
github.com/example42/psick
The psick Puppet module
github.com/example42/puppet-psick

forge.puppet.com/example42/psick
Interested?
Weekly Puppet Tips

example42.com/blog
Graphics: tatlin.net

More Related Content

What's hot

Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Robert Nelson
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
Alessandro Franceschi
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
Alessandro Franceschi
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
Thomas Howard Uphill
 
Auto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleAuto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag Style
Robert Nelson
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
DECK36
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
Puppet
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys Admins
Puppet
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
p3castro
 
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
Puppet
 
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based ApplicationsWriting Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
Tim Cinel
 
Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
Angelo Failla
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet systemrkhatibi
 
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Puppet
 
Unit Testing Lots of Perl
Unit Testing Lots of PerlUnit Testing Lots of Perl
Unit Testing Lots of Perl
Workhorse Computing
 
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
Puppet
 
Effective testing with pytest
Effective testing with pytestEffective testing with pytest
Effective testing with pytest
Hector Canto
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
Workhorse Computing
 
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
Puppet
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
Justin Lin
 

What's hot (20)

Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
 
Auto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleAuto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag Style
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys Admins
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
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
 
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based ApplicationsWriting Custom Puppet Types and Providers to Manage Web-Based Applications
Writing Custom Puppet Types and Providers to Manage Web-Based Applications
 
Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
 
Creating a mature puppet system
Creating a mature puppet systemCreating a mature puppet system
Creating a mature puppet system
 
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
 
Unit Testing Lots of Perl
Unit Testing Lots of PerlUnit Testing Lots of Perl
Unit Testing Lots of Perl
 
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
 
Effective testing with pytest
Effective testing with pytestEffective testing with pytest
Effective testing with pytest
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
 
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
 
PyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 TutorialPyCon Taiwan 2013 Tutorial
PyCon Taiwan 2013 Tutorial
 

Similar to Puppet Systems Infrastructure Construction Kit

Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
Alessandro Franceschi
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Ricardo Amaro
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
Pantheon
 
Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
Alessandro Franceschi
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant Ricardo Amaro
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
NETWAYS
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large Enterprises
Puppet
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
Alessandro Franceschi
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with PodmanKubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Mihai Criveti
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Etsuji Nakai
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
Sabyrzhan Tynybayev
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
Roman Rodomansky
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
Henry Schreiner
 
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)
Fabrice Bernhard
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerous
David Tan
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
 
sphinx demo
sphinx demosphinx demo
sphinx demo
ak013
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Carlos Eduardo
 
Through the firewall with miniCRAN
Through the firewall with miniCRANThrough the firewall with miniCRAN
Through the firewall with miniCRANRevolution Analytics
 

Similar to Puppet Systems Infrastructure Construction Kit (20)

Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large Enterprises
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
 
Lab docker
Lab dockerLab docker
Lab docker
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with PodmanKubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with Podman
 
Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7Inside Docker for Fedora20/RHEL7
Inside Docker for Fedora20/RHEL7
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
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)
 
Learn enough Docker to be dangerous
Learn enough Docker to be dangerousLearn enough Docker to be dangerous
Learn enough Docker to be dangerous
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
sphinx demo
sphinx demosphinx demo
sphinx demo
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
Through the firewall with miniCRAN
Through the firewall with miniCRANThrough the firewall with miniCRAN
Through the firewall with miniCRAN
 

More from Alessandro Franceschi

DevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdfDevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdf
Alessandro Franceschi
 
Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!
Alessandro Franceschi
 
ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!
Alessandro Franceschi
 
Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?
Alessandro Franceschi
 
Tp install anything
Tp install anythingTp install anything
Tp install anything
Alessandro Franceschi
 
Puppet evolutions
Puppet evolutionsPuppet evolutions
Puppet evolutions
Alessandro Franceschi
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
Alessandro Franceschi
 
Raise the bar! Reloaded
Raise the bar! ReloadedRaise the bar! Reloaded
Raise the bar! Reloaded
Alessandro Franceschi
 
Raise the bar!
Raise the bar!Raise the bar!
Raise the bar!
Alessandro Franceschi
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
Alessandro Franceschi
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
Alessandro Franceschi
 
Spaghetti devops
Spaghetti devopsSpaghetti devops
Spaghetti devops
Alessandro Franceschi
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
Alessandro Franceschi
 

More from Alessandro Franceschi (13)

DevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdfDevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdf
 
Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!
 
ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!
 
Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?
 
Tp install anything
Tp install anythingTp install anything
Tp install anything
 
Puppet evolutions
Puppet evolutionsPuppet evolutions
Puppet evolutions
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
 
Raise the bar! Reloaded
Raise the bar! ReloadedRaise the bar! Reloaded
Raise the bar! Reloaded
 
Raise the bar!
Raise the bar!Raise the bar!
Raise the bar!
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
 
Spaghetti devops
Spaghetti devopsSpaghetti devops
Spaghetti devops
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 

Recently uploaded

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 

Recently uploaded (20)

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 

Puppet Systems Infrastructure Construction Kit

  • 1. Puppet Systems Infrastructure Construction Kit Alessandro Franceschi
 @alvagante
  • 3. Make sense of the whole: Language, resources, classes, modules, facts, variables, templates, hiera... Decide how to classify nodes Manage configurations variety Find and integrate existing modules:
 Try, integrate, use, wrap.
 Adapt, fight, fork.
 Or write from them scratch. Design Hiera hierarchies. What's data.
 How's data.
 Who uses data. Puppet masters' dilemmas
  • 4. 10 years of public Puppet ramblings
  • 5. 2008 Example(42) Puppet infrastructures
 First set of example42 modules 2010 Puppi 2010 Example42 NextGen modules 2012 Puppet Playground 2014 Tiny Puppet 2016 Reusable control-repo 2017 PSICK module and control-repo 10 years of public
 Puppet ramblings
  • 6. A state of the (current) art
 Puppet control-repo
 github.com/example42/psick An Infrastructure
 Puppet module
 github.com/example42/puppet-psick Requires Puppet 4.6 or later Usable (cherry picking single elements) by:
 - Puppet Beginners who can cope with just [YAML] data over DSL
 - Experienced Sysadmins who know how to configure their files - Puppet Experts interested in radically alternative approaches to Puppet dilemmas
  • 7. A control-repo with psick powers

  • 8. Support for Linux, Windows [and...]
 Toolset for the Puppet developer
 Multi OS Puppet installer
 CI with GitLab, Travis, Jenkins
 Sample hiera datasets 
 Docker image building
 Testing local code on containers
 Testing local code on Vagrant VMs
 Multiple configurable Vagrant env
 Multi OS Vagrant boxes
 Automatic control-repo docs
 Noop and no-noop management
 Control-repo spec tests
 Control-repo integration tests
 Quick Puppet Enterprise test env
 Fabric integration [...] A control-repo with
 psick powers
 github.com/example42/psick
  • 10. What is an Infrastructure module?! Install: puppet module install example42/psick Usage: include psick Nothing is done by default.
 Everything is configured via Hiera. It has 3 opt-in functions:
 - classification
 - base profiles for common use cases
 - tp profiles for [any] application An Infrastructure
 puppet module
 github.com/example42/puppet-psick
  • 12. Phased classification:
 [firstrun] -> pre -> base -> profiles
 
 Hiera deep merge lookup to OS dependent hashes
 with the classes to include in each phase psick::enable_firstrun: true #Def: false
 psick::firstrun::linux_classes:
 aws_sdk: psick::aws::sdk
 psick::firstrun::windows_classes:
 hostname: psick::hostname
 
 psick::pre::linux_classes:
 repo: psick::repo
 users: psick::users
 psick::base::linux_classes:
 mail: psick::postfix::tp
 ssh: psick::openssh
 sudo: psick::sudo
 network: network
 
 psick::pre::windows_classes:
 hosts: psick::hosts::resource
 psick::base::windows_classes:
 features: psick::windows::features
 registry: psick::windows::registry Classification with psick
  • 14. Ready for use and cherry pick profiles to manage common system and applications configurations. Alternative to dedicated modules psick::profiles::linux_classes:
 time: psick::time
 
 psick::time::servers: - pool.ntp.org A partial list of base profiles for common settings: - psick::hosts - Manage /etc/hosts - psick::motd - Manage /etc/motd and /etc/issue - psick::nfs - Manage NFS client and server - psick::sudo - Manage sudo configuration - psick::sysctl - Manage sysctl settings - psick::firewall - Manage firewalling - psick::openssh - tp profile and keygen define - psick::hardening - Manage system hardening - psick::network - Manage networking - psick::puppet - Manage Puppet components - psick::users - Manage users - psick::time - Manage time and timezones A list of application specific profiles: - psick::ansible - Manage Ansible installation - psick::aws - Manage AWS client tools and VPC setup - psick::bolt - Manage Bolt installation - psick::docker - Docker installation and build tools - psick::foreman - Foreman installation - psick::git - Git installation and configuration - psick::gitlab - GitLab installation and config - psick::mariadb - Manage Mariadb - psick::mysql - Manage Mysql - psick::mongo - Manage Mongo - psick::php - Manage php and modules - psick::oracle - Manage Oracle prereq and setup - psick::sensu - Manage Sensu psick profiles
  • 15. Tiny Puppet and tp profiles
  • 16. Standard set of profiles to manage applications with Tiny Puppet (tp). 
 psick::profiles::linux_classes:
 web: psick::apache::tp
 
 psick::apache::tp::resources_hash: tp::conf: apache::openkills.info.conf: base_dir: conf template: psick/apache/vh.conf.erb options_hash: ServerName: openskills.info ServerAlias: - openskills.info AddDefaultCharset: ISO-8859-1 apache::deny_git.conf: base_dir: conf source: puppet:///modules/psick/ apache/deny_git.conf tp::dir: apache::openskills.info: vcsrepo: git source: git@git:alvagante/osk.git path: /var/www/html/openskills.info Tiny Puppet and tp profiles
  • 17. demo
  • 18. Start to play around git clone https://github.com/example42/psick cd psick
 bin/puppet_install.sh # To install latest Puppet agent 
 bin/puppet_setup.sh # Installs required gems and runs r10k cd vagrant/environment/<env>/
 vagrant status [vm]
 vagrant up [vm]
 vi ../../../hieradata/* ...
 vagrant provision [vm] Work on a new control-repo based on psick git clone https://github.com/example42/psick cd psick ./psick create cd /path/to/yournew_control-repop git status vi ...
 git add [...] demo
  • 19. Explore the control-repo # The first manifest parsed by Puppet server
 manifests/site.pp # r10k Puppetfile and directory for public modules
 Puppetfile modules/ # Sample Hiera configuration file and data directory hiera.yaml hieradata/ # Directory with different Vagrant environments vagrant/ 
 # Tools for various tasks (used in dev and CI) bin/ # CI integration .gitlab-ci.yml Jenkinsfile .travis.yml # Control repo spec tests spec/ Gemfile Rakefile # Local profiles site/ demo
  • 20. Test local code with Vagrant • Multiple Vagrant environments ls -l vagrant/environments/ • Each one customisable via config.yaml cd vagrant/environments/ostest
 vi config.yaml • Start the Vagrant VM you want host $ cd vagrant/environments/ostest
 host $ vagrant status
 host $ vagrant up centos7.ostest.psick.io • Test your code and data host $ vi ../../../hieradata/nodes/ centos7.ostest.psick.io.yaml
 host $ vagrant ssh centos7.ostest.psick.io
 vm $ sudo su -
 vm # /vagrant_puppet/bin/papply.sh demo
  • 21. Where to customise • Psick control-repo is just the starting point for a greenfield modern Puppet setup • Define a way to set your nodes defining variables (the ones used in hiera.yaml) • Decide how to manage classification • For each element to configure choose:
 1 - Use a public module (add it to Puppetfile)
 2 - Use a psick profile
 3 - Write a custom profile (add to Puppetfile or directly in site/ profile/) • Review hiera.yaml logic and customise data in hieradata/ • Customise your Vagrant environments • Customise CI pipelines
  • 22. PSICK the control-repo github.com/example42/psick The psick Puppet module github.com/example42/puppet-psick
 forge.puppet.com/example42/psick Interested? Weekly Puppet Tips
 example42.com/blog Graphics: tatlin.net