On Friday, May 16, 2014 10:55:35 AM UTC-5, Jesse Cotton wrote:
>
> I work with Matt and am filling in for him since I posed this question to 
> him originally.
>
> Our confusion really lies around how you layout profiles for a 
> multi-function box. For example, suppose you have a role, "CMS App Server" 
> that will host various CMS like Wordpress, Drupal, and others. They are all 
> built on top of the same technologies, Apache, PHP, and MySQL. I don't 
> believe you can build a separate profile for each CMS b/c they will 
> conflict (at least within Puppet). Each will require a certain set of php 
> modules and settings, apache modules and settings, etc. So do you build a 
> single profile like profile::wordpress_drupal_cms3_cm4 or do you build a 
> profile::apachefpm profile? The later seems more logical to me however you 
> lose the ability to define profile specific hiera variables b/c 
> profile::apachefpm is generic.
>
>

You can declare the same class multiple times, provided that you use the 
'include' function or its cousins to do so.  That is a tremendously useful 
technique for managing configurations where multiple facilities share 
requirements on some of the same core resources.  Using 'include' instead 
of resource-like class declarations means you must feed data to your 
classes via hiera instead of via your manifests, but separating your data 
from your manifests is good practice anyway.  That's what Christopher Wood 
was pointing you toward, and it is good advice.

It is thus possible to find and/or write composable classes and modules for 
managing the components you want.  As David Schmitt observes, composability 
is not automatic, but I don't see why your particular case of an 
apache-based PHP app server with firewall rules and a specific collection 
of PHP and apache modules should present any special problem.

Thus, the answer to your question is "neither."  You build a drupal 
profile, and a wordpress profile, etc., and you use them all together.


John


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/56d766c8-64b4-4d94-8134-4fb8d0d516f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to