Skip to content

Commit

Permalink
port to ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
kitchen committed Nov 16, 2013
1 parent fc74fe2 commit a64c126
Show file tree
Hide file tree
Showing 4 changed files with 405 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ It has been tested on:

* el5.x
* el6.x
* ubuntu 12.04
* ubuntu 13.04

`$::osfamily == RedHat` and EPEL packages
-----------------------------------------
Expand Down
47 changes: 39 additions & 8 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@
#

class ganglia::params {
$gmond_package_name = 'ganglia-gmond'
$gmond_service_name = 'gmond'

$gmetad_package_name = 'ganglia-gmetad'
$gmetad_service_name = 'gmetad'

# paths are the same for el5.x & el6.x
$web_package_name = 'ganglia-web'
$web_php_config = '/etc/ganglia/conf.php'
# files are the same for ubuntu and el5/el6
$web_php_erb = 'ganglia/conf.php.el6.erb'

case $::osfamily {
redhat: {
$gmond_package_name = 'ganglia-gmond'
$gmond_service_name = 'gmond'

$gmetad_package_name = 'ganglia-gmetad'
$gmetad_service_name = 'gmetad'
$gmetad_user = 'ganglia'

# paths are the same for el5.x & el6.x
$web_package_name = 'ganglia-web'
$web_php_config = '/etc/ganglia/conf.php'

case $::operatingsystemmajrelease {
# the epel packages change uid/gids + install paths between 5 & 6
5: {
Expand All @@ -50,6 +54,33 @@
}
}
}
debian: {
case $::operatingsystem {
ubuntu: {
# I use ubuntu 12.04 and 13.04, have not tested others
$gmond_package_name = 'ganglia-monitor'
$gmond_service_name = 'gangilia-monitor'

$gmetad_package_name = 'gmetad'
$gmetad_service_name = 'gmetad'
$gmetad_user = 'nobody'

$web_package_name = 'ganglia-webfrontend'
$web_php_config = '/usr/share/ganglia-webfrontend/conf.php'

$gmond_service_config = '/etc/ganglia/gmond.conf'
$gmond_service_erb = 'ganglia/gmond.conf.ubuntu.erb'

$gmetad_service_config = '/etc/ganglia/gmetad.conf'
# it's the same file as el6 with only the default user comment changed
$gmetad_service_erb = 'ganglia/gmetad.conf.el6.erb'
}
default: {
fail("Module ${module_name} is not supported on osfamily/operatingsystem: ${::osfamily}/${::operatingsystem}")
}
}
}

default: {
fail("Module ${module_name} is not supported on ${::operatingsystem}")
}
Expand Down
6 changes: 3 additions & 3 deletions templates/gmetad.conf.el6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ gridname "<%= @gridname %>"
# setuid off
#
#-------------------------------------------------------------------------------
# User gmetad will setuid to (defaults to "ganglia")
# default: "ganglia"
# setuid_username "ganglia"
# User gmetad will setuid to (defaults to "<%= @gmetad_user %>")
# default: "<%= @gmetad_user %>"
# setuid_username "<%= @gmetad_user %>"
#
#-------------------------------------------------------------------------------
# The port gmetad will answer requests for XML
Expand Down
Loading

0 comments on commit a64c126

Please sign in to comment.