You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ra...@apache.org on 2012/05/17 22:13:41 UTC

svn commit: r1339839 - in /incubator/ambari/branches/ambari-186: ./ hmc/puppet/modules/hdp-ganglia/manifests/ hmc/puppet/modules/hdp-hadoop/manifests/ hmc/puppet/modules/hdp-hbase/manifests/ hmc/puppet/modules/hdp-hive/manifests/ hmc/puppet/modules/hdp...

Author: ramya
Date: Thu May 17 20:13:40 2012
New Revision: 1339839

URL: http://svn.apache.org/viewvc?rev=1339839&view=rev
Log:
AMBARI-270. Puppet cleanup to define all the users in a common location

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/init.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/mysql-connector.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/server.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/server.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-sqoop/manifests/mysql-connector.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/server.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-zookeeper/manifests/params.pp
    incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp/manifests/params.pp

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu May 17 20:13:40 2012
@@ -2,7 +2,10 @@ Ambari Change log
 
 Release 0.x.x - unreleased
 
-  AMBARI-270. Specifiy the notification intervals and options for Alerts 
+  AMBARI-270. Puppet cleanup to define all the users in a common 
+  location (ramya)
+
+  AMBARI-269. Specifiy the notification intervals and options for Alerts 
   (vgogate via ramya)
 
   AMBARI-300. Change the status message (success/error) location so that it 

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/params.pp Thu May 17 20:13:40 2012
@@ -5,9 +5,8 @@ class hdp-ganglia::params() inherits hdp
 
   $ganglia_shell_cmds_dir = hdp_default("ganglia_shell_cmd_dir","/usr/libexec/hdp/ganglia")
   
-  $gmetad_user = "nobody" #TODO: cannot be changed yet
-  
-  $gmond_user = hdp_default("gmond_user","nobody")
+  $gmetad_user = $hdp::params::gmetad_user
+  $gmond_user = $hdp::params::gmond_user
 
   $webserver_group = hdp_default("hadoop/gangliaEnv/webserver_group","apache")
 

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hadoop/manifests/params.pp Thu May 17 20:13:40 2012
@@ -10,8 +10,8 @@ class hdp-hadoop::params(
 
   ####### users
 
-  $mapred_user = hdp_default("mapred_user","mapred")
-  $hdfs_user = hdp_default("hdfs_user","hdfs")
+  $mapred_user = $hdp::params::mapred_user
+  $hdfs_user = $hdp::params::hdfs_user
   
   ### hadoop-env
   

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hbase/manifests/params.pp Thu May 17 20:13:40 2012
@@ -2,7 +2,7 @@ class hdp-hbase::params() inherits hdp::
 {
   
   ####### users
-  $hbase_user = hdp_default("hbase_user","hbase")
+  $hbase_user = $hdp::params::hbase_user
   
   ### hbase-env
   $hadoop_conf_dir = hdp_default("hadoop/hbase-env/hadoop_conf_dir")

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/init.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/init.pp Thu May 17 20:13:40 2012
@@ -5,7 +5,7 @@ class hdp-hive(
 {
   include hdp-hive::params
 
-  $hive_user = $hdp::params::hive_user
+  $hive_user = $hdp-hive::params::hive_user
   $hive_config_dir = $hdp-hive::params::hive_conf_dir
 
   anchor { 'hdp-hive::begin': }
@@ -55,7 +55,7 @@ define hdp-hive::configfile(
 {
   hdp::configfile { "${hdp-hive::params::hive_conf_dir}/${name}":
     component        => 'hive',
-    owner            => $hdp::params::hive_user,
+    owner            => $hdp-hive::params::hive_user,
     mode             => $mode,
     hive_server_host => $hive_server_host 
   }

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/mysql-connector.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/mysql-connector.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/mysql-connector.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/mysql-connector.pp Thu May 17 20:13:40 2012
@@ -16,7 +16,6 @@ class hdp-hive::mysql-connector()
   exec{ "unzip hive_mysql_url":
     command => "unzip -o -j ${target}",
     cwd     => $hive_lib,
-    #user    => $hdp::params::hive_user,
     group   => $hdp::params::hadoop_user_group,
     creates => "${hive_lib}/${$zip_name}",
     path    => ["/usr/bin/"]

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/params.pp Thu May 17 20:13:40 2012
@@ -4,10 +4,10 @@ class hdp-hive::params() inherits hdp::p
   #TODO: will move to globals
   $hive_metastore_user_name = hdp_default("hadoop/hive-site/hive_metastore_user_name","dbusername")
   $hive_metastore_user_passwd = hdp_default("hadoop/hive-site/hive_metastore_user_passwd","dbpassword")
- 
- ####### users
- 
-  
+
+  ### users
+  $hive_user = $hdp::params::hive_user 
+
   ### common
   $hive_metastore_port = hdp_default("hive_metastore_port",9083)
   $hive_lib = hdp_default("hive_lib","/usr/lib/hive/lib/") #TODO: should I remove and just use hive_dbroot
@@ -20,7 +20,6 @@ class hdp-hive::params() inherits hdp::p
   $hive_log_dir = hdp_default("hadoop/hive-env/hive_log_dir","/var/log/hive")
 
   $hive_pid_dir = hdp_default("hadoop/hive-env/hive_pid_dir","/var/run/hive")
-#  $hive_pid_dir = "${hive_piddirprefix}/${hdp::params::hive_user}"
   
   ### hive-site
   $hive_database_name = hdp_default("hadoop/hive-site/hive_database_name","hive")

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/server.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/server.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/server.pp Thu May 17 20:13:40 2012
@@ -34,7 +34,7 @@ class hdp-hive::server(
 
 class hdp-hive::hdfs-directories($service_state)
 {
-  $hive_user = $hdp::params::hive_user
+  $hive_user = $hdp-hive::params::hive_user
  
   hdp-hadoop::hdfs::directory{ '/apps/hive/warehouse':
     service_state   => $service_state,

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-hive/manifests/service.pp Thu May 17 20:13:40 2012
@@ -4,7 +4,7 @@ class hdp-hive::service(
 {
   include $hdp-hive::params
   
-  $user = $hdp::params::hive_user
+  $user = $hdp-hive::params::hive_user
   $hadoop_home = $hdp::params::hadoop_home
   $hive_log_dir = $hdp-hive::params::hive_log_dir
   $cmd = "env HADOOP_HOME=${hadoop_home} nohup hive --service metastore > ${hive_log_dir}/hive.out 2> ${hive_log_dir}/hive.log &"
@@ -45,7 +45,7 @@ class hdp-hive::service(
 define hdp-hive::service::directory()
 {
   hdp::directory_recursive_create { $name: 
-    owner => $hdp::params::hive_user,
+    owner => $hdp-hive::params::hive_user,
     mode => '0755',
     service_state => $ensure,
     force => true

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/params.pp Thu May 17 20:13:40 2012
@@ -1,6 +1,6 @@
 class hdp-oozie::params() inherits hdp::params
 {
-  $oozie_user = hdp_default("oozie_user","oozie")
+  $oozie_user = $hdp::params::oozie_user 
 
   ###ext url
   $download_url = $hdp::params::gpl_artifacts_download_url

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/server.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/server.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-oozie/manifests/server.pp Thu May 17 20:13:40 2012
@@ -34,7 +34,7 @@ class hdp-oozie::server(
 
 class hdp-oozie::hdfs-directories($service_state)
 {
- $oozie_user = $hdp::params::oozie_user
+ $oozie_user = $hdp-oozie::params::oozie_user
   hdp-hadoop::hdfs::directory{ '/user/oozie':
     service_state => $service_state,
     owner => $oozie_user,

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-sqoop/manifests/mysql-connector.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-sqoop/manifests/mysql-connector.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-sqoop/manifests/mysql-connector.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-sqoop/manifests/mysql-connector.pp Thu May 17 20:13:40 2012
@@ -18,7 +18,6 @@ class hdp-sqoop::mysql-connector()
   exec{ "unzip sqoop_mysql_url":
     command => "unzip -o -j ${target}",
     cwd     => $sqoop_lib,
-    #user    => $hdp::params::sqoop_user,
     group   => $hdp::params::hadoop_user_group,
     creates => "${sqoop_lib}/${$zip_name}",
     path    => ["/usr/bin/"]

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/params.pp Thu May 17 20:13:40 2012
@@ -1,6 +1,6 @@
 class hdp-templeton::params() inherits hdp::params
 {
-  $templeton_user = hdp_default("templeton_user","templeton")
+  $templeton_user = $hdp::params::templeton_user
 
   ###pig and hive tar url connector
   $download_url = $hdp::params::apache_artifacts_download_url

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/server.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/server.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-templeton/manifests/server.pp Thu May 17 20:13:40 2012
@@ -34,7 +34,7 @@ class hdp-templeton::server(
 
 class hdp-templeton::hdfs-directories($service_state)
 {
- $templeton_user = $hdp::params::templeton_user
+ $templeton_user = $hdp-templeton::params::templeton_user
  #TODO: need to make sure that hdfs service is running
   hdp-hadoop::hdfs::directory{ '/user/templeton':
     service_state => $service_state,
@@ -47,7 +47,7 @@ class hdp-templeton::hdfs-directories($s
 
 class hdp-templeton::copy-hdfs-directories($service_state)
 {
- $templeton_user = $hdp::params::templeton_user
+ $templeton_user = $hdp-templeton::params::templeton_user
  $pig_src_tar = "$hdp::params::artifact_dir/pig.tar.gz"
  #TODO: need to make sure that hdfs service is running
   hdp-hadoop::hdfs::copyfromlocal { '/usr/share/templeton/templeton*jar':

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-zookeeper/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-zookeeper/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-zookeeper/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-zookeeper/manifests/params.pp Thu May 17 20:13:40 2012
@@ -2,7 +2,7 @@ class hdp-zookeeper::params() inherits h
 {
   $conf_dir = $hdp::params::zk_conf_dir
 
-  $zk_user = hdp_default("zk_user","zookeeper")
+  $zk_user = $hdp::params::zk_user
   
   $zk_log_dir = hdp_default("zk_log_dir","/var/log/zookeeper")
   $zk_data_dir = hdp_default("zk_data_dir","/var/lib/zookeeper/data")

Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp/manifests/params.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp/manifests/params.pp?rev=1339839&r1=1339838&r2=1339839&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp/manifests/params.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp/manifests/params.pp Thu May 17 20:13:40 2012
@@ -57,13 +57,29 @@ class hdp::params()
 
   ############ users
   $user_info = hdp_default("user_info",{})
-  #TODO: move rest of users here so can be used globally and also put all in user info
-  
-  # $hcat_user = hdp_default("hcat_user","hcat")
+
+  $hdfs_user = hdp_default("hdfs_user","hdfs")
+  $mapred_user = hdp_default("mapred_user","mapred")
+
+  $zk_user = hdp_default("zk_user","zookeeper") 
+  $hbase_user = hdp_default("hbase_user","hbase")
+
+  $hive_user = hdp_default("hive_user","hive")
+  $hcat_user = hdp_default("hcat_user","hcat")
+
   $oozie_user = hdp_default("oozie_user","oozie")
   $templeton_user = hdp_default("templeton_user","templeton")
-  $smokeuser = hdp_default("smokeuser","hrt_qa")
+
+  $gmetad_user = hdp_default("gmetad_user","nobody")
+  $gmond_user = hdp_default("gmond_user","nobody")
+
+  $smokeuser = hdp_default("smokeuser","ambari_qa")
   $smoke_user_group = hdp_default("smoke_user_group","users")
+
+  #because of Puppet user resource issue make sure that $hadoop_user is different from hadoop_user_group
+  $hadoop_user = hdp_default("hadoop_user", "hadoop_deploy")
+  $hadoop_user_group = hdp_default("hadoop_user_group","hadoop")
+
   $ganglia_enabled = hdp_default("ganglia_enabled",true) 
 
   #TODO: either remove or make conditional on ec2
@@ -109,10 +125,6 @@ class hdp::params()
   $snappy_so = hdp_default("snappy_so","libsnappy.so")
   #####
  
-  #because of Puppet user resource issue make sure that $hadoop_user is different from hadoop_user_group
-  $hadoop_user = hdp_default("hadoop_user", "hadoop_deploy")
-  $hadoop_user_group = hdp_default("hadoop_user_group","hadoop")
-
   $exec_path = ["/bin","/usr/bin", "/usr/sbin"]
 
    #### params used on multiple modules
@@ -237,7 +249,6 @@ class hdp::params()
 
     $hcat_server_host = hdp_default("hcat_server_host")
     $hcat_mysql_host = hdp_default("hcat_mysql_host")
-    $hcat_user = hdp_default("hcat_user","hcat")
 
   } elsif ($packages == 'bigtop') {  
     $hdp_yum_repo_base_url =  "${hdp_repo_url}"
@@ -270,11 +281,9 @@ class hdp::params()
     $update_zk_shell_files = false
 
     $hive_mysql_host = hdp_default("hive_mysql_host","localhost")
-    $hive_user = hdp_default("hive_user","hive")
 
     $hcat_server_host = hdp_default("hive_server_host")
     $hcat_mysql_host = hdp_default("hive_mysql_host")
-    $hcat_user = hdp_default("hcat_user","hcat")
 
   }