On Monday, April 20, 2015 at 10:49:28 PM UTC+10, Pete Brown wrote: > > Comments inline. > > On 9 Mar 2015 17:19, "Alex Harvey" <alexh...@gmail.com <javascript:>> > wrote: > > > I have two questions: > > > > Question #1. Most puppet cloud solutions typically a base class > that configures services common to all nodes like the resolver, Nagios, > LDAP, etc. These classes all depend on the existence of external services > to function (i.e. a DNS server; a DHCP server; a Nagios server; an LDAP > server; and a Logstash system). Without these services, puppet is expected > to fail as it applies the said base class. > > > > Now imagine there's a role that builds a front end web server that > applies a profile that includes the base class. > > > > If we try to apply that class in a vagrant environment it fails, unless: > > > > 1) Our vagrant model environment itself firstly provides a DNS, Nagios, > LDAP server - I imagine no one actually does this because no one would have > a development laptop with sufficient grunt to spin up all these services > simultaneously, and not to mention the time it would take to spin them all > up. > > You are using puppet to manage your cloud instances right? > If you use images for your instances (using something like packer and > provisioning them with puppet) they will load up pretty quickly. > You could set dependencies on the instances each instance requires. > So your instances become just another resource. > I think you are misunderstanding the problem.
Allow me to add some example code that might make it clearer. Imagine I have a base class that includes a FreeIPA client class and a metrics colllection class: class base { ... include freeipa::client include metrics::client } Assume that both the FreeIPA client and metrics client classes manage services or sets of services, and these services won't start unless there exists a FreeIPA server and a metrics server on the network. Let's assume further that I don't want my production FreeIPA or metrics servers to be polluted with data from short-lived developer vagrant instances. So back to my questions, 1) How can I run up this instance in vagrant without building on my laptop either real external services (FreeIPA & metrics collection) or mock services that pretend to be the real thing (and, I have no idea how I would actually build a mock FreeIPA service but I suppose it's one solution in theory). 2) (More crucially) How can this chicken-egg problem be resolved when building the first instances in my empty cloud at the start of the project. If I build the FreeIPA server first, it will fail because it needs the metrics collection server. If I build the metrics server first, it fails because it needs the FreeIPA server. -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5f6884cf-d61c-482f-afbe-6b733b955670%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.