incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject git commit: AMBARI-2785. E2E integration of new versions of Ganglia and Nagios. (Vitaly Brodetskyi via smohanty)
Date Wed, 31 Jul 2013 20:06:26 GMT
Updated Branches:
  refs/heads/trunk db1df4582 -> 7162d936f


AMBARI-2785. E2E integration of new versions of Ganglia and Nagios. (Vitaly Brodetskyi via
smohanty)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/7162d936
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/7162d936
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/7162d936

Branch: refs/heads/trunk
Commit: 7162d936f9297de552d7399fb02a95f2c5eeb3e1
Parents: db1df45
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Wed Jul 31 13:06:10 2013 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Wed Jul 31 13:06:10 2013 -0700

----------------------------------------------------------------------
 .../modules/hdp-ganglia/manifests/monitor.pp    |  6 ++-
 .../modules/hdp-ganglia/manifests/server.pp     |  2 +-
 .../modules/hdp-nagios/manifests/params.pp      |  2 +-
 .../modules/hdp-nagios/manifests/server.pp      | 12 +++++-
 .../hdp-nagios/manifests/server/packages.pp     | 20 ++++++----
 .../hdp-nagios/templates/nagios.conf.erb        | 21 -----------
 .../modules/hdp-nagios/templates/nagios.erb     |  2 +-
 .../main/puppet/modules/hdp/manifests/params.pp | 39 +++++++++++++-------
 8 files changed, 55 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp b/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
index 7f5b370..07b842d 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/monitor.pp
@@ -41,6 +41,8 @@ class hdp-ganglia::monitor(
 
     hdp::package { 'ganglia-monitor': }
 
+    hdp::package { 'ganglia-gmond-modules-python': }
+
     if ($hdp::params::service_exists['hdp-ganglia::server'] != true) {
       class { 'hdp-ganglia::config': ganglia_server_host => $ganglia_server_host}
     }
@@ -64,11 +66,11 @@ class hdp-ganglia::monitor(
     class { 'hdp-ganglia::monitor::ownership': }
 
     if ($hdp::params::service_exists['hdp-ganglia::server'] != true) {
-      Class['hdp-ganglia'] -> Hdp::Package['ganglia-monitor'] -> Class['hdp-ganglia::config']
-> 
+      Class['hdp-ganglia'] -> Hdp::Package['ganglia-monitor'] -> Hdp::Package['ganglia-gmond-modules-python']
-> Class['hdp-ganglia::config'] -> 
         Class['hdp-ganglia::monitor::config-gen'] -> Class['hdp-ganglia::monitor::ownership']
->
         Class['hdp-ganglia::monitor::gmond']
     } else {
-      Hdp::Package['ganglia-monitor'] ->  Class['hdp-ganglia::monitor::config-gen'] ->
+      Hdp::Package['ganglia-monitor'] -> Hdp::Package['ganglia-gmond-modules-python']
-> Class['hdp-ganglia::monitor::config-gen'] ->
         Class['hdp-ganglia::monitor::ownership'] -> Class['hdp-ganglia::monitor::gmond']
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp b/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp
index fd61c64..911c229 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-ganglia/manifests/server.pp
@@ -130,7 +130,7 @@ class hdp-ganglia::server::packages(
   $service_state = 'installed_and_configured'
 )
 {
-  hdp::package { ['ganglia-server','ganglia-gweb','ganglia-hdp-gweb-addons']: 
+  hdp::package { ['libganglia','ganglia-devel','ganglia-server','ganglia-web']: 
     ensure      => $ensure,
     java_needed => false,
     require => Hdp::Package ['rrdtool-python']

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
index fc8121c..66bdf2e 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
@@ -41,7 +41,7 @@ class hdp-nagios::params() inherits hdp::params
   $httpd_conf_file = "/etc/${service_name}/conf.d/nagios.conf"
 
   $plugins_dir = "/usr/lib64/nagios/plugins"
-  $eventhandlers_dir = "/usr/lib64/nagios/eventhandlers"  # Does not exist yet
+  $eventhandlers_dir = "/usr/lib/nagios/eventhandlers"  # Does not exist yet
   $nagios_pid_dir = "/var/run/nagios"
   $nagios_log_dir = '/var/log/nagios'
   $nagios_log_archives_dir = "${nagios_log_dir}/archives"

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
index 7edb303..70516f9 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server.pp
@@ -256,7 +256,17 @@ class hdp-nagios::server::web_permisssions()
     mode  => '0640'
   }
 
-  Hdp::Exec[$cmd] -> File["/etc/nagios/htpasswd.users"]
+  if ($hdp::params::hdp_os_type == "suse") {
+    $command = "usermod -G $hdp-nagios::params::nagios_group wwwrun"
+  } else {
+    $command = "usermod -a -G $hdp-nagios::params::nagios_group apache"
+  }
+
+  hdp::exec { "apache_permissions_htpasswd.users" :
+    command => $command  
+  }
+
+  Hdp::Exec[$cmd] -> File["/etc/nagios/htpasswd.users"] -> Hdp::Exec["apache_permissions_htpasswd.users"]
 }
 
 class hdp-nagios::server::services($ensure)

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
index 2c98fce..03d241d 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
@@ -39,22 +39,27 @@ class hdp-nagios::server::packages(
     java_needed => false
   }
 
-  hdp::package { 'nagios-server':
+  hdp::package { 'nagios-plugins': 
     ensure      => present,
     java_needed => false
   }
   
-  hdp::package { 'nagios-fping': 
+  hdp::package { 'nagios-server':
+    ensure      => present,
+    java_needed => false
+  }
+
+  hdp::package { 'nagios-devel': 
     ensure      => present,
     java_needed => false
   }
   
-  hdp::package { 'nagios-addons': 
+  hdp::package { 'nagios-fping': 
     ensure      => present,
     java_needed => false
   }
-	
-  hdp::package { 'nagios-plugins': 
+  
+  hdp::package { 'nagios-addons': 
     ensure      => present,
     java_needed => false
   }
@@ -67,7 +72,7 @@ class hdp-nagios::server::packages(
   
 debug("## state: $service_state")
   if ($service_state == 'installed_and_configured') {
-
+    
     hdp::package::remove_pkg { 'hdp_mon_nagios_addons':
       package_type => 'hdp_mon_nagios_addons'
     }
@@ -86,8 +91,7 @@ debug("## state: $service_state")
     Hdp::Package::Remove_pkg['hdp_mon_nagios_addons'] -> Hdp::Package::Remove_pkg['nagios-plugins']
-> Exec['remove_package nagios'] -> Hdp::Package['nagios-plugins']
   }
 
-  Hdp::Package['nagios-plugins'] -> Hdp::Package['nagios-server'] -> Hdp::Package['nagios-fping']
-> Hdp::Package['nagios-addons'] -> Hdp::Package['nagios-php-pecl-json']
-
+  Hdp::Package['nagios-plugins'] -> Hdp::Package['nagios-server'] -> Hdp::Package['nagios-devel']
-> Hdp::Package['nagios-fping'] -> Hdp::Package['nagios-addons'] -> Hdp::Package['nagios-php-pecl-json']
     
 
 } 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.conf.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.conf.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.conf.erb
index 34046b2..d8936a0 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.conf.erb
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.conf.erb
@@ -26,26 +26,6 @@
 # needed to fit your system.
 #
 
-<% if scope.function_hdp_template_var("::hdp::params::hdp_os_type") != "suse"%>
-ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi"
-
-<Directory "/usr/lib64/nagios/cgi">
-#  SSLRequireSSL
-   Options ExecCGI
-   AllowOverride None
-   Order allow,deny
-   Allow from all
-#  Order deny,allow
-#  Deny from all
-#  Allow from 127.0.0.1
-   AuthName "Nagios Access"
-   AuthType Basic
-   AuthUserFile /etc/nagios/htpasswd.users
-   Require valid-user
-</Directory>
-<% end %>
-
-<% if scope.function_hdp_template_var("::hdp::params::hdp_os_type") == "suse"%>
 ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
 
 <Directory "/usr/lib/nagios/cgi">
@@ -62,7 +42,6 @@ ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
    AuthUserFile /etc/nagios/htpasswd.users
    Require valid-user
 </Directory>
-<% end %>
 
 Alias /nagios "/usr/share/nagios"
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.erb
index ab74bc0..295db23 100644
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.erb
+++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/nagios.erb
@@ -43,7 +43,7 @@
 
 prefix="/usr"
 exec_prefix="/usr"
-exec="/usr/bin/nagios"
+exec="/usr/sbin/nagios"
 prog="nagios"
 config="/etc/nagios/nagios.cfg"
 pidfile="/var/nagios/nagios.pid"

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7162d936/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
index ea3e130..5a2b91b 100644
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
+++ b/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
@@ -577,16 +577,19 @@ class hdp::params()
     {
       'ALL' => {64 => {'ALL' => 'perl-Net-SNMP'}}
     },
-
+        
     nagios-server => {
       'ALL' => {
         64 => {
-            'ALL' => 'nagios-3.2.3',
-            suse => ['nagios-3.2.3','nagios-www-3.2.3']
+            'ALL' => ['nagios-3.5.0-99','nagios-www-3.5.0-99']
           }
         }
     },
 
+    nagios-devel => {
+      'ALL' => {64 => {'ALL' => 'nagios-devel-3.5.0-99'}}
+    },
+
     nagios-fping => {
       'ALL' => {64 =>{'ALL' => 'fping'}}
     },
@@ -614,20 +617,28 @@ class hdp::params()
       }
     },
 
-    ganglia-server => {
-      'ALL' => {64 => {'ALL' => 'ganglia-gmetad-3.2.0'}}
+    ganglia-devel => {
+      'ALL' => {64 => {'ALL' => 'ganglia-devel-3.5.0-99'}}
     },
 
-    ganglia-gweb => {
-      'ALL' => {64 => {'ALL' => 'gweb'}}
+    libganglia => {
+      'ALL' => {64 => {'ALL' => 'libganglia-3.5.0-99'}}
     },
 
-    ganglia-hdp-gweb-addons => {
-      'ALL' => {64 => {'ALL' => 'hdp_mon_ganglia_addons'}}
+    ganglia-server => {
+      'ALL' => {64 => {'ALL' => 'ganglia-gmetad-3.5.0-99'}}
+    },
+
+    ganglia-web => {
+      'ALL' => {64 => {'ALL' => 'ganglia-web-3.5.7-99.noarch'}}
     },
 
     ganglia-monitor => {
-      'ALL' => {64 => {'ALL' =>'ganglia-gmond-3.2.0'}}
+      'ALL' => {64 => {'ALL' =>'ganglia-gmond-3.5.0-99'}}
+    },
+
+    ganglia-gmond-modules-python => {
+      'ALL' => {64 => {'ALL' =>'ganglia-gmond-modules-python-3.5.0-99'}}
     },
 
     rrdtool-python => {
@@ -711,10 +722,10 @@ class hdp::params()
   $nagios_lookup_daemon_strs = 
   {
     suse => '/usr/sbin/nagios',
-    centos6 => '/usr/bin/nagios',
-    centos5 => '/usr/bin/nagios',
-    redhat6 => '/usr/bin/nagios',
-    redhat5 => '/usr/bin/nagios',
+    centos6 => '/usr/sbin/nagios',
+    centos5 => '/usr/sbin/nagios',
+    redhat6 => '/usr/sbin/nagios',
+    redhat5 => '/usr/sbin/nagios',
     oraclelinux6 => '/usr/bin/nagios',
     oraclelinux5 => '/usr/bin/nagios'
   }


Mime
View raw message