SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Config Management with
Puppet, GIT & some Ruby magic
Stefan Peer – System Engineer
11.11.2016
 Head organization of 369 cooperatives
 with more than 124.000 single members
 Service provider and consulting
 IT, HR, financial, legal, education and much more
 310 employees in total
 40% in IT
 Raiffeisen Informationssystem (RIS)
 IT service provider of the Raiffeisen Group
 Datacenters in Bolzano and Milano
2
Raiffeisenverband Südtirol
 Applications running on different platforms
 z/OS (Mainframe), Linux, Solaris, Windows
 Heavily rely on virtualization and automation
 VMware, Solaris container
3
IT Systems in RIS
5 5 6 6 7 7 7 8 8 8 8
0
100
200
300
400
500
600
700
800
900
1000
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
# VMs
# Administrators
Configuration Management is the process of
standardizing resource configurations and enforcing
their state across IT infrastructure in an automated yet
agile manner.
(Puppetlabs)
4
Definition
 Growth
 same effort to make a change on 1 or 1000 servers
 Central Governance
 in a heterogeneous environment with various OS
 Traceability / Reporting
 obliged by certifications such as PCI/DSS or ISAE3402
 Rollback
 revert changes
 Durability
 keep config-state consistent
 Consistent Environments
 hand over changes: Test => QA => Production
5
Why Configuration Management?
6
Admin‘s daily life … before CM – part 1
Hey Linux!
We need to change the IP Address
of our secondary DNS server!
Okay, don't worry. Gimme a week.
Don’t have
time for that!
Hmm, I could write a
script that SSHes into
all our servers and
applies the change!
But what about
this other
Debian server?
7
Admin‘s daily life … before CM – part 2
Hey Solaris!
We need to change the IP Address
of our secondary DNS server!
Okay, lot’s of manual work, but we
will have it done by next week!
Hmm, good
task for our
intern 
Damn!
Project delayed
for another week!
8
Admin‘s daily life … with CM
Hey Linux!
We need to change the IP Address
of our secondary DNS server!
Ok, hang on, I’ll commit the change into CM.
Done, change will be rolled out within half an hour.
Btw. to Solaris servers as well!
Thanks man! Good work!
Where could
I go skiing
tomorrow?
9
Let the puppets dance!
Puppet Master
1. facts
ex.
I am Frida, a
RHEL 6.8
with 2 cores
Foreman
4. reference config
ex. Apache must be running,
listening on Port 443
2. ask ENC
ex. who is Frida?
3. classes and params
ex. Apache server located
in Bolzano
each server,
every 30 minutes
10
Let the puppets dance!
Puppet Master
6. report
ex.
service Apache
failed to start
Foreman
7. forward report
ex. service Apache failed
to start on Frida
5. apply reference config
ex. service httpd start
ex. for Solaris it would be:
svcadm enable /network/http:apache22
 Assign Puppet Classes to hosts (ENC)
 ex. Icinga Master host
 What are your servers doing?
 What has changed on server X?
11
Foreman
12
What can I do with Puppet?
 Manage files
file {'/etc/httpd/conf/httpd.conf':
ensure => present,
content => template('${module_name}/httpd.conf.erb'),
owner => 'root',
group => 'root',
mode => '0644',
}
 Manage services
service {'httpd':
ensure => running,
enable => true,
}
13
What can I do with Puppet?
 Install or uninstall software
package {'httpd':
ensure => installed,
}
 Execute commands
 Create Cron jobs
 Manage certificates and Java Keystores
 and much, much more …
package {'tcpdump':
ensure => absent,
}
14
Puppet manifest
class ris_ftp::server (
$local_root_dir,
){
package { 'vsftpd':
ensure => installed
}
-> file { '/etc/vsftpd/vsftpd.conf':
content => template("${module_name}/vsftpd.conf.erb"),
notify => Service['vsftpd'],
}
service { 'vsftpd':
ensure => running,
enable => true,
}
}
15
GIT – the place where all the Puppet code is stored
 One special GIT repo that connects everything together
 we call it „control-repo“
 GIT branch per environment
 New environment needed? Simply fork a branch!
16
Dynamic environment creation with r10k
Puppetfile
ris_dns => Commit 12
ris_ssh => Commit 3
ris_icinga => Commit 45
Puppetfile
ris_dns => Commit 11
ris_ssh => Commit 2
ris_icinga => Commit 40
Puppetfile
ris_dns => Commit 11
ris_icinga => Commit 36
Merge changes Merge changes
TEST QA PRODUCTION
17
Puppetfile in real – and that‘s just a part of it
 History of our control-repo
 Including current state of each branch, .i.e., environment
18
control-repo in real
 Nearly impossible to manage control-repo + Puppetfile by hand
 That‘s why we wrote a Ruby toolset that helps us managing it
 we call it ris-puppet
 Examples:
 ris-puppet module validate
 ris-puppet module deploy --env=test
 ris-puppet environment create --env=stefan --from=production
 ris-puppet foreman import
 Integrated also in GIT server via hooks
 ex. reject commit if there are syntax errors
19
Now, where‘s the Ruby magic?
20
Questions ?

Contenu connexe

Tendances

Tendances (20)

Linux server backup solution
Linux server backup solutionLinux server backup solution
Linux server backup solution
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
Sim a Microsoft Utiliza OpenSource em DevOps!
Sim a Microsoft Utiliza OpenSource em DevOps!Sim a Microsoft Utiliza OpenSource em DevOps!
Sim a Microsoft Utiliza OpenSource em DevOps!
 
Ios examination commands
Ios examination commands Ios examination commands
Ios examination commands
 
systemd @ Facebook -- a year later
systemd @ Facebook -- a year latersystemd @ Facebook -- a year later
systemd @ Facebook -- a year later
 
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
Puppet Availability and Performance at 100K Nodes - PuppetConf 2014
 
Nfs
NfsNfs
Nfs
 
CentOS Server Gui Initial Configuration
CentOS Server Gui Initial ConfigurationCentOS Server Gui Initial Configuration
CentOS Server Gui Initial Configuration
 
StackiFest16: What's Next in Stacki - Mason Katz
StackiFest16: What's Next in Stacki - Mason Katz StackiFest16: What's Next in Stacki - Mason Katz
StackiFest16: What's Next in Stacki - Mason Katz
 
StackiFest16: Building a Cluster with Stacki - Greg Bruno
StackiFest16: Building a Cluster with Stacki - Greg BrunoStackiFest16: Building a Cluster with Stacki - Greg Bruno
StackiFest16: Building a Cluster with Stacki - Greg Bruno
 
Linux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabLinux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and Gitlab
 
Instalar MySQL CentOS
Instalar MySQL CentOSInstalar MySQL CentOS
Instalar MySQL CentOS
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12
"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12
"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12
 
Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8
 
Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014Experiences from Running Masterless Puppet - PuppetConf 2014
Experiences from Running Masterless Puppet - PuppetConf 2014
 
Habilitar repositorio EPEL RHEL
Habilitar repositorio EPEL RHELHabilitar repositorio EPEL RHEL
Habilitar repositorio EPEL RHEL
 
RHCE Training
RHCE TrainingRHCE Training
RHCE Training
 
Puppet meetup testing
Puppet meetup testingPuppet meetup testing
Puppet meetup testing
 
Cl210 lab
Cl210 labCl210 lab
Cl210 lab
 

Similaire à SFScon16 - Stefan Peer: "Config management with Puppet, Git and some Ruby magic"

Puppet Camp Presentation 15
Puppet Camp Presentation 15Puppet Camp Presentation 15
Puppet Camp Presentation 15
Dejan Golja
 
SAMKUMAR- Sr.Linux SystemAdministrator (1)
SAMKUMAR- Sr.Linux SystemAdministrator (1)SAMKUMAR- Sr.Linux SystemAdministrator (1)
SAMKUMAR- Sr.Linux SystemAdministrator (1)
gandi samkumar
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administrators
Susant Sahani
 
V mware
V mwareV mware
V mware
dvmug1
 
Amol_New_Resume.[1]
Amol_New_Resume.[1]Amol_New_Resume.[1]
Amol_New_Resume.[1]
Amol Gadhave
 

Similaire à SFScon16 - Stefan Peer: "Config management with Puppet, Git and some Ruby magic" (20)

A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
SREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted GraphiteSREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
SREcon Europe 2016 - Full-mesh IPsec network at Hosted Graphite
 
systemd
systemdsystemd
systemd
 
Puppet Camp Presentation 15
Puppet Camp Presentation 15Puppet Camp Presentation 15
Puppet Camp Presentation 15
 
Puppet for Developers
Puppet for DevelopersPuppet for Developers
Puppet for Developers
 
Dynamic Hadoop Clusters
Dynamic Hadoop ClustersDynamic Hadoop Clusters
Dynamic Hadoop Clusters
 
SAMKUMAR- Sr.Linux SystemAdministrator (1)
SAMKUMAR- Sr.Linux SystemAdministrator (1)SAMKUMAR- Sr.Linux SystemAdministrator (1)
SAMKUMAR- Sr.Linux SystemAdministrator (1)
 
Puppet Camp Boston 2014: Keynote
Puppet Camp Boston 2014: Keynote Puppet Camp Boston 2014: Keynote
Puppet Camp Boston 2014: Keynote
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administrators
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administrators
 
Puppet devops wdec
Puppet devops wdecPuppet devops wdec
Puppet devops wdec
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015
 
2013 linux days final
2013 linux days final2013 linux days final
2013 linux days final
 
V mware
V mwareV mware
V mware
 
Puppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMwarePuppet Primer, Robbie Jerrom, Solution Architect VMware
Puppet Primer, Robbie Jerrom, Solution Architect VMware
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 
Amol_New_Resume.[1]
Amol_New_Resume.[1]Amol_New_Resume.[1]
Amol_New_Resume.[1]
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Cl221
Cl221Cl221
Cl221
 

Plus de South Tyrol Free Software Conference

SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
South Tyrol Free Software Conference
 
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
South Tyrol Free Software Conference
 
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
South Tyrol Free Software Conference
 
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelinesSFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
South Tyrol Free Software Conference
 
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
South Tyrol Free Software Conference
 
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis MapsSFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
South Tyrol Free Software Conference
 

Plus de South Tyrol Free Software Conference (20)

SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
SFSCON23 - Rufai Omowunmi Balogun - SMODEX – a Python package for understandi...
 
SFSCON23 - Roberto Innocenti - From the design to reality is here the Communi...
SFSCON23 - Roberto Innocenti - From the design to reality is here the Communi...SFSCON23 - Roberto Innocenti - From the design to reality is here the Communi...
SFSCON23 - Roberto Innocenti - From the design to reality is here the Communi...
 
SFSCON23 - Martin Rabanser - Real-time aeroplane tracking and the Open Data Hub
SFSCON23 - Martin Rabanser - Real-time aeroplane tracking and the Open Data HubSFSCON23 - Martin Rabanser - Real-time aeroplane tracking and the Open Data Hub
SFSCON23 - Martin Rabanser - Real-time aeroplane tracking and the Open Data Hub
 
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
SFSCON23 - Marianna d'Atri Enrico Zanardo - How can Blockchain technologies i...
 
SFSCON23 - Lucas Lasota - The Future of Connectivity, Open Internet and Human...
SFSCON23 - Lucas Lasota - The Future of Connectivity, Open Internet and Human...SFSCON23 - Lucas Lasota - The Future of Connectivity, Open Internet and Human...
SFSCON23 - Lucas Lasota - The Future of Connectivity, Open Internet and Human...
 
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
SFSCON23 - Giovanni Giannotta - Intelligent Decision Support System for trace...
 
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelinesSFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
SFSCON23 - Elena Maines - Embracing CI/CD workflows for building ETL pipelines
 
SFSCON23 - Christian Busse - Free Software and Open Science
SFSCON23 - Christian Busse - Free Software and Open ScienceSFSCON23 - Christian Busse - Free Software and Open Science
SFSCON23 - Christian Busse - Free Software and Open Science
 
SFSCON23 - Charles H. Schulz - Why open digital infrastructure matters
SFSCON23 - Charles H. Schulz - Why open digital infrastructure mattersSFSCON23 - Charles H. Schulz - Why open digital infrastructure matters
SFSCON23 - Charles H. Schulz - Why open digital infrastructure matters
 
SFSCON23 - Andrea Vianello - Achieving FAIRness with EDP-portal
SFSCON23 - Andrea Vianello - Achieving FAIRness with EDP-portalSFSCON23 - Andrea Vianello - Achieving FAIRness with EDP-portal
SFSCON23 - Andrea Vianello - Achieving FAIRness with EDP-portal
 
SFSCON23 - Thomas Aichner - How IoT and AI are revolutionizing Mass Customiza...
SFSCON23 - Thomas Aichner - How IoT and AI are revolutionizing Mass Customiza...SFSCON23 - Thomas Aichner - How IoT and AI are revolutionizing Mass Customiza...
SFSCON23 - Thomas Aichner - How IoT and AI are revolutionizing Mass Customiza...
 
SFSCON23 - Stefan Mutschlechner - Smart Werke Meran
SFSCON23 - Stefan Mutschlechner - Smart Werke MeranSFSCON23 - Stefan Mutschlechner - Smart Werke Meran
SFSCON23 - Stefan Mutschlechner - Smart Werke Meran
 
SFSCON23 - Mirko Boehm - European regulators cast their eyes on maturing OSS ...
SFSCON23 - Mirko Boehm - European regulators cast their eyes on maturing OSS ...SFSCON23 - Mirko Boehm - European regulators cast their eyes on maturing OSS ...
SFSCON23 - Mirko Boehm - European regulators cast their eyes on maturing OSS ...
 
SFSCON23 - Marco Pavanelli - Monitoring the fleet of Sasa with free software
SFSCON23 - Marco Pavanelli - Monitoring the fleet of Sasa with free softwareSFSCON23 - Marco Pavanelli - Monitoring the fleet of Sasa with free software
SFSCON23 - Marco Pavanelli - Monitoring the fleet of Sasa with free software
 
SFSCON23 - Marco Cortella - KNOWAGE and AICS for 2030 agenda SDG goals monito...
SFSCON23 - Marco Cortella - KNOWAGE and AICS for 2030 agenda SDG goals monito...SFSCON23 - Marco Cortella - KNOWAGE and AICS for 2030 agenda SDG goals monito...
SFSCON23 - Marco Cortella - KNOWAGE and AICS for 2030 agenda SDG goals monito...
 
SFSCON23 - Lina Ceballos - Interoperable Europe Act - A real game changer
SFSCON23 - Lina Ceballos - Interoperable Europe Act - A real game changerSFSCON23 - Lina Ceballos - Interoperable Europe Act - A real game changer
SFSCON23 - Lina Ceballos - Interoperable Europe Act - A real game changer
 
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
SFSCON23 - Johannes Näder Linus Sehn - Let’s monitor implementation of Free S...
 
SFSCON23 - Gabriel Ku Wei Bin - Why Do We Need A Next Generation Internet
SFSCON23 - Gabriel Ku Wei Bin - Why Do We Need A Next Generation InternetSFSCON23 - Gabriel Ku Wei Bin - Why Do We Need A Next Generation Internet
SFSCON23 - Gabriel Ku Wei Bin - Why Do We Need A Next Generation Internet
 
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis MapsSFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
SFSCON23 - Edoardo Scepi - The Brand-New Version of IGis Maps
 
SFSCON23 - Davide Vernassa - Empowering Insights Unveiling the latest innova...
SFSCON23 - Davide Vernassa - Empowering Insights  Unveiling the latest innova...SFSCON23 - Davide Vernassa - Empowering Insights  Unveiling the latest innova...
SFSCON23 - Davide Vernassa - Empowering Insights Unveiling the latest innova...
 

Dernier

Dernier (20)

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
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

SFScon16 - Stefan Peer: "Config management with Puppet, Git and some Ruby magic"

  • 1. Config Management with Puppet, GIT & some Ruby magic Stefan Peer – System Engineer 11.11.2016
  • 2.  Head organization of 369 cooperatives  with more than 124.000 single members  Service provider and consulting  IT, HR, financial, legal, education and much more  310 employees in total  40% in IT  Raiffeisen Informationssystem (RIS)  IT service provider of the Raiffeisen Group  Datacenters in Bolzano and Milano 2 Raiffeisenverband Südtirol
  • 3.  Applications running on different platforms  z/OS (Mainframe), Linux, Solaris, Windows  Heavily rely on virtualization and automation  VMware, Solaris container 3 IT Systems in RIS 5 5 6 6 7 7 7 8 8 8 8 0 100 200 300 400 500 600 700 800 900 1000 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 # VMs # Administrators
  • 4. Configuration Management is the process of standardizing resource configurations and enforcing their state across IT infrastructure in an automated yet agile manner. (Puppetlabs) 4 Definition
  • 5.  Growth  same effort to make a change on 1 or 1000 servers  Central Governance  in a heterogeneous environment with various OS  Traceability / Reporting  obliged by certifications such as PCI/DSS or ISAE3402  Rollback  revert changes  Durability  keep config-state consistent  Consistent Environments  hand over changes: Test => QA => Production 5 Why Configuration Management?
  • 6. 6 Admin‘s daily life … before CM – part 1 Hey Linux! We need to change the IP Address of our secondary DNS server! Okay, don't worry. Gimme a week. Don’t have time for that! Hmm, I could write a script that SSHes into all our servers and applies the change! But what about this other Debian server?
  • 7. 7 Admin‘s daily life … before CM – part 2 Hey Solaris! We need to change the IP Address of our secondary DNS server! Okay, lot’s of manual work, but we will have it done by next week! Hmm, good task for our intern  Damn! Project delayed for another week!
  • 8. 8 Admin‘s daily life … with CM Hey Linux! We need to change the IP Address of our secondary DNS server! Ok, hang on, I’ll commit the change into CM. Done, change will be rolled out within half an hour. Btw. to Solaris servers as well! Thanks man! Good work! Where could I go skiing tomorrow?
  • 9. 9 Let the puppets dance! Puppet Master 1. facts ex. I am Frida, a RHEL 6.8 with 2 cores Foreman 4. reference config ex. Apache must be running, listening on Port 443 2. ask ENC ex. who is Frida? 3. classes and params ex. Apache server located in Bolzano each server, every 30 minutes
  • 10. 10 Let the puppets dance! Puppet Master 6. report ex. service Apache failed to start Foreman 7. forward report ex. service Apache failed to start on Frida 5. apply reference config ex. service httpd start ex. for Solaris it would be: svcadm enable /network/http:apache22
  • 11.  Assign Puppet Classes to hosts (ENC)  ex. Icinga Master host  What are your servers doing?  What has changed on server X? 11 Foreman
  • 12. 12 What can I do with Puppet?  Manage files file {'/etc/httpd/conf/httpd.conf': ensure => present, content => template('${module_name}/httpd.conf.erb'), owner => 'root', group => 'root', mode => '0644', }  Manage services service {'httpd': ensure => running, enable => true, }
  • 13. 13 What can I do with Puppet?  Install or uninstall software package {'httpd': ensure => installed, }  Execute commands  Create Cron jobs  Manage certificates and Java Keystores  and much, much more … package {'tcpdump': ensure => absent, }
  • 14. 14 Puppet manifest class ris_ftp::server ( $local_root_dir, ){ package { 'vsftpd': ensure => installed } -> file { '/etc/vsftpd/vsftpd.conf': content => template("${module_name}/vsftpd.conf.erb"), notify => Service['vsftpd'], } service { 'vsftpd': ensure => running, enable => true, } }
  • 15. 15 GIT – the place where all the Puppet code is stored
  • 16.  One special GIT repo that connects everything together  we call it „control-repo“  GIT branch per environment  New environment needed? Simply fork a branch! 16 Dynamic environment creation with r10k Puppetfile ris_dns => Commit 12 ris_ssh => Commit 3 ris_icinga => Commit 45 Puppetfile ris_dns => Commit 11 ris_ssh => Commit 2 ris_icinga => Commit 40 Puppetfile ris_dns => Commit 11 ris_icinga => Commit 36 Merge changes Merge changes TEST QA PRODUCTION
  • 17. 17 Puppetfile in real – and that‘s just a part of it
  • 18.  History of our control-repo  Including current state of each branch, .i.e., environment 18 control-repo in real
  • 19.  Nearly impossible to manage control-repo + Puppetfile by hand  That‘s why we wrote a Ruby toolset that helps us managing it  we call it ris-puppet  Examples:  ris-puppet module validate  ris-puppet module deploy --env=test  ris-puppet environment create --env=stefan --from=production  ris-puppet foreman import  Integrated also in GIT server via hooks  ex. reject commit if there are syntax errors 19 Now, where‘s the Ruby magic?