On Jul 11, 2011, at 7:37 PM, Victor Hooi wrote:

> Ken,
> 
> Currently, the existing processes we have are quite ad-hoc, and developers 
> are often responsible for deployment, which is done by hand. I'm hoping 
> Puppet will automate the process, provide better standardisation, and 
> segregate development away from deployment/production.
> 
> All the things I'm attempting to check for (e.g. disk space, file/directory 
> permissions) are things that somebody currently does manually from the 
> command-line (e.g. using "df", "touch x" in a directory).
> 
> I need to to automate it all into Puppet to show that it's a viable option 
> and can replace the manual processes, and then in phase two look at getting 
> things like Nagios (for disk monitoring, or whatever else we have used 
> elsehwere in the organisation for monitoring) up and running in tandem as 
> well.
> 
> The disk space needs to be monitored because parts of the application don't 
> handle full disks well and will crash nastily. This is only an issue 
> intra-day. Basically, we spin up the application in the morning, and we know 
> with good certainty the maximum space they'll consume, then the application 
> is killed off at the end of the day. As long as we have more the <x> bytes 
> available when we install things, we know we'll be fine.
> 
> The permissions is something I'd like to ensure when we setup a box - the 
> directory/files are setup for us by sys-admins, and we just want to run some 
> sanity checks to make sure they've set it up properly for us. Currently 
> there's a lot of to-ing and fro-ing to check everythign is setup by the 
> sys-admins correctly, I'd like to simply run-up Puppet, and have it ensure 
> for these things.
> 
> So the best way is to write custom facts for all the things we're sanity 
> checking, then just do a ensure-> on them, right?

So, here's what I see you doing.  Tell me if I'm confused.


1) You want to do an "ensure" on permissions to make sure "stuff" is set right. 
 In general this isn't done with facts.  You just declare it, and puppet makes 
it so.

2) You have resources you don't want to run if there's not enough space 
available.  This can be done by creating a "free_disk_space" fact and using 
that in an if statement that wraps resources.  Keep in mind that, this being 
unix, there's no "drives" so if you will probably be checking the amount of 
space on root if you don't think about it.  This might be what you want.  If 
not you can create facts like free_space_var or whatever.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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.

Reply via email to