Puppet - kraut-computing/siegfried GitHub Wiki

The following things are managed via Puppet:

  • Packages: 10_packages.pp
  • Users/Groups (inc. sudoers): 90_users.pp
  • Services/Deamons: 30_users.pp
  • Masage of the Day: the notice that appear when uses look in 99_misc.pp

insatalation und einrichten TODO

TODOD

  • pupetmaster starten: /etc/init.d/puppetmaster start und beim boot starten rc-update add puppetmaster default auf dem master node
  • auf allen nodes puppet agent starten: /etc/init.d/puppet start und beim boot laden rc-update add puppet default

Information about puppet

Übersicht

Der puppet haupt configuartions ortner liegt unter /etc/puppetlabs/.

Unter .../puppet/ liegt die puppet.conf; die Manifeste und module liegen unter .../code/enviroments/production/ da wir zur Zeit nur ein puppet enviroment haben (production).

Die enviroments haben jewails drei unterortner: files für alle möglichen datein, die von puppet verwaltet werden, modules in dem die module liegen (externe und eigene) und manifests in dem die Manifeste liegen. Manifeste sind die Datein, mit denen man puppet die anweisungen gibt was syncronesiert werden soll (z.B.: welche user angelegt werden sollen, welche datein wo hin gehören, welche Packete instaliert werden, welche services laufen sollen, ...). Die Manifeste greifen dabei auf die Module zurück. Sie behinhalten die anweisungen die zum syncronesieren nötig sind (z.B.: wie beuzer angelegt werden, wie Packete insatliert werden (emerge), wie services (NTP, NFS, ssh, ...) zu steurn sind, ...).

Wenn die Module eingerichtet sind, wir die konfiguration der Module nur noch über die Manifeste gemacht. Änderungen sind also nur unter manifests nötig! Alles andere sollte dringend abgesprochen werden!

Manifeste werden imme in alpfabetischer reinfolge ausgeführt.

Module

The modules are located at /etc/puppetlabs/code/environments/production/modules/

To execute a module you have to add it in the main manifests (.../manifests/) class { '<class_name>' : <Parameters>} or include <class_name>

Note: Puppet also creates another module directory: /opt/puppetlabs/puppet/modules. Don’t modify or add anything in this directory, including modules of your own.

External Modules

These packages are external:

Don't make any changes to them! They are managed from a main manifest.

To install an external module on puppet master node: puppet module install <MODULE NAME>

Own Modules

see also Quick Start Guide, Module Fundamentals and Beginner's Guide to Modules

Each module has a manifests .../modules/<MODULE_NAME>/manifets/. the default manifest is init.pp but you can add more (<className>.pp). Every manifest in a module contains a single class. The file name and the class name matches:

  • init.pp: a special case that contains a class named after the module
  • <className>.pp: a class called <MODULE_NAME>::<className>

This modules created by our self:

  • accounts: manage user accounts and groups

Important commands

  • puppet parser validate <MANIFEST> ensure that there are no syntax errors in the manifest (no massage is good)
  • puppet agent -t trigger a Puppet run
  • puppet resource <class> <instance> show the puppet code to ensure the current state of a instance from class (e.g. puppet resource user root)
⚠️ **GitHub.com Fallback** ⚠️