Ashley Penney <apen...@gmail.com> writes: > We've been having some internal discussions about the best way to handle > certain cases and I thought I'd turn to the list to solicit opinions on how > other people have solved this issue (or don't, as the case may be). The > issue is that we would like our modules to, where possible, check for the > existence of certain on disk data when installing a service for the first > time and retrieve it from somewhere if it's not available.
Patrick asked some really good questions about this, but generally: > As an example of the kind of thing we're talking about we use a product > called Sonatype Nexus that relies on a bunch of on disk data in > /srv/sonatype-nexus/. When installing the system for the first time (for > example, when the file{} containing the .war triggers) we would like it to > automatically put down a copy of /srv/sonatype-nexus/. We obviously don't > want this drifting out of sync with the production data which is where the > issue is. How do other people handle this? Package those data files yourself, if necessary including logic in the package to ensure that you don't overwrite valuable local changes. Then use puppet to ensure that package is either 'installed' or 'latest'. > Our options seem to be: > > * Nightly/hourly backups of production data to some location where Puppet > can rsync/wget/shovel it out when needed. > * Some kind of process that real-time syncs directories to nfs storage. > * Erroring if the data is missing in some fashion when Puppet runs and > relying on > sysadmins to put it in place. ...or making it available as a puppet file server, and using puppet to put it in place. > We've talked through the options but they all have fairly significant > drawbacks. My personal favorite solution would be some kind of daemon that > syncs data constantly and is capable of intelligently syncing the data back > to the node if it goes missing. It could be potentially error prone but it > represents the least bad choice. You could potentially just use: file { "/example": source => 'puppet:///module/example', replace => false } That will only put the file in place if it doesn't already exist. Regards, Daniel -- ✣ Daniel Pittman ✉ dan...@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.