• Zur Hauptnavigation springen
  • Skip to main content
  • Zur Fußzeile springen

Sebastian Mogilowski's Blog

Just another blog about administration, linux and other stuff

  • Home
  • Contact
  • Imprint
  • Projects & HOWTOs
  • Publications

Servermanagement with puppet – Part 1

22. Juni 2009 by sebastian 2 Kommentare

The Environment:

Hosts:
puppetmaster: The puppetmaster
pc1: The first testclient
pc2: The second testclient

Domain: domain.local

Note: I used Ubuntu 9.04 in all servers.

Puppetmaster installation

aptitude install puppetmaster

Activate fileserver for the local network (“/etc/puppet/fileserver.conf“):

[files]
path /etc/puppet/files
allow *.domain.local

[plugins]
path /etc/puppet/files
allow *.domain.local

Note:You can allow a subnet, too. (“allow 192.168.0.0/24“).

Edit / Create the site file “/etc/puppet/manifests/site.pp“:

This is puppets main configuration file. To test the configuration, we want to copy a file from the puppetmaster to the clients.

#
# site.pp
#

class filetest {
   file { '/etc/testfile':
      source => "puppet://puppetmaster.domain.local/files/etc/testfile"
   }
}

node default {
   include filetest
}

Now create the testfile and the directories:

mkdir -p /etc/puppet/files/etc
vim /etc/puppet/files/etc/testfile

Choose a content for this file „Hello World“ for example.

/etc/init.d/puppetmaster restart

Client Installation

aptitude install puppet

Connect the puppet client to the server

Add the following content to the puppet configuration file /etc/puppet/puppet.conf to connect the client to the server.

[puppetd]
server=puppetmaster.domain.local
/etc/init.d/puppet restart

On the puppetmaster:

puppetca --list
puppetca --sign pc1.domain.local

A restart of puppet is the fastet way to test the configuration:

/etc/init.d/puppet restart

Now you should see the file /etc/testfile on each client.

In the next part of this howto, we will use some modules with puppet and create an example configuration for pratical use.

Links:

An introduction to using Puppet Teil 1
An introduction to using Puppet Teil 2

Kategorie: Linux Stichworte: Linux, management, puppet, ubuntu

Leser-Interaktionen

Kommentare

  1. myndmachine43 meint

    30. Juni 2009 um 21:40

    Cool post, just subscribed.

    Antworten

Trackbacks

  1. links for 2010-08-23 | blog/shl@INTERDOSE sagt:
    23. August 2010 um 23:03 Uhr

    […] Servermanagement with puppet – Part 1 | Sebastian Mogilowskis Blog (tags: puppet) […]

    Antworten

Schreibe einen Kommentar Antworten abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

Footer

Kategorien

  • Allgemein
  • Coldfusion
  • Development
  • Fun
  • General
  • Home automation
  • Homematic
  • Linux
  • Mobile
  • PHP
  • Privat
  • Systemadministration
  • Virtualization
  • Windows
  • Zaurus

© 2021 · Sebastian Mogilowski's Blog · Powered by Imagely