Hi there-
sorry if this is an obvious question, but I'm trying to evaluate
puppet on paper before we commit to an experimental deployment.
Aside: We're using Centos 5.4, so this is RPM/yum specific.

How are updated RPMs in a manifest detected on the puppetmaster side?

What we are trying to achieve:
Set up a puppetmaster with multiple environments <- documentation is
clear on this/can find examples.
Each environment will specify a base set of required applications,
varied by machine type <- mostly understood/can find examples.
Configuration files will be pushed from the puppetmaster to puppet
clients, when a difference in md5 is detected <- understood.

We also want to be able to push updates to our custom (application
executable code) RPMs in a controlled way.
How does the puppetmaster determine the version of an rpm source
file?  Does it base it on the rpm name (eg assuming the standard
naming convention of name-version-release.architecture.rpm)?
What is the format of the 'ensure' stanza to specify package versions
for RPM?
Will 'ensure' also allow/force package downgrades?

We also want to completely separate configuration from application
code (config -> solely deployed via puppet, application code deployed
via RPMs, pushed via puppet.)

We would like config files to be redeployed on package install/
upgrade.
We need services to be started/restarted and added to runlevels on
package install/upgrade.

I've tried to create a concrete snippet, below; comments and
suggestions from you experts would be appreciated!

Thanks in advance,

Julian

Guess at a puppet module:

package { our_app_part1:
    source => 
http://our_file_repo/env_xx/release_yy/our_app_part1_ver##_rel##.noarch.rpm,
    ensure => ver##_rel##.noarch,
    require => [Package[list, of, needed, packages],
Files[our_app1_config, ...]]
}

# Is the subscribe line below needed to ensure the config file is
(re)deployed if the package is (re)installed?
file { "/etc/our_app1.config":
    source => "puppet://server/module/our_app1.config",
    require => [Package[our_app_part1_ver##_rel##.noarch.rpm]],
    subscribe => [Package[our_app_part1]]
}

exec { "/etc/init.d/our_app restart":
    path => ["/usr/bin", "/usr/sbin"],
    subscribe => File["/etc/our_app1.config"],
    refreshonly => true
}

# what do we do here to have this execute only when the package is
(re)deployed and after the config file is pushed by puppet?
# If that is really difficult, it could be triggered on every update
to the config file, similar to update.  The overhead is acceptable.
 exec { "chkconfig our_app on":
    path => ["/usr/bin", "/usr/sbin"],
    subscribe => ?????,
    refreshonly => true
}

-- 
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.

Reply via email to