Closed hamsolodev closed 9 years ago
I wouldn't mind having the same functionality. For the separate RPM method (I built my own 3.0 RPM) I use the require
metaparam and it works OK:
yumrepo { 'temprepo':
baseurl => 'http://my.repo.url/repo",
descr => 'My Repo',
enabled => '1',
}
class { 'supervisor':
require => Yumrepo['temprepo'],
}
Have you seen the other supervisor module someone created for a similar issue? I wonder if that user would like to combine efforts into a single supervisor module? I hate seeing multiple Puppet modules with similar goals duplicating effort. https://github.com/proletaryo/puppet-supervisor
+1 for being able to install via pip
and specifying a version.
I got the latest version (3.0) of Supervisor installed on Ubuntu 12.04 with this module by wrapping it in my own class, like this:
class our_supervisor {
package { 'supervisor':
provider => pip,
ensure => '3.0',
}
class { 'supervisor':
# Include the 'supervisor' module but only after we've already
# installed our desired version via pip first (since otherwise the
# module would only look at the latest apt-get version).
require => Package['supervisor']
}
file {
"/etc/init.d/supervisor":
source => 'puppet:///modules/our_supervisor/supervisor.init',
ensure => file,
mode => 0755,
group => "root",
owner => "root",
before => Class['supervisor'];
"/etc/default/supervisor":
source => 'puppet:///modules/our_supervisor/supervisor.default',
ensure => file,
mode => 0644,
group => "root",
owner => "root",
before => Class['supervisor'];
# currently the 'supervisor' module expects these files to be in
# /usr/bin/, however when installed via pip, they go in /usr/local/bin/
"/usr/bin/echo_supervisord_conf":
before => Class['supervisor'],
ensure => 'link',
target => '/usr/local/bin/echo_supervisord_conf';
"/usr/bin/supervisorctl":
before => Class['supervisor'],
ensure => 'link',
target => '/usr/local/bin/supervisorctl';
"/usr/bin/supervisord":
before => Class['supervisor'],
ensure => 'link',
target => '/usr/local/bin/supervisord';
}
}
Since the pip version doesn't include the init.d/upstart script, I pulled a copy of the files from an older version installed via apt-get. The contents are here: https://gist.github.com/philfreo/6590585
It would be great to see functionality like this built into the module.
I'd definitely merge a patch for this.
Closing due to lack of activity
I’d like to talk about how support could be added for using alternative sources of
supervisor
.The version shipped as a package with ubuntu/debian (3.0a8) doesn’t have support for the
killasgroup
(added in 3.0a11) &stopasgroup
(added in 3.0b1) options, which are necessary in order to make some supervised python services stop/exit cleanly.I have considered simply making my own package and installing it before declaring my use of supervisor, but I would also quite like the ability to be able to tell
puppet-module-supervisor
to install supervisor using—for example, although greater flexibility would be nice—thepip
provider. Would this be something anyone else needs or would it be a waste of time?Cheers!