SlideShare a Scribd company logo
R.I.Pienaar
Malta DevOps August 2016
Introduction to
Configuration Management
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Who am I?
• Malta since December 2015
• Consultant for 20+ years
• Government, Finance, Health, Social Media,
Fortune 50, Startups
• DevOps, Automation, Architect,
Development
• Open Source @ github.com/ripienaar
• Linux since Kernel 99 alpha p11
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Configuration
Management
for Devs and Ops
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not CONSISTENT
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not REPRODUCABLE
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not INTERESTING
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not SCALABLE
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not COMPLETE
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - What’s the problem?
Not PREDICTABLE
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hypothetical Toolset
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Programmable
Infrastructure
Domain Specific Language
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Programmable
Infrastructure
Platform and OS Independent
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Programmable
Infrastructure
Complete Server Lifecycle
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Programmable
Infrastructure
Extendible via Plugins and APIs
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Programmable
Infrastructure
Learns from Development
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Open
Source,APIs and Docs
Community, IRC, Slack, GitHub, Users
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
CM - Wishes?
Commercial
Owned
Support,Training, Conferences, Certs
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet
• 10 years old
• Commercially owned Open Source
• Client Server or Standalone Architecture
• Used by 10s of 1000s of companies
• Useful to small and large companies, even
single servers
• 4 400 reusable modules, write your own
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Resources
package{“httpd”:
ensure => “present”
}
file{“/etc/httpd/conf/httpd.conf”:
owner => “root”,
group => “root”,
mode => “0644”,
source => “puppet:///modules/apache/httpd.conf”
}
service{“httpd”:
ensure => “running”,
enable => true
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Types
package{“httpd”:
ensure => “present”
}
file{“/etc/httpd/conf/httpd.conf”:
owner => “root”,
group => “root”,
mode => “0644”,
source => “puppet:///modules/apache/httpd.conf”
}
service{“httpd”:
ensure => “running”,
enable => true
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Titles
package{“httpd”:
ensure => “present”
}
file{“/etc/httpd/conf/httpd.conf”:
owner => “root”,
group => “root”,
mode => “0644”,
source => “puppet:///modules/apache/httpd.conf”
}
service{“httpd”:
ensure => “running”,
enable => true
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Parameters
package{“httpd”:
ensure => “present”
}
file{“/etc/httpd/conf/httpd.conf”:
owner => “root”,
group => “root”,
mode => “0644”,
source => “puppet:///modules/apache/httpd.conf”
}
service{“httpd”:
ensure => “running”,
enable => true
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Relationships
package{“httpd”:
…
}
file{“/etc/httpd/conf/httpd.conf”:
…,
require => Package[“httpd”],
notify => Service[“httpd”]
}
service{“httpd”:
…,
require => File[“/etc/httpd/conf/httpd.conf”]
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Collections
class apache {
include apache::install
include apache::config
include apache::service
}
class apache::install {
package{ … }; package{ … }
}
class apache::config {
file{ … }; file{ … }
}
class apache::service {
service{ … }; service{ … }
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Relations
package{“httpd”:
…
}
file{“/etc/httpd/conf/httpd.conf”:
…,
require => Class[“apache::install”],
notify => Class[“apache::service”]
}
service{“httpd”:
…,
require => Class[“apache::config”]
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Nodes
node “dev1.example.net” {
include roles::lamp_dev
}
class roles::lamp_dev {
include profile::lamp_webserver
include profile::lamp_mysqlserver
}
class profile::lamp_webserver {
include php
include apache
}
class profile::lamp_mysqlserver {
include mysql
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Facts
$ facter
…
os => {
architecture => "x86_64",
distro => {
codename => "Core",
description => "CentOS Linux release 7.2.1511 (Core)",
id => "CentOS",
release => {
full => "7.2.1511",
major => "7",
minor => "2"
},
specification => ":core-4.1-amd64:core-4.1-noarch"
},
family => "RedHat",
hardware => "x86_64",
name => "CentOS",
release => {
full => "7.2.1511",
major => "7",
minor => "2"
},
selinux => {
enabled => false
}
}
…
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Facts
class site::common {
if $facts[“os”][“family”] == “RedHat” {
include site::redhat_common
} elsif $facts[“os”][“family”] == “Debian” {
include site::debian_common
} else {
fail(“Unknown operating system family”)
}
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Site Policies
• /srv/www - root:root
• /etc/httpd/conf.d/<site>.conf
• /srv/www/<site> - root:root
• /srv/www/<site>/html - owner:owner
• /srv/www/<site>/logs/access_log - root:root
• /srv/www/<site>/logs/error_log - root:root
• <site> log rotation
• <site> backups
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Site Policies
site::vhost{“example.com”: }
Day to Day Usage
$client_sites = [“example1.com”, “example2.com”]
site::vhost{$client_sites: }
site::vhost{“example.com”:
aliases => [“www.example.com”, “www.other.com”],
owner => “acme”,
allow_override => “All”,
options => “Indexes”
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Site Policies
Policy Set by Web Team - Creates Utility
define site::vhost ( $port, $owner, $group, … ) {
apache::vhost{$name:
port => $port,
docroot => “/srv/www/${name}/html”,
docroot_owner => $owner,
docroot_group => $group,
}
bacula::backup_policy{$name: …}
sensu::monitor{$name: …}
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Testing
Learning from Development - Unit Testing
describe “site::vhost” do
let(:title) { “example.com” }
it {
is_expected to contain_apache__vhost(“example.com”)
.with (
“port” => “80”,
“docroot” => “/srv/www/example.com/html”
…
)
}
end
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Testing
Learning from Development - Integration Testing
describe package(“httpd”) do
it { should be_installed }
end
describe service(“httpd”) do
it { should be_enabled }
it { should be_running }
end
describe file(“/srv/www/example.com/html”) do
it { should exist }
it { should be_directory }
it { be_owned_by “root” }
end
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Puppet Reporting
http://theforeman.org
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Questions?
twitter: @ripienaar
email: rip@devco.net
blog: www.devco.net
github: ripienaar
freenode: Volcane
slack.puppet.com: ripienaar
http://learn.puppet.com/
https://www.devco.net/

More Related Content

Similar to Introduction to Configuration Management

Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015
ripienaar
 
External Data in Puppet 4
External Data in Puppet 4External Data in Puppet 4
External Data in Puppet 4
ripienaar
 
PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
PuppetConf. 2016: External Data in Puppet 4 – R.I. PienaarPuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
Puppet
 
Containers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the EnterpriseContainers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the Enterprise
Honza Horák
 
My First 100 days with a Cassandra Cluster
My First 100 days with a Cassandra ClusterMy First 100 days with a Cassandra Cluster
My First 100 days with a Cassandra Cluster
Gustavo Rene Antunez
 
Puppet Performance Profiling
Puppet Performance ProfilingPuppet Performance Profiling
Puppet Performance Profiling
ripienaar
 
Introduction to MCollective - SF PUG
Introduction to MCollective - SF PUGIntroduction to MCollective - SF PUG
Introduction to MCollective - SF PUG
Puppet
 
Open Source Infrastructure / Development & Security > How to make it work?
Open Source Infrastructure / Development & Security > How to make it work? Open Source Infrastructure / Development & Security > How to make it work?
Open Source Infrastructure / Development & Security > How to make it work?
Kangaroot
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
roskakori
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
Patrick Mizer
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
The Incredible Automation Day
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
Opsta
 
Puppet at Pinterest
Puppet at PinterestPuppet at Pinterest
Puppet at Pinterest
Puppet
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
Patrick Chanezon
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
Stephen Holsapple
 
Cloud Device Insecurity
Cloud Device InsecurityCloud Device Insecurity
Cloud Device Insecurity
Jeremy Brown
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
Walter Heck
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
OlinData
 
Intro to Docker October 2013
Intro to Docker October 2013Intro to Docker October 2013
Intro to Docker October 2013
Docker, Inc.
 
Tox as project descriptor.
Tox as project descriptor.Tox as project descriptor.
Tox as project descriptor.
Roberto Polli
 

Similar to Introduction to Configuration Management (20)

Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015
 
External Data in Puppet 4
External Data in Puppet 4External Data in Puppet 4
External Data in Puppet 4
 
PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
PuppetConf. 2016: External Data in Puppet 4 – R.I. PienaarPuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar
 
Containers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the EnterpriseContainers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the Enterprise
 
My First 100 days with a Cassandra Cluster
My First 100 days with a Cassandra ClusterMy First 100 days with a Cassandra Cluster
My First 100 days with a Cassandra Cluster
 
Puppet Performance Profiling
Puppet Performance ProfilingPuppet Performance Profiling
Puppet Performance Profiling
 
Introduction to MCollective - SF PUG
Introduction to MCollective - SF PUGIntroduction to MCollective - SF PUG
Introduction to MCollective - SF PUG
 
Open Source Infrastructure / Development & Security > How to make it work?
Open Source Infrastructure / Development & Security > How to make it work? Open Source Infrastructure / Development & Security > How to make it work?
Open Source Infrastructure / Development & Security > How to make it work?
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
TIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by stepTIAD - DYI: A simple orchestrator built step by step
TIAD - DYI: A simple orchestrator built step by step
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
 
Puppet at Pinterest
Puppet at PinterestPuppet at Pinterest
Puppet at Pinterest
 
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016What's new in Docker - InfraKit - Docker Meetup Berlin 2016
What's new in Docker - InfraKit - Docker Meetup Berlin 2016
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
Cloud Device Insecurity
Cloud Device InsecurityCloud Device Insecurity
Cloud Device Insecurity
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
Intro to Docker October 2013
Intro to Docker October 2013Intro to Docker October 2013
Intro to Docker October 2013
 
Tox as project descriptor.
Tox as project descriptor.Tox as project descriptor.
Tox as project descriptor.
 

Recently uploaded

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 

Recently uploaded (20)

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 

Introduction to Configuration Management

  • 1. R.I.Pienaar Malta DevOps August 2016 Introduction to Configuration Management
  • 2. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Who am I? • Malta since December 2015 • Consultant for 20+ years • Government, Finance, Health, Social Media, Fortune 50, Startups • DevOps, Automation, Architect, Development • Open Source @ github.com/ripienaar • Linux since Kernel 99 alpha p11
  • 3. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Configuration Management for Devs and Ops
  • 4. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not CONSISTENT
  • 5. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not REPRODUCABLE
  • 6. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not INTERESTING
  • 7. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not SCALABLE
  • 8. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not COMPLETE
  • 9. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - What’s the problem? Not PREDICTABLE
  • 10. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hypothetical Toolset
  • 11. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Programmable Infrastructure Domain Specific Language
  • 12. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Programmable Infrastructure Platform and OS Independent
  • 13. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Programmable Infrastructure Complete Server Lifecycle
  • 14. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Programmable Infrastructure Extendible via Plugins and APIs
  • 15. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Programmable Infrastructure Learns from Development
  • 16. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Open Source,APIs and Docs Community, IRC, Slack, GitHub, Users
  • 17. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar CM - Wishes? Commercial Owned Support,Training, Conferences, Certs
  • 18. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
  • 19. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet • 10 years old • Commercially owned Open Source • Client Server or Standalone Architecture • Used by 10s of 1000s of companies • Useful to small and large companies, even single servers • 4 400 reusable modules, write your own
  • 20. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Resources package{“httpd”: ensure => “present” } file{“/etc/httpd/conf/httpd.conf”: owner => “root”, group => “root”, mode => “0644”, source => “puppet:///modules/apache/httpd.conf” } service{“httpd”: ensure => “running”, enable => true }
  • 21. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Types package{“httpd”: ensure => “present” } file{“/etc/httpd/conf/httpd.conf”: owner => “root”, group => “root”, mode => “0644”, source => “puppet:///modules/apache/httpd.conf” } service{“httpd”: ensure => “running”, enable => true }
  • 22. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Titles package{“httpd”: ensure => “present” } file{“/etc/httpd/conf/httpd.conf”: owner => “root”, group => “root”, mode => “0644”, source => “puppet:///modules/apache/httpd.conf” } service{“httpd”: ensure => “running”, enable => true }
  • 23. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Parameters package{“httpd”: ensure => “present” } file{“/etc/httpd/conf/httpd.conf”: owner => “root”, group => “root”, mode => “0644”, source => “puppet:///modules/apache/httpd.conf” } service{“httpd”: ensure => “running”, enable => true }
  • 24. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Relationships package{“httpd”: … } file{“/etc/httpd/conf/httpd.conf”: …, require => Package[“httpd”], notify => Service[“httpd”] } service{“httpd”: …, require => File[“/etc/httpd/conf/httpd.conf”] }
  • 25. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Collections class apache { include apache::install include apache::config include apache::service } class apache::install { package{ … }; package{ … } } class apache::config { file{ … }; file{ … } } class apache::service { service{ … }; service{ … } }
  • 26. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Relations package{“httpd”: … } file{“/etc/httpd/conf/httpd.conf”: …, require => Class[“apache::install”], notify => Class[“apache::service”] } service{“httpd”: …, require => Class[“apache::config”] }
  • 27. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Nodes node “dev1.example.net” { include roles::lamp_dev } class roles::lamp_dev { include profile::lamp_webserver include profile::lamp_mysqlserver } class profile::lamp_webserver { include php include apache } class profile::lamp_mysqlserver { include mysql }
  • 28. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Facts $ facter … os => { architecture => "x86_64", distro => { codename => "Core", description => "CentOS Linux release 7.2.1511 (Core)", id => "CentOS", release => { full => "7.2.1511", major => "7", minor => "2" }, specification => ":core-4.1-amd64:core-4.1-noarch" }, family => "RedHat", hardware => "x86_64", name => "CentOS", release => { full => "7.2.1511", major => "7", minor => "2" }, selinux => { enabled => false } } …
  • 29. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Facts class site::common { if $facts[“os”][“family”] == “RedHat” { include site::redhat_common } elsif $facts[“os”][“family”] == “Debian” { include site::debian_common } else { fail(“Unknown operating system family”) } }
  • 30. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Site Policies • /srv/www - root:root • /etc/httpd/conf.d/<site>.conf • /srv/www/<site> - root:root • /srv/www/<site>/html - owner:owner • /srv/www/<site>/logs/access_log - root:root • /srv/www/<site>/logs/error_log - root:root • <site> log rotation • <site> backups
  • 31. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Site Policies site::vhost{“example.com”: } Day to Day Usage $client_sites = [“example1.com”, “example2.com”] site::vhost{$client_sites: } site::vhost{“example.com”: aliases => [“www.example.com”, “www.other.com”], owner => “acme”, allow_override => “All”, options => “Indexes” }
  • 32. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Site Policies Policy Set by Web Team - Creates Utility define site::vhost ( $port, $owner, $group, … ) { apache::vhost{$name: port => $port, docroot => “/srv/www/${name}/html”, docroot_owner => $owner, docroot_group => $group, } bacula::backup_policy{$name: …} sensu::monitor{$name: …} }
  • 33. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Testing Learning from Development - Unit Testing describe “site::vhost” do let(:title) { “example.com” } it { is_expected to contain_apache__vhost(“example.com”) .with ( “port” => “80”, “docroot” => “/srv/www/example.com/html” … ) } end
  • 34. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Testing Learning from Development - Integration Testing describe package(“httpd”) do it { should be_installed } end describe service(“httpd”) do it { should be_enabled } it { should be_running } end describe file(“/srv/www/example.com/html”) do it { should exist } it { should be_directory } it { be_owned_by “root” } end
  • 35. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Puppet Reporting http://theforeman.org
  • 36. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Questions? twitter: @ripienaar email: rip@devco.net blog: www.devco.net github: ripienaar freenode: Volcane slack.puppet.com: ripienaar http://learn.puppet.com/ https://www.devco.net/