Plan the manifests structure

55 views
Skip to first unread message

Евгений Верещагин

unread,
Jan 14, 2013, 3:29:39 AM1/14/13
to puppet...@googlegroups.com
How to divide the rules in the manifestos?

I see some variants:

1. Write all rules in one file. It's not good idea.

2. Write any manifestos like bsd.pp, linux.pp and
do check on some parameters in this manifestos.

3. Write manifestos
for each machine, by hostname or IP.

4. Includeв in the site.pp all checks like this:

    case $operatingsystem {
      'sunos':  { include solaris/* } # apply the solaris class
      'redhat': { include redhat/*  } # apply the redhat class
      default:  { include generic/* } # apply the generic class
    }
5. Something else?

What is true way?

jcbollinger

unread,
Jan 14, 2013, 10:40:28 AM1/14/13
to puppet...@googlegroups.com


There is no one true way.

However, Puppetlabs recommends, and Puppeteers around here seem generally to agree, that configurations managed by Puppet benefit greatly from being broken down into reusable modules that can be shared across all nodes that require them.

OS-specific details are typically accounted for within such modules, instead of at a higher level such as your alternatives (2) and (4) suggest.  You should consider looking at a few modules from the module forge for examples of how this can be done.  Note also that Puppet modules often can be written so that most or even all manifest code can be shared across operating systems -- especially across different Unix operating systems.


John

Stefan Heijmans

unread,
Jan 14, 2013, 12:54:32 PM1/14/13
to puppet...@googlegroups.com

Евгений Верещагин

unread,
Jan 14, 2013, 1:00:20 PM1/14/13
to puppet...@googlegroups.com
OK, my alternative (4) contains all needed terms:
a) I can write manifestos for diffrent groups of nodes (IP, OS, etc)
b) I can
collect terms for write it only once.
c)
I do not get confused in their own settings.

понедельник, 14 января 2013 г., 19:40:28 UTC+4 пользователь jcbollinger написал:

Евгений Верещагин

unread,
Jan 14, 2013, 1:03:45 PM1/14/13
to puppet...@googlegroups.com


понедельник, 14 января 2013 г., 21:54:32 UTC+4 пользователь Stefan Heijmans написал:
 
Thank you very much, but link to text is 404 :-(

Josh Cooper

unread,
Jan 14, 2013, 1:27:10 PM1/14/13
to puppet...@googlegroups.com

Евгений Верещагин

unread,
Jan 14, 2013, 1:35:23 PM1/14/13
to puppet...@googlegroups.com
Yes!

понедельник, 14 января 2013 г., 22:27:10 UTC+4 пользователь Josh Cooper написал:
Reply all
Reply to author
Forward
0 new messages