Presentation

Post on 18-Aug-2015

42 views 0 download

Tags:

Transcript of Presentation

An introduction to configurationmanagement with Puppet

Rudy Gevaert

About me

GNU/Linux sysadmin

Post- and Puppetmaster at GhentUniversity

Doing ICT for developmentprojects in Ethiopia and Cuba

http://webworm.org

@rgevaert

Rudy.Gevaert@UGent.be

Today’s presentation. . .

From the past to the present

Config management?

Puppet components

Puppet language

Demonstration

From the past . . .

. . . to the present

. . . and the future

The future is already here — it’s just not very evenly distributed.(William Gibson)

Downloads of Puppet forge modules October 20121

1https://puppetlabs.com/blog/mapping-the-puppet-forge

Problem of the system administrator

How to manage:

Multiple applications

Different stacks

1000 servers (and more!)

Problem of the system administrator

How to manage:

Multiple applications

Different stacks

1000 servers (and more!)

More problems: from a developers perspective

Before:

Monolithic application

Development on the server

Sole developer

Long time to market software

Now:

Distributed application

Set up local dev environment

Multiple teams

Short time to market

How do you build a local development environment that is similar toproduction?

=⇒ Puppet

More problems: from a developers perspective

Before:

Monolithic application

Development on the server

Sole developer

Long time to market software

Now:

Distributed application

Set up local dev environment

Multiple teams

Short time to market

How do you build a local development environment that is similar toproduction?

=⇒ Puppet

More problems: from a developers perspective

Before:

Monolithic application

Development on the server

Sole developer

Long time to market software

Now:

Distributed application

Set up local dev environment

Multiple teams

Short time to market

How do you build a local development environment that is similar toproduction?

=⇒ Puppet

More problems: from a developers perspective

Before:

Monolithic application

Development on the server

Sole developer

Long time to market software

Now:

Distributed application

Set up local dev environment

Multiple teams

Short time to market

How do you build a local development environment that is similar toproduction?

=⇒ Puppet

What is configuration management?

Is a method to automatically and centrally manage:

the packages,

configuration files

process state

firewall rules

and other settings

to do their assigned job

Without config mgt? Manually or handwritten scripts

Configuration Management

It’s also about making changes to the system in an organized way soyour servers and modified deliberately and correctly while accountingfor relationships between system components

Why you need automated configuration

management?

Not automating config mgt causes pain!

Manual errors, custom scripts can be fragile, custom scripts aren’taccessible to everyone, you can’t scale

Configuration management eliminates manual work, and createsdependability and predictability

Why you need automated configuration

management?

Another problem with the manual-change and script-based approachis the lack of a single source of truth.

Automation makes you productive; lets the people who aredependent on you be more productive; and gives you the time to uplevel your job and your skills.

Spend less time on manual configuration and putting out theinevitable fires

Who benefits

Everyone benefits from automated configuration management!

Sysadmins get:

visibility into the state of the overall system, and eachcomponent of it

faster identification of problems, and faster remediation

efficiency in performing regular maintenance

documentation, so fixes and updates can be referenced andrepeated an end to 3:00 am emergency calls

Who benefits

Quality assurance and test engineers get:

the confidence that they’re testing code in an environmentthat’s identical to where the code was created and where it willfinally run

Who benefits

IT managers get:

visibility into what the IT team is doing: maintenance,remediation, provisioning

faster time to recovery, so greater satisfaction for internal andexternal customers more efficient, predictable operations

better ability to plan

better ability to report to other teams in the company

Who benefits

The entire company gets:

more stable and dependable systems and software to work on

faster service from IT when things need to be installed or fixed

the ability to expand IT services while containing costs

the confidence to make changes more quickly and learn frommarket response

Customers (the people who pay us!) get:

better products, better services, faster innovation and betterresponse to their needs

The typical life cycle of a server

⇒ ⇒

Installation andbootstrap

Configure applications Administer system

Automatic installwith net boot orVM image

Puppet Puppet

The typical life cycle of a server

⇒ ⇒

Installation andbootstrap

Configure applications Administer system

Automatic installwith net boot orVM image

Puppet Puppet

The typical life cycle of a server

⇒ ⇒

Installation andbootstrap

Configure applications Administer system

Automatic installwith net boot orVM image

Puppet Puppet

Puppet

Configuration management software developed by Puppetlabs

http://www.puppetlabs.com

Free Software version and Proprietary version (PuppetEnterprise)

Supports: GNU/Linux, Windows, Solaris

Competition: Cfeninge, Chef, Ansible, Saltstack

Terminology

catalog

modules

nodes

class

manifests

resource

Components of Puppet

Facter

Puppet master

Puppet agent

PuppetDB

Hiera

Puppet Forge

Puppet Domain Specific Language (DSL)

Architecture

Architecture

Defining State, idempotent

Puppet DSL

Managing packages

package {

’openssh’:

ensure => present;

}

package {

’vim’:

ensure => absent;

}

Puppet DSL

Managing services

service {

’apache2’:

ensure => running;

}

Puppet DSL

Managing files

file {

’/etc/motd’:

ensure => present,

mode => ’0600’,

owner => ’root’,

group => ’root’,

source => ’puppet:///modules/motd/motd’;

}

Puppet DSL: resource types

augeas

computer

cron

exec

file

filebucket

group

host

interface

k5login

macauthorization

mailalias

maillist

mcx

mount

nagios_command

nagios_contact

nagios_contactgroup

nagios_host

nagios_hostdependency

nagios_hostescalation

nagios_hostextinfo

nagios_hostgroup

nagios_service

nagios_servicedependency

nagios_serviceescalation

nagios_serviceextinfo

nagios_servicegroup

nagios_timeperiod

notify

package

resources

router

schedule

scheduled_task

selboolean

selmodule

service

ssh_authorized_key

sshkey

stage

tidy

user

vlan

yumrepo

zfs

zone

zpool

Puppet DSL

Managing a node

node ’www.domain.com’ {

include apache

include mysql

}

Verifying style

puppet-lint and meta-data-json-lint

How the get started

https://puppetlabs.com/download-learning-vm

https://puppetlabs.com/resources/books

http://ask.puppetlabs.com/questions/

https://docs.puppetlabs.com/puppet/

Demonstration

Thank you for your attention.

Questions?

Pictures...www.theluxuryspot.com/wp-content/uploads/2013/05/Fashion-pug.jpg

plyojump.com/classes/images/computer_history/ibm_360_color.jpg

www.cse.unsw.edu.au/opencms/export/sites/cse/.content/images/

feature_boxes_750x400/server_room.jpg_687647283.jpg www.alvantia.

es/blog/wp-content/uploads/2015/02/cloud-computing.jpg

www.linuxplanet.org/blogs/?cat=177

www.rcesecurity.com/wp-content/uploads/2014/08/tux-egg.jpeg

www.greatleadersserve.com/wp-content/uploads/2012/08/iStock_

000020378687XSmall.jpg https://pensarlaescuela.files.wordpress.com/

2015/03/persona-en-rueda-de-entrenamiento.jpg

doc.ubuntu-fr.org/_media/administration/puppet.png https://docs.

puppetlabs.com/pe/latest/images/puppet/pe-configuration-data.png

https://docs.puppetlabs.com/learning/images/manifest_to_defined_

state_split.png