On Feb 28, 2011, at 12:36 AM, Thomas Rasmussen wrote:
> Hello
>
> I'm beginning to learn howto puppet but I have stumbled upon a problem
> that I can't seem to find a solution to.
>
> We want to use puppet to deploy applications (MySQL and JBOSS
> installations) but when I create a manifests like this
>
> class mysql::version559 {
> include mysql_user
> file { "/path/mysql-5.5.9":
> ensure => directory,
> recurse => true,
> purge => true,
> force => true,
> owner => "root",
> group => "root",
> source => "puppet://puppet-server/modules/mysql/mysql-5.5.9",
> }
> }
>
> it runs very slowly, with about 3-5 seconds per file (even the small
> ones!)
Assuming your definition of small matches mine (less that 50Kb), in my
experience Puppet will only do this if the server is loaded (not applicable to
you) or if you have high latency. (more than 100ms ping) Switching away from
Webrick is strongly advised because 2 clients running at the same time can
heavily load it down when serving files, but I know that doesn't apply to you.
In my case, I use an exec managed by puppet that uses rsync to sync the files
at 2am. Here it is although it doesn't sound like it's very useful to you.
There's also a bit more code to force it to run on the first run using a
creates.
exec { "/usr/bin/rsync -avz simba.outer::www/ /var/www/":
schedule => long_maintenance,
require => [Package["apache2"], Package["rsync"]],
}
schedule { long_maintenance:
period => daily,
repeat => 1,
range => "1:30 - 2:30",
}
> Any ideas on what the best solution is? It is NOT a solution to simply
> setup a manifests that installs the app from the ubuntu repository. Is
> there any way of using ie. rsync to deploy the files instead of
> puppet?
Again, I'm giving you what you asked for, but this is rather simple.
--
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.