SlideShare a Scribd company logo
Migration to Satellite 6
Puppet introduction
Michael Lessard
Senior Solutions Architect, Red Hat
mlessard@redhat.com
michaellessard
November 2015
2 Migration to Satellite 6
Agenda
● Configuration management with Satellite 5.x
● Quick introduction to Satellite 6
● Introduction to Puppet
● Puppet installation (RHEL 6 and 7)
● Demonstration : deploy some files
● Puppet and Satellite 6
● Considerations if you want to move to Satellite 6
3
Migration to Satellite 6
Satellite 5.x
Configuration management
4 Migration to Satellite 6
Satellite 5.x – Configuration management features
● Manage all of your machines configurations from one
central location
● Create configuration channels for a machines or a
group of machines
● Create new files or upload existing config files
● Manage revision, compare versions
● Deploy configuration changes as part of config
management or associate with kickstart process
5 Migration to Satellite 6
6 Migration to Satellite 6
7 Migration to Satellite 6
8 Migration to Satellite 6
Row 1 Row 2 Row 3 Row 4
0
2
4
6
8
10
12
Column 1
Column 2
Column 3
9 Migration to Satellite 6
10 Migration to Satellite 6
Satellite 5.x – Configuration management cli
[r/]# rhncfg-manager create-channel rhel6-prod
Creating config channel rhel6-prod
[r/]# rhncfg-manager add --channel rhel6-prod /etc/hosts
Using server name satellitedemo.mlc.dom
Pushing to channel rhel6-prod
[r/]# rhncfg-manager diff --channel=rhel6-prod /etc/hosts
- 192.168.100.4 vm2.mlc.dom
+ 192.168.100.56 friday.mlc.dom
[r/]# rhncfg-client get /etc/hosts
Deploying /etc/hosts
11 Migration to Satellite 6
Satellite 6 – Foundation
Content Management
12 Migration to Satellite 6
Red Hat Satellite 5 & 6 Core Capabilities
✔ Provision 10s – 1000s
systems
✔ Configuration Management
✔ Automated Software
Distribution
✔ Lifecycle Management
✔ Administrator Dashboard
✔ Provision 10s – 10,000+ systems
✔ Recipe-Style Configuration
Management
✔ Automated Software Distribution
✔ Refined Lifecycle Management
✔ Customizable Dashboards
✔ Simplified Content Management
✔ Drift Management
✔ Federated Services &
Management
✔ Deploy on VMware, RHEV, EC2,
and OpenStack
Red Hat Satellite 5 Red Hat Satellite 6
13
Migration to Satellite 6
Introduction to Puppet
14 Migration to Satellite 6
What is Puppet ?
● Think of it as infrastructure code
● Describe stats, no step
● Paint a picture of your ideal and most clean system
Puppet does the rest
● Puppet focuses on managing constructs like users,
services and packages
● Puppet can detect the current state of the system
(Facter)
● Won’t make changes unless necessary
15 Migration to Satellite 6
Puppet Architecture
16 Migration to Satellite 6
PUPPET DSL
Example – managing ntp services with puppet
class ntp {
package { "ntp":
ensure => installed,
}
file { "ntp.conf":
path => '/etc/ntp.conf',
ensure => file,
require => Package[ "ntp" ],
source => "puppet:///modules/ntp/ntp.conf",
}
service { 'ntp':
name => 'ntpd',
ensure => running,
enable => true,
subscribe => File[ "ntp.conf" ],
}
}
PACKAGEPACKAGE
CONFIGURATIONCONFIGURATION
SERVICESERVICE
17 Migration to Satellite 6
Example – managing sshd service
class sshd {
augeas { "sshd_config":
context => "/files/etc/ssh/sshd_config",
changes => [
"set PermitRootLogin yes",
"set UsePAM no",
],
notify => Service[ "sshd" ]
}
service { "sshd":
ensure => running,
enable => true,
hasrestart => true,
}
}
CONFIGURATIONCONFIGURATION
SERVICESERVICE
18 Migration to Satellite 6
How does Puppet know about your system ?
● Using the Ruby library Facter
● Facter supports a large numbers of predefined facts
● Customs facts can be defined
# facter
architecture => x86_64
bios_vendor => Seabios
bios_version => 0.5.1
blockdevices => vda,vdb
interfaces => eth0,lo
ipaddress => 172.16.27.44
ipaddress_eth0 => 172.16.27.44
is_virtual => true
kernel => Linux
kernelmajversion => 2.6
kernelrelease => 2.6.32-431.el6.x86_64
kernelversion => 2.6.32
etc, ...
19
Migration to Satellite 6
Installation
20 Migration to Satellite 6
Installation Puppet server (RHEL 6 – April 2014)
[r/]# rhn-channel -a -c rhel-x86_64-server-optional-6
[r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
[r/]# yum install puppet-server puppet
[r/]# puppet --version
3.4.3
[r/]# chkconfig puppetmaster on ; service puppetmaster start
[r/]# chkconfig puppet on ; service puppet start
DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
21 Migration to Satellite 6
Installation Puppet client (RHEL 6 – april 2014)
[r/]# rhn-channel -a -c rhel-x86_64-server-optional-6
[r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
[r/]# yum install puppet
[r/]# vim/etc/puppet/puppet.conf (add the following at the bottom)
server = puppet.example.com
runinterval = 120
[r/]# chkconfig puppet on ; service puppet start
On the puppetmaster server, sign the certs (possible to auto-sign)
[r/]# puppet cert sign puppet-client.example.com
DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
22 Migration to Satellite 6
Installation Puppet server (RHEL 7 - nov2015)
[r/]# rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
[r/]# yum install puppet-server puppet
[r/]# puppet --version
3.8.4
[r/]# systemctl start puppetmaster ; systemctl enable puppetmaster
[r/]# systemctl status puppetmaster
DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
23 Migration to Satellite 6
Installation Puppet client (RHEL 7 – Nov 2015)
[r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
[r/]# yum install puppet
[r/]# vim/etc/puppet/puppet.conf (add the following at the bottom)
server = puppet.example.com
runinterval = 120
[r/]# systemctl start puppet; systemctl enable puppet
On the puppetmaster server, sign the certs (possible to auto-sign)
[r/]# puppet cert list
[r/]# puppet cert sign puppet-client.example.com
DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONISATION
24
Migration to Satellite 6
Demonstration
25 Migration to Satellite 6
Example 1/3 - deploy some files/directory
On the puppetmaster server :
[r/]# cd /etc/puppet/modules
[r/]# puppet module generate michael-specdirs
[r/]# mv michael-specdirs specdirs
[r/]# vim /etc/puppet/modules/specdirs/manifests/init.pp
class specdirs {
file { ['/test/','/test/etc','/test/etc/rc/','/test/etc/rc/shared']:
ensure => "directory",
owner => "root",
group => "root",
mode => "750",
}
}
26 Migration to Satellite 6
Example 2/3
[r/]# vim /etc/puppet/manifests/site.pp
#-----------------------------------------------------
# site.pp
#-----------------------------------------------------
include specdirs
[r/]# puppet apply /etc/puppet/manifests/site.pp
Notice: Compiled catalog for puppetmaster.mlc.dom in environment production in 0.05
seconds
Notice: /Stage[main]/Specdirs/File[/test/]/ensure: created
Notice: /Stage[main]/Specdirs/File[/test/etc]/ensure: created
Notice: /Stage[main]/Specdirs/File[/test/etc/rc/]/ensure: created
Notice: /Stage[main]/Specdirs/File[/test/etc/rc/shared]/ensure: created
Notice: Finished catalog run in 0.09 seconds
On the puppet client :
Test the communication with the server
[r/]# puppet agent --test --waitforcert 60
27 Migration to Satellite 6
Example 3/3
On the puppetmaster server :
[r/]# cd /etc/puppet/modules
[r/]# puppet module build specdirs
Notice: Building /etc/puppet/modules/mic-test for release
Module built: /etc/puppet/modules/specdirs/pkg/specdirs-0.1.0.tar.gz
You will be able to upload that module in Satellite 6
Red Hat Satellite 6 includes a utility called pulp-puppet-module-builder. This
tool checks out repositories containing a set of modules, builds the modules,
and publishes them in a structure for Satellite 6 to synchronize.
28
Migration to Satellite 6
PUPPET AND SATELLITE 6
29 Migration to Satellite 6
What Puppet does than Satellite 5 doesn’t
● Start/restart services
● Restart a service after a configuration change
● Create users, remove users
● Aware of your systems state
● Enforce something
● Manages BSD/*nix and Windows (2003, 2008, 7)
● Resources relationship
● Modify an existing configuration file
30 Migration to Satellite 6
Puppet / Satellite 6 considerations
● Keep Puppet modules as modular as possible and
single tasked
● Using role and profile classes is recommended.
● This will allow users to map the modules or role and
profile classes to Satellite host groups.
● User should consider building module artifacts as
archives as if using Puppet Forge. This will allow
import of modules into Satellite 6 and for it to display
details of the module.
● Define Modulefiles for modules so dependencies are
explicitly declared
31 Migration to Satellite 6
Puppet / Satellite 6 considerations
● Manifests inside of modules are supported, but
manifests containing classes outside of modules is
not supported
● The use of node definitions within manifests is not
supported
node vm1.example.com {
file { '/tmp/test.txt' :
content => "Bye bye !!n",
}
}
● Hiera function are supported. (Foreman, alt: smart
variables)
32 Migration to Satellite 6
Puppet Forge
● A community driven web service
● A repository of modules
[r/]# puppet module list
[r/]# puppet module search apache
[r/]# puppet module install puppetlabs-apache
[r/]# puppet module upgrade puppetlabs-apach –version -.0.3
http://docs.puppetlabs.com/guides/module_guides/bgtm.html
33 Migration to Satellite 6
34 Migration to Satellite 6
Puppet debugging notes
● Port 8140
● Cert troubles
● yum remove puppet
● rm -rf /var/lib/puppet
● rm -rf /etc/puppet
● On master
# puppet cert list (to see which ones require a signature)
# puppet cert list --all (show all certificates)
# puppet cert clean vm1.mlc.dom
# puppet cert revoke vm1.mlc.dom
35 Migration to Satellite 6
Scaling Puppet
● WEBrick, default webserver, 10 nodes max
● Passenger (sat6) or Mongrel
● Passenger : mod_rail or mod_rack (Apache 2 module)
● Don’t use the deamon, use cronjob
● Puppet agent --onetime
● No central host (rsync, git) - scales infinitely
● More tricks in the puppet documentation
36
Migration to Satellite 6
Questions ?
37
Migration to Satellite 6
THANK YOU !
Michael Lessard
Senior Solutions Architect, Red Hat
mlessard@redhat.com
michaellessard

More Related Content

PDF
Integrate Openshift with Cloudforms
PDF
Code review and automated testing for Puppet code
ODP
CfgMgmtCamp 2015 - Managing the Content Lifecycle with Katello
PPTX
High availability for puppet - 2016
PDF
How to integrate_custom_openstack_services_with_devstack
ODP
OpenShift Origin Internals
PPT
Openshift + Openstack + Fedora = Awesome
PPTX
Deep dive networking
Integrate Openshift with Cloudforms
Code review and automated testing for Puppet code
CfgMgmtCamp 2015 - Managing the Content Lifecycle with Katello
High availability for puppet - 2016
How to integrate_custom_openstack_services_with_devstack
OpenShift Origin Internals
Openshift + Openstack + Fedora = Awesome
Deep dive networking

What's hot (20)

PDF
Openstack il2014 staypuft- your friendly foreman openstack installer
PDF
Real-time Cloud Management with SaltStack
PDF
Deploying RDO OpenStack with a pair of plugins
PPTX
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
PPTX
Exploring the Future of Helm
PDF
Real-time Infrastructure Management with SaltStack - OpenWest 2013
PDF
[TechTalks] Learning Configuration Management with SaltStack (Advanced Concepts)
PDF
Running CentOS on the Facebook fleet
PDF
Configuration and lifecycle in Mixed environments
PDF
Ae appliance upgrade_cent_os62-65
PDF
How Helm, The Package Manager For Kubernetes, Works
PDF
A Universe From Nothing
PDF
Building and Running OpenStack on POWER8
PPTX
openATTIC using grafana and prometheus
PPTX
Nagios intro
PPTX
Deployer in Pipelines
PDF
Hyperscale SIG update
PDF
Kubernetes Networking
PDF
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
PDF
kubernetes - minikube - getting started
Openstack il2014 staypuft- your friendly foreman openstack installer
Real-time Cloud Management with SaltStack
Deploying RDO OpenStack with a pair of plugins
Make stateful apps in Kubernetes a no brainer with Pure Storage and GitOps
Exploring the Future of Helm
Real-time Infrastructure Management with SaltStack - OpenWest 2013
[TechTalks] Learning Configuration Management with SaltStack (Advanced Concepts)
Running CentOS on the Facebook fleet
Configuration and lifecycle in Mixed environments
Ae appliance upgrade_cent_os62-65
How Helm, The Package Manager For Kubernetes, Works
A Universe From Nothing
Building and Running OpenStack on POWER8
openATTIC using grafana and prometheus
Nagios intro
Deployer in Pipelines
Hyperscale SIG update
Kubernetes Networking
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
kubernetes - minikube - getting started
Ad

Viewers also liked (20)

PDF
Red Hat Satellite 6 - Automation with Puppet
PDF
RH Summit 2015 - Using RH Management Tools In A Hybrid Cloud
PDF
Samsung presentation
PPTX
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
PPT
Sebastien goasguen cloud stack and docker
PPTX
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
PDF
OpenNMS Reporting - Enhancement
PDF
Apache CXF New Directions in Integration
PDF
DevOps, A path to Enterprises to Adopt [Decoding DevOps Conference - InfoSep...
PDF
OpenStack and CloudForms Do's and Dont's
PDF
Intro to-puppet
PPTX
Replication - Nick Carboni - ManageIQ Design Summit 2016
PDF
Managed Services - Mike Hulsman - ManageIQ Design Summit 2016
PPTX
OpenStack Hybrid Cloud Management and Orchestration - James Bond
PDF
Introduction to OpenNMS
ODP
Building Enterprise Clouds - Key Considerations and Strategies - RED HAT
PDF
Chef - Configuration Management for the Cloud
PPTX
UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016
PDF
PDF
RHTE2015_CloudForms_OpenStack
Red Hat Satellite 6 - Automation with Puppet
RH Summit 2015 - Using RH Management Tools In A Hybrid Cloud
Samsung presentation
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Sebastien goasguen cloud stack and docker
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenNMS Reporting - Enhancement
Apache CXF New Directions in Integration
DevOps, A path to Enterprises to Adopt [Decoding DevOps Conference - InfoSep...
OpenStack and CloudForms Do's and Dont's
Intro to-puppet
Replication - Nick Carboni - ManageIQ Design Summit 2016
Managed Services - Mike Hulsman - ManageIQ Design Summit 2016
OpenStack Hybrid Cloud Management and Orchestration - James Bond
Introduction to OpenNMS
Building Enterprise Clouds - Key Considerations and Strategies - RED HAT
Chef - Configuration Management for the Cloud
UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016
RHTE2015_CloudForms_OpenStack
Ad

Similar to Satellite 6 - Pupet Introduction (20)

PDF
SCM Puppet: from an intro to the scaling
PDF
Drupal 8 update: May 2014. Migrate in core.
PPTX
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PDF
PaaSTA: Running applications at Yelp
PDF
Deploying PostgreSQL on Kubernetes
PPTX
Plone deployment made easy
KEY
Automating Drupal Development: Makefiles, features and beyond
PDF
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
PDF
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
PDF
PaaSTA: Autoscaling at Yelp
PDF
Workflow story: Theory versus practice in Large Enterprises
PDF
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
PDF
Deployer - Deployment tool for PHP
PDF
How to Puppetize Google Cloud Platform - PuppetConf 2014
PDF
Lean Drupal Repositories with Composer and Drush
PDF
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
PDF
L.A.M.P Installation Note --- CentOS 6.5
PDF
SHARE.ORG Orlando 2015
PDF
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
SCM Puppet: from an intro to the scaling
Drupal 8 update: May 2014. Migrate in core.
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PaaSTA: Running applications at Yelp
Deploying PostgreSQL on Kubernetes
Plone deployment made easy
Automating Drupal Development: Makefiles, features and beyond
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
图文详解安装Net backup 6.5备份恢复oracle 10g rac 数据库
PaaSTA: Autoscaling at Yelp
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Deployer - Deployment tool for PHP
How to Puppetize Google Cloud Platform - PuppetConf 2014
Lean Drupal Repositories with Composer and Drush
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
L.A.M.P Installation Note --- CentOS 6.5
SHARE.ORG Orlando 2015
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
KodekX | Application Modernization Development
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
Modernizing your data center with Dell and AMD
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Digital-Transformation-Roadmap-for-Companies.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf

Satellite 6 - Pupet Introduction

  • 1. Migration to Satellite 6 Puppet introduction Michael Lessard Senior Solutions Architect, Red Hat mlessard@redhat.com michaellessard November 2015
  • 2. 2 Migration to Satellite 6 Agenda ● Configuration management with Satellite 5.x ● Quick introduction to Satellite 6 ● Introduction to Puppet ● Puppet installation (RHEL 6 and 7) ● Demonstration : deploy some files ● Puppet and Satellite 6 ● Considerations if you want to move to Satellite 6
  • 3. 3 Migration to Satellite 6 Satellite 5.x Configuration management
  • 4. 4 Migration to Satellite 6 Satellite 5.x – Configuration management features ● Manage all of your machines configurations from one central location ● Create configuration channels for a machines or a group of machines ● Create new files or upload existing config files ● Manage revision, compare versions ● Deploy configuration changes as part of config management or associate with kickstart process
  • 5. 5 Migration to Satellite 6
  • 6. 6 Migration to Satellite 6
  • 7. 7 Migration to Satellite 6
  • 8. 8 Migration to Satellite 6 Row 1 Row 2 Row 3 Row 4 0 2 4 6 8 10 12 Column 1 Column 2 Column 3
  • 9. 9 Migration to Satellite 6
  • 10. 10 Migration to Satellite 6 Satellite 5.x – Configuration management cli [r/]# rhncfg-manager create-channel rhel6-prod Creating config channel rhel6-prod [r/]# rhncfg-manager add --channel rhel6-prod /etc/hosts Using server name satellitedemo.mlc.dom Pushing to channel rhel6-prod [r/]# rhncfg-manager diff --channel=rhel6-prod /etc/hosts - 192.168.100.4 vm2.mlc.dom + 192.168.100.56 friday.mlc.dom [r/]# rhncfg-client get /etc/hosts Deploying /etc/hosts
  • 11. 11 Migration to Satellite 6 Satellite 6 – Foundation Content Management
  • 12. 12 Migration to Satellite 6 Red Hat Satellite 5 & 6 Core Capabilities ✔ Provision 10s – 1000s systems ✔ Configuration Management ✔ Automated Software Distribution ✔ Lifecycle Management ✔ Administrator Dashboard ✔ Provision 10s – 10,000+ systems ✔ Recipe-Style Configuration Management ✔ Automated Software Distribution ✔ Refined Lifecycle Management ✔ Customizable Dashboards ✔ Simplified Content Management ✔ Drift Management ✔ Federated Services & Management ✔ Deploy on VMware, RHEV, EC2, and OpenStack Red Hat Satellite 5 Red Hat Satellite 6
  • 13. 13 Migration to Satellite 6 Introduction to Puppet
  • 14. 14 Migration to Satellite 6 What is Puppet ? ● Think of it as infrastructure code ● Describe stats, no step ● Paint a picture of your ideal and most clean system Puppet does the rest ● Puppet focuses on managing constructs like users, services and packages ● Puppet can detect the current state of the system (Facter) ● Won’t make changes unless necessary
  • 15. 15 Migration to Satellite 6 Puppet Architecture
  • 16. 16 Migration to Satellite 6 PUPPET DSL Example – managing ntp services with puppet class ntp { package { "ntp": ensure => installed, } file { "ntp.conf": path => '/etc/ntp.conf', ensure => file, require => Package[ "ntp" ], source => "puppet:///modules/ntp/ntp.conf", } service { 'ntp': name => 'ntpd', ensure => running, enable => true, subscribe => File[ "ntp.conf" ], } } PACKAGEPACKAGE CONFIGURATIONCONFIGURATION SERVICESERVICE
  • 17. 17 Migration to Satellite 6 Example – managing sshd service class sshd { augeas { "sshd_config": context => "/files/etc/ssh/sshd_config", changes => [ "set PermitRootLogin yes", "set UsePAM no", ], notify => Service[ "sshd" ] } service { "sshd": ensure => running, enable => true, hasrestart => true, } } CONFIGURATIONCONFIGURATION SERVICESERVICE
  • 18. 18 Migration to Satellite 6 How does Puppet know about your system ? ● Using the Ruby library Facter ● Facter supports a large numbers of predefined facts ● Customs facts can be defined # facter architecture => x86_64 bios_vendor => Seabios bios_version => 0.5.1 blockdevices => vda,vdb interfaces => eth0,lo ipaddress => 172.16.27.44 ipaddress_eth0 => 172.16.27.44 is_virtual => true kernel => Linux kernelmajversion => 2.6 kernelrelease => 2.6.32-431.el6.x86_64 kernelversion => 2.6.32 etc, ...
  • 19. 19 Migration to Satellite 6 Installation
  • 20. 20 Migration to Satellite 6 Installation Puppet server (RHEL 6 – April 2014) [r/]# rhn-channel -a -c rhel-x86_64-server-optional-6 [r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm [r/]# yum install puppet-server puppet [r/]# puppet --version 3.4.3 [r/]# chkconfig puppetmaster on ; service puppetmaster start [r/]# chkconfig puppet on ; service puppet start DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
  • 21. 21 Migration to Satellite 6 Installation Puppet client (RHEL 6 – april 2014) [r/]# rhn-channel -a -c rhel-x86_64-server-optional-6 [r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm [r/]# yum install puppet [r/]# vim/etc/puppet/puppet.conf (add the following at the bottom) server = puppet.example.com runinterval = 120 [r/]# chkconfig puppet on ; service puppet start On the puppetmaster server, sign the certs (possible to auto-sign) [r/]# puppet cert sign puppet-client.example.com DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
  • 22. 22 Migration to Satellite 6 Installation Puppet server (RHEL 7 - nov2015) [r/]# rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm [r/]# yum install puppet-server puppet [r/]# puppet --version 3.8.4 [r/]# systemctl start puppetmaster ; systemctl enable puppetmaster [r/]# systemctl status puppetmaster DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONIZATION
  • 23. 23 Migration to Satellite 6 Installation Puppet client (RHEL 7 – Nov 2015) [r/]# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm [r/]# yum install puppet [r/]# vim/etc/puppet/puppet.conf (add the following at the bottom) server = puppet.example.com runinterval = 120 [r/]# systemctl start puppet; systemctl enable puppet On the puppetmaster server, sign the certs (possible to auto-sign) [r/]# puppet cert list [r/]# puppet cert sign puppet-client.example.com DON’T FORGET DNS RESOLUTION AND TIME SYNCHRONISATION
  • 24. 24 Migration to Satellite 6 Demonstration
  • 25. 25 Migration to Satellite 6 Example 1/3 - deploy some files/directory On the puppetmaster server : [r/]# cd /etc/puppet/modules [r/]# puppet module generate michael-specdirs [r/]# mv michael-specdirs specdirs [r/]# vim /etc/puppet/modules/specdirs/manifests/init.pp class specdirs { file { ['/test/','/test/etc','/test/etc/rc/','/test/etc/rc/shared']: ensure => "directory", owner => "root", group => "root", mode => "750", } }
  • 26. 26 Migration to Satellite 6 Example 2/3 [r/]# vim /etc/puppet/manifests/site.pp #----------------------------------------------------- # site.pp #----------------------------------------------------- include specdirs [r/]# puppet apply /etc/puppet/manifests/site.pp Notice: Compiled catalog for puppetmaster.mlc.dom in environment production in 0.05 seconds Notice: /Stage[main]/Specdirs/File[/test/]/ensure: created Notice: /Stage[main]/Specdirs/File[/test/etc]/ensure: created Notice: /Stage[main]/Specdirs/File[/test/etc/rc/]/ensure: created Notice: /Stage[main]/Specdirs/File[/test/etc/rc/shared]/ensure: created Notice: Finished catalog run in 0.09 seconds On the puppet client : Test the communication with the server [r/]# puppet agent --test --waitforcert 60
  • 27. 27 Migration to Satellite 6 Example 3/3 On the puppetmaster server : [r/]# cd /etc/puppet/modules [r/]# puppet module build specdirs Notice: Building /etc/puppet/modules/mic-test for release Module built: /etc/puppet/modules/specdirs/pkg/specdirs-0.1.0.tar.gz You will be able to upload that module in Satellite 6 Red Hat Satellite 6 includes a utility called pulp-puppet-module-builder. This tool checks out repositories containing a set of modules, builds the modules, and publishes them in a structure for Satellite 6 to synchronize.
  • 28. 28 Migration to Satellite 6 PUPPET AND SATELLITE 6
  • 29. 29 Migration to Satellite 6 What Puppet does than Satellite 5 doesn’t ● Start/restart services ● Restart a service after a configuration change ● Create users, remove users ● Aware of your systems state ● Enforce something ● Manages BSD/*nix and Windows (2003, 2008, 7) ● Resources relationship ● Modify an existing configuration file
  • 30. 30 Migration to Satellite 6 Puppet / Satellite 6 considerations ● Keep Puppet modules as modular as possible and single tasked ● Using role and profile classes is recommended. ● This will allow users to map the modules or role and profile classes to Satellite host groups. ● User should consider building module artifacts as archives as if using Puppet Forge. This will allow import of modules into Satellite 6 and for it to display details of the module. ● Define Modulefiles for modules so dependencies are explicitly declared
  • 31. 31 Migration to Satellite 6 Puppet / Satellite 6 considerations ● Manifests inside of modules are supported, but manifests containing classes outside of modules is not supported ● The use of node definitions within manifests is not supported node vm1.example.com { file { '/tmp/test.txt' : content => "Bye bye !!n", } } ● Hiera function are supported. (Foreman, alt: smart variables)
  • 32. 32 Migration to Satellite 6 Puppet Forge ● A community driven web service ● A repository of modules [r/]# puppet module list [r/]# puppet module search apache [r/]# puppet module install puppetlabs-apache [r/]# puppet module upgrade puppetlabs-apach –version -.0.3 http://docs.puppetlabs.com/guides/module_guides/bgtm.html
  • 33. 33 Migration to Satellite 6
  • 34. 34 Migration to Satellite 6 Puppet debugging notes ● Port 8140 ● Cert troubles ● yum remove puppet ● rm -rf /var/lib/puppet ● rm -rf /etc/puppet ● On master # puppet cert list (to see which ones require a signature) # puppet cert list --all (show all certificates) # puppet cert clean vm1.mlc.dom # puppet cert revoke vm1.mlc.dom
  • 35. 35 Migration to Satellite 6 Scaling Puppet ● WEBrick, default webserver, 10 nodes max ● Passenger (sat6) or Mongrel ● Passenger : mod_rail or mod_rack (Apache 2 module) ● Don’t use the deamon, use cronjob ● Puppet agent --onetime ● No central host (rsync, git) - scales infinitely ● More tricks in the puppet documentation
  • 36. 36 Migration to Satellite 6 Questions ?
  • 37. 37 Migration to Satellite 6 THANK YOU ! Michael Lessard Senior Solutions Architect, Red Hat mlessard@redhat.com michaellessard