🗊Презентация Puppet – configuration management tool

Нажмите для полного просмотра!
Puppet – configuration management tool, слайд №1Puppet – configuration management tool, слайд №2Puppet – configuration management tool, слайд №3Puppet – configuration management tool, слайд №4Puppet – configuration management tool, слайд №5Puppet – configuration management tool, слайд №6Puppet – configuration management tool, слайд №7Puppet – configuration management tool, слайд №8Puppet – configuration management tool, слайд №9Puppet – configuration management tool, слайд №10Puppet – configuration management tool, слайд №11Puppet – configuration management tool, слайд №12Puppet – configuration management tool, слайд №13Puppet – configuration management tool, слайд №14Puppet – configuration management tool, слайд №15Puppet – configuration management tool, слайд №16Puppet – configuration management tool, слайд №17Puppet – configuration management tool, слайд №18Puppet – configuration management tool, слайд №19Puppet – configuration management tool, слайд №20Puppet – configuration management tool, слайд №21Puppet – configuration management tool, слайд №22Puppet – configuration management tool, слайд №23Puppet – configuration management tool, слайд №24Puppet – configuration management tool, слайд №25Puppet – configuration management tool, слайд №26Puppet – configuration management tool, слайд №27Puppet – configuration management tool, слайд №28Puppet – configuration management tool, слайд №29Puppet – configuration management tool, слайд №30Puppet – configuration management tool, слайд №31Puppet – configuration management tool, слайд №32Puppet – configuration management tool, слайд №33Puppet – configuration management tool, слайд №34Puppet – configuration management tool, слайд №35Puppet – configuration management tool, слайд №36Puppet – configuration management tool, слайд №37Puppet – configuration management tool, слайд №38Puppet – configuration management tool, слайд №39Puppet – configuration management tool, слайд №40Puppet – configuration management tool, слайд №41Puppet – configuration management tool, слайд №42Puppet – configuration management tool, слайд №43

Содержание

Вы можете ознакомиться и скачать презентацию на тему Puppet – configuration management tool. Доклад-сообщение содержит 43 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1






PUPPET – configuration management tool
Описание слайда:
PUPPET – configuration management tool

Слайд 2





CONTENT
Описание слайда:
CONTENT

Слайд 3





PART I
GETTING STARTED
Описание слайда:
PART I GETTING STARTED

Слайд 4





Typical Sysadmin Job
Описание слайда:
Typical Sysadmin Job

Слайд 5





WHO HELPS US
Описание слайда:
WHO HELPS US

Слайд 6






What is PUPPET ?

configuration management tool 
open source 
Ruby-based system
relying upon client-server model
used to manage throughout lifecycle IT systems:
Описание слайда:
What is PUPPET ? configuration management tool open source Ruby-based system relying upon client-server model used to manage throughout lifecycle IT systems:

Слайд 7





PUPPET’S BENEFITS
Large developer base

Optimized and easier configuration language

Better documentation

Abstracted from underlying OS (more platform support)

Easily scalable and customizable

Large installed base (Google, Siemens, Red Hat, 
			 	  Cisco)
Описание слайда:
PUPPET’S BENEFITS Large developer base Optimized and easier configuration language Better documentation Abstracted from underlying OS (more platform support) Easily scalable and customizable Large installed base (Google, Siemens, Red Hat, Cisco)

Слайд 8





PART II
		PUPPET INSIDE
Описание слайда:
PART II PUPPET INSIDE

Слайд 9





Puppet MODEL
Описание слайда:
Puppet MODEL

Слайд 10





PUPPET DEPLOYMENT MODEL
                                
Master - store & compile 	    configs
Agent - pull 			   configuration 		   from master
Описание слайда:
PUPPET DEPLOYMENT MODEL Master - store & compile configs Agent - pull configuration from master

Слайд 11





PUPPET DEPLOYMENT MODEL (comparison)
+ better security
+ advanced 	management
+ authorization 
+ centralized execution

- huge load on server
- single point of failure
Описание слайда:
PUPPET DEPLOYMENT MODEL (comparison) + better security + advanced management + authorization + centralized execution - huge load on server - single point of failure

Слайд 12





Architecture of Puppet
   compile on server
Описание слайда:
Architecture of Puppet compile on server

Слайд 13





Main components of 
Puppet system
Server daemon:
puppet master ( uses WEBrick web server)
run as puppet user
can force client to pull new configs – puppet kick

Client daemon:
puppet agent
run as root (pulling server every 30min defaults or from cron)
Both have configuration file => puppet.conf
Описание слайда:
Main components of Puppet system Server daemon: puppet master ( uses WEBrick web server) run as puppet user can force client to pull new configs – puppet kick Client daemon: puppet agent run as root (pulling server every 30min defaults or from cron) Both have configuration file => puppet.conf

Слайд 14





Main components of Puppet system (continued)
Puppet’s Certificate Authority:
puppet ca, cert
SSL certificates
Provider
apply packages management on hosts
Facter
gathers basic information about node’s hardware and operation system
Описание слайда:
Main components of Puppet system (continued) Puppet’s Certificate Authority: puppet ca, cert SSL certificates Provider apply packages management on hosts Facter gathers basic information about node’s hardware and operation system

Слайд 15





Elements of Puppet system
Manifests (code on puppet/ruby language) on server => *.pp  
     use some programming methods: variables, conditional
      statements, functions
Resources (types) is a particular element that Puppet knows how to configure
Classes and defines basic named collection of resources
Providers specific implementation of a given resource type
Templates apply code and variable substitution
Modules collection of manifests, files, plugins, classes, templates and so on
Nodes – machines being configured, identified generally by its hostname
Files, facters, libs, functions and so on
Описание слайда:
Elements of Puppet system Manifests (code on puppet/ruby language) on server => *.pp use some programming methods: variables, conditional statements, functions Resources (types) is a particular element that Puppet knows how to configure Classes and defines basic named collection of resources Providers specific implementation of a given resource type Templates apply code and variable substitution Modules collection of manifests, files, plugins, classes, templates and so on Nodes – machines being configured, identified generally by its hostname Files, facters, libs, functions and so on

Слайд 16





Elements of Puppet system
Описание слайда:
Elements of Puppet system

Слайд 17





Puppet Infrastructure
Описание слайда:
Puppet Infrastructure

Слайд 18





PART III
DEPLOYMENT OF PUPPET
Описание слайда:
PART III DEPLOYMENT OF PUPPET

Слайд 19





Procedure of deployment
Setup (master and clients)
Set up configuration files
Deploy certificates
Write and deploy manifest and describe nodes
Описание слайда:
Procedure of deployment Setup (master and clients) Set up configuration files Deploy certificates Write and deploy manifest and describe nodes

Слайд 20





Installation of Puppet
Most platforms will use the default package manager to install Puppet or from source
Prerequisites: ruby, ruby-libs, facter
Описание слайда:
Installation of Puppet Most platforms will use the default package manager to install Puppet or from source Prerequisites: ruby, ruby-libs, facter

Слайд 21





Sample Puppet config file
Can be configured via CLI or configuration file
	
	[main]
    vardir = /var/lib/puppet
    logdir = /var/log/puppet
    ssldir = $vardir/ssl
    moduledir = /var/lib/modules
[agent]
    server = <ip or dns name>
    localconfig = $vardir/localconfig
    report = true
[master]
    reports = http
    autosign = /etc/puppet/autosign.conf
Описание слайда:
Sample Puppet config file Can be configured via CLI or configuration file [main] vardir = /var/lib/puppet logdir = /var/log/puppet ssldir = $vardir/ssl moduledir = /var/lib/modules [agent] server = <ip or dns name> localconfig = $vardir/localconfig report = true [master] reports = http autosign = /etc/puppet/autosign.conf

Слайд 22





Setup Certificate
Multiple ways to resolve this
 Setup puppetmaster to automatically sign certificates
 Setup puppetmaster to pre-sign certificates
Perform manual certificate signing each time
Описание слайда:
Setup Certificate Multiple ways to resolve this Setup puppetmaster to automatically sign certificates Setup puppetmaster to pre-sign certificates Perform manual certificate signing each time

Слайд 23





Auto Certificate signing
Setup automatic certificate signing you must specify so in the /etc/puppet/autosign.conf file:
	
	*.sample.domain.com
	server1.sample.domain.com
+ will automatically sign certs
– security risk, not good to automate the certificate  signing mechanism
Описание слайда:
Auto Certificate signing Setup automatic certificate signing you must specify so in the /etc/puppet/autosign.conf file: *.sample.domain.com server1.sample.domain.com + will automatically sign certs – security risk, not good to automate the certificate signing mechanism

Слайд 24





Pre-signing certificates
Generate a pre-signed certificate for clients:
 puppet cert --generate client1.example.com
Transfer the private key, the client certificate, the CA certificate  to the new client:

/etc/puppet/ssl/private_keys/client.pem
/etc/puppet/ssl/certs/client.pem
/etc/puppet/ssl/certs/ca.pem
+ better controlled security
–  have to provide transferring
Описание слайда:
Pre-signing certificates Generate a pre-signed certificate for clients: puppet cert --generate client1.example.com Transfer the private key, the client certificate, the CA certificate to the new client: /etc/puppet/ssl/private_keys/client.pem /etc/puppet/ssl/certs/client.pem /etc/puppet/ssl/certs/ca.pem + better controlled security – have to provide transferring

Слайд 25





Manual certificate signing
Doesn’t require the autosign.conf file
List of the waiting requests on the puppetmaster by using:
	#  puppet cert --list
		server1.sample.domain.com
		server2.sample.domain.com
to sign a specific request run the following:
	#  puppet cert --sign server1.sample.domain.com
+ most secure way to sign certificates
– can get cumbersome when scaling your puppet installation
Описание слайда:
Manual certificate signing Doesn’t require the autosign.conf file List of the waiting requests on the puppetmaster by using: # puppet cert --list server1.sample.domain.com server2.sample.domain.com to sign a specific request run the following: # puppet cert --sign server1.sample.domain.com + most secure way to sign certificates – can get cumbersome when scaling your puppet installation

Слайд 26





Create manifest and
Describe Node
Create main manifest in /etc/puppet/manifests/site.pp

Node definitions can be defined:
configuration block matching a client in manifest
outside of puppet - LDAP, external script
node default { include <module>….} 

node “www.domain.com” { …}

node  /^www\.\w+\.com/ { … }     # can use regular expression
Описание слайда:
Create manifest and Describe Node Create main manifest in /etc/puppet/manifests/site.pp Node definitions can be defined: configuration block matching a client in manifest outside of puppet - LDAP, external script node default { include <module>….} node “www.domain.com” { …} node /^www\.\w+\.com/ { … } # can use regular expression

Слайд 27





Create manifest and
Describe Node (continue)
node default {

    user {"testpup":
        ensure => present,
        shell => "/sbin/nologin",
        home => "/nonexistent",
        password => "test",
    	   }
		}
Описание слайда:
Create manifest and Describe Node (continue) node default { user {"testpup": ensure => present, shell => "/sbin/nologin", home => "/nonexistent", password => "test", } }

Слайд 28





PART IV
SCENARIO OF DEPLOYMENT
WITH HELP OF PUPPET
Описание слайда:
PART IV SCENARIO OF DEPLOYMENT WITH HELP OF PUPPET

Слайд 29





WORKSHOP (LIVE EXAMPLE)
TASK  
WHAT WE HAVE 
WHAT FEATURES WE USE    => 	modules, classes, class-definitions, templates
			RESULT  ??????
Описание слайда:
WORKSHOP (LIVE EXAMPLE) TASK WHAT WE HAVE WHAT FEATURES WE USE => modules, classes, class-definitions, templates RESULT ??????

Слайд 30





How to organize manifests
Описание слайда:
How to organize manifests

Слайд 31





Root manifest - SITE.PP
Global master manifest is site.pp which typically defines the node types puppet can configure
node ‘server1’ {
 	       include pkg-mgmt  # use module
	       include apache
	          }
node ‘server2' {
	       include apache
	       include mysql
	        }
Описание слайда:
Root manifest - SITE.PP Global master manifest is site.pp which typically defines the node types puppet can configure node ‘server1’ { include pkg-mgmt # use module include apache } node ‘server2' { include apache include mysql }

Слайд 32





Building module
Storing modules separately in /…/…/modules/module_name  assists in management
We can store module specific files within the module instead of all together
Inside each module, we have several directories: manifests, files, templates, plugins
The manifest is where the module’s definition lives and starts  - “init.pp”
Описание слайда:
Building module Storing modules separately in /…/…/modules/module_name assists in management We can store module specific files within the module instead of all together Inside each module, we have several directories: manifests, files, templates, plugins The manifest is where the module’s definition lives and starts - “init.pp”

Слайд 33





Module structure
{module}/ 
files/	# serve files from modules
lib/ 	# executable Ruby code 
manifests/ # can hold any number of other classes and 			even folders of classes
init.pp
{class}.pp
{defined type}.pp
{namespace}/ 
{class}.pp
{class}.pp
templates/ # templates written in the ERB language
Описание слайда:
Module structure {module}/ files/ # serve files from modules lib/ # executable Ruby code manifests/ # can hold any number of other classes and even folders of classes init.pp {class}.pp {defined type}.pp {namespace}/ {class}.pp {class}.pp templates/ # templates written in the ERB language

Слайд 34





Module start file - init.pp
class apache {			# main class
    require apache::params   	# class dependencies 
	case $operatingsystem { # variable
        FreeBSD: { include apache::install }
        Centos: { include apache::instyum }
 				}
    include apache::service
	}
Can use variables, conditional statements;
Call new subclasses
Convenient way – organize special class(subclass) for variables
Описание слайда:
Module start file - init.pp class apache { # main class require apache::params # class dependencies case $operatingsystem { # variable FreeBSD: { include apache::install } Centos: { include apache::instyum } } include apache::service } Can use variables, conditional statements; Call new subclasses Convenient way – organize special class(subclass) for variables

Слайд 35





Subclass for Install
class apache::install {
    file { $apache::params::install_option: # resource - type of file
        ensure => directory,
        recurse => true,
        recurselimit => 1,
        owner => "root",
        group => "wheel",
        mode => 0644,
        source => "puppet:///modules/apache/install",
        }
    package { $apache::params::apache_pkg_name: # resource - type of package
        provider => portupgrade,
        ensure => installed,
        require => File[$apache::params::install_option],
        }
}
Each resource has its own parameters & properties
More about resources:
http://docs.puppetlabs.com/references/stable/type.html
Описание слайда:
Subclass for Install class apache::install { file { $apache::params::install_option: # resource - type of file ensure => directory, recurse => true, recurselimit => 1, owner => "root", group => "wheel", mode => 0644, source => "puppet:///modules/apache/install", } package { $apache::params::apache_pkg_name: # resource - type of package provider => portupgrade, ensure => installed, require => File[$apache::params::install_option], } } Each resource has its own parameters & properties More about resources: http://docs.puppetlabs.com/references/stable/type.html

Слайд 36





Subclass for SERVICE
class apache::service {
    service { $apache::params::apache_ser_name:
            ensure => running,
            hasstatus => true,
            hasrestart => true,
            enable => true,
            require => [Class["apache::install"], 						File["$apache::params::apache_main_conf"]]
            }
        file { $apache::params::apache_main_conf:
        ensure => present,
        owner => 'root',
        group => 'wheel',
        mode => '644',
        source => "puppet:///modules/apache/config/httpd.conf_free",
        require => Class["apache::install"],
        notify => Service["$apache::params::apache_ser_name"],
        }
}
Описание слайда:
Subclass for SERVICE class apache::service { service { $apache::params::apache_ser_name: ensure => running, hasstatus => true, hasrestart => true, enable => true, require => [Class["apache::install"], File["$apache::params::apache_main_conf"]] } file { $apache::params::apache_main_conf: ensure => present, owner => 'root', group => 'wheel', mode => '644', source => "puppet:///modules/apache/config/httpd.conf_free", require => Class["apache::install"], notify => Service["$apache::params::apache_ser_name"], } }

Слайд 37





Module Dependency
Handy when an application needs to have certain files in place before installing the rest
The more complex your Puppet environment becomes the greater the need for inter-module dependencies are.
inter-, intra-module dependencies
require, before  - guarantees that the specified object is applied later or before than the specifying object
notify, subscribe - causes the dependent object to be refreshed when this object is changed
Class[x] -> Class[y] – another form of dependencies
Stages - creates a dependency on or from the named milestone
Описание слайда:
Module Dependency Handy when an application needs to have certain files in place before installing the rest The more complex your Puppet environment becomes the greater the need for inter-module dependencies are. inter-, intra-module dependencies require, before - guarantees that the specified object is applied later or before than the specifying object notify, subscribe - causes the dependent object to be refreshed when this object is changed Class[x] -> Class[y] – another form of dependencies Stages - creates a dependency on or from the named milestone

Слайд 38





Definitions
Definitions are similar to classes, but they can be instantiated multiple times with different arguments on the same node (looks like functions for resources)

define apache::vhost ( $port, $docroot, $template='apache/vhosts.erb’) {
file { "/etc/apache2/sites-available/$name":
 content => template($template),
      owner => 'root',
      group => 'wheel',
      mode => “644’, }
 }
------------------------------------------------------------------------------------------
Example of usage
node ‘www’ {				
include apache 
apache::vhost { ‘www-second':
     port => 80,
     docroot => '/var/www/www-second',
     template => ‘apache/www_vhosts’,
     }
}
Описание слайда:
Definitions Definitions are similar to classes, but they can be instantiated multiple times with different arguments on the same node (looks like functions for resources) define apache::vhost ( $port, $docroot, $template='apache/vhosts.erb’) { file { "/etc/apache2/sites-available/$name": content => template($template), owner => 'root', group => 'wheel', mode => “644’, } } ------------------------------------------------------------------------------------------ Example of usage node ‘www’ { include apache apache::vhost { ‘www-second': port => 80, docroot => '/var/www/www-second', template => ‘apache/www_vhosts’, } }

Слайд 39





Templates
Templates are flat files containing Embedded Ruby (ERB) variables
Allows you to create template configuration files
NameVirtualHost *:<%= port %>
<VirtualHost *:<%= port %>>
	ServerName <%= name %>
	DocumentRoot <%= docroot %>
	<Directory <%= docroot %>>
		AllowOverride None
	</Directory>
ErrorLog /var/log/apache2/<%= name %>_error.log
CustomLog /var/log/apache2/<%= name %>_access.log combined
</VirtualHost>
<%= … %> - variable field
Описание слайда:
Templates Templates are flat files containing Embedded Ruby (ERB) variables Allows you to create template configuration files NameVirtualHost *:<%= port %> <VirtualHost *:<%= port %>> ServerName <%= name %> DocumentRoot <%= docroot %> <Directory <%= docroot %>> AllowOverride None </Directory> ErrorLog /var/log/apache2/<%= name %>_error.log CustomLog /var/log/apache2/<%= name %>_access.log combined </VirtualHost> <%= … %> - variable field

Слайд 40





Custom facter
System inventory tool on client

Can be used as variables in manifests

You can add custom facts as needed

				
Steps to create custom facts:
	- create file in module directory 	../module_name/lib/facter/<name>.rb
	
	- write code on Ruby
	- enable on client and server – “pluginsync=true”
Описание слайда:
Custom facter System inventory tool on client Can be used as variables in manifests You can add custom facts as needed Steps to create custom facts: - create file in module directory ../module_name/lib/facter/<name>.rb - write code on Ruby - enable on client and server – “pluginsync=true”

Слайд 41





Reports, monitoring
	Puppet has a few reporting options:
YAML files
RRD files
EMAIL with changes
HTTP  - web interface (Dashboard, Foreman)
Описание слайда:
Reports, monitoring Puppet has a few reporting options: YAML files RRD files EMAIL with changes HTTP - web interface (Dashboard, Foreman)

Слайд 42





CONCLUSIONS
What is the profit ?
Quick and flexible  deployment of our complicated system in production
Quick re-deployment of existing system in case of failure (previously generating data backups)
Easy deployment of huge numbers of servers
Easy generation and modification of configuration files
Описание слайда:
CONCLUSIONS What is the profit ? Quick and flexible deployment of our complicated system in production Quick re-deployment of existing system in case of failure (previously generating data backups) Easy deployment of huge numbers of servers Easy generation and modification of configuration files

Слайд 43





Additional resources for PUPPET
http://docs.puppetlabs.com/guides/
http://rubular.com/
http://github.com/puppetlabs/
http://forge.puppetlabs.com/
Book “Pro Puppet” by James Turnbull, Jeffrey McCune
Book “Puppet 2.7 Cookbook” by John Arundel
Описание слайда:
Additional resources for PUPPET http://docs.puppetlabs.com/guides/ http://rubular.com/ http://github.com/puppetlabs/ http://forge.puppetlabs.com/ Book “Pro Puppet” by James Turnbull, Jeffrey McCune Book “Puppet 2.7 Cookbook” by John Arundel



Похожие презентации
Mypresentation.ru
Загрузить презентацию