----- "Thomas Bellman" <[email protected]> wrote:
> As an example, consider a web hosting provider, that has thousands of
> virtual hosts in their lighttpd/nginx/apache configs. They have a
> Puppet
> define for managing a virtual web host, used something like this:
>
> virtual_web_host {
> "www.customer-4711.com":
> docroot => "/mnt/fileserver-17/4711",
> mod_python => enabled,
> upload_methods => ["ftp","scp"],
> bandwidth_limit_per_minute => 60, # Mbyte/minute
> bandwidth_limit_per_month => 130000, # Mbyte/month
> ensure => enabled;
> }
>
> or whatever parameters makes sense. Each time a new customer is
> signed on, the sales people add it to their customer database with
> information about which services the customer has paid for (ftp and scp
> access to
> upload web pages, and allowed to run Python scripts). At first
> glance this seems to be exactly what external node scripts could help you
> with. Except that it can't, because you still need to ask the sysadmins to
> load "customers.pp" into their Emacs and write a new class 'customer-4711'
> containing the above stansa. You can use the external node classifier
> to *move* the virtual web hosts from node to node in response to
> changing demands, but it doesn't help you defining which virtual hosts you
> have.
it's not exactly your use case, but there's a lot of milage to be had by just
creating
a query interface for puppet into your customer db and using that..
pseudo code alert:
node foo {
include virtual_web_hosts
}
class virtual_web_hosts {
$websites = websites_for($fqdn)
create_node_vhosts{$websites: }
}
inside your define you use a query_cust_db function to pull out properties for
each vhost.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.