FAQ
Hi all,

We are configuring Jenkins and Sonar with puppet and both systems use
plugins. What is the preferred way of managing plugin-like resources
with puppet?

I am looking at two options but if you have a better idea let me know!

1. Create plugin::installed and plugin::uninstalled definitions:

define plugin::installed {
$plugin_url = "${name}"

exec {
"download-jenkins-plugin-${name}" :
command => "wget -O `basename ${plugin_url}` ${plugin_url}
--no-check-certificate",
cwd => "${jenkins::plugin_dir}",
path => '/usr/bin',
user => "${jenkins::user}",
group => "${jenkins::group}",
creates => "${jenkins::plugin_dir}/${plugin}"
}
}

define plugin::uninstalled {
$plugin_url = "${name}"

exec {
"uninstall-jenkins-plugin ${name}" :
command => "rm ${plugin_url}",
cwd => "${jenkins::plugin_dir}",
path => ['/usr/bin', '/bin'],
user => "${jenkins::user}",
onlyif => "test -e `basename ${plugin_url}`"
}
}

and define an array of installed and uninstalled plugins on which the
definitions are applied.

OR

2. On every puppet run, clear the plugin directory and then download
every plugin via a plugin definition and an array of installed
plugins.

Option 2 is more compact and easier to use but the downside is that
plugins are downloaded every time.

What do you think?

Cheers,

Frank

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/7BEGHYCw9ugJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Krzysztof Wilczynski at Aug 29, 2012 at 1:01 pm
    Hi,

    [...]

    I'd get rid of wget altogether, then make nice packages for each plugin
    using https://github.com/jordansissel/fpm and then just use Puppet's
    package to install relevant ones.

    KW

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZB8kcy1Xcu4J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 29, '12 at 12:51p
activeAug 29, '12 at 1:01p
posts2
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase