ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [04/15] AMBARI-5747 Remove facter-1.6.10, Ruby, Puppet dependencies from pom.xml and src (dsen)
Date Wed, 14 May 2014 14:02:12 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-zookeeper/templates/zookeeper_jaas.conf.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-zookeeper/templates/zookeeper_jaas.conf.erb b/ambari-agent/src/main/puppet/modules/hdp-zookeeper/templates/zookeeper_jaas.conf.erb
deleted file mode 100644
index 5a53a13..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-zookeeper/templates/zookeeper_jaas.conf.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-Server {
-com.sun.security.auth.module.Krb5LoginModule required
-useKeyTab=true
-storeKey=true
-useTicketCache=false
-keyTab="<%=scope.function_hdp_template_var("::hdp-zookeeper::params::zk_keytab_path")%>"
-principal="<%=scope.function_hdp_template_var("::hdp-zookeeper::params::zk_principal")%>";
-};

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh b/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh
deleted file mode 100644
index 4872a10..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/files/changeToSecureUid.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-username=$1
-directories=$2
-
-function find_available_uid() {
- for ((i=1001; i<=2000; i++))
- do
-   grep -q $i /etc/passwd
-   if [ "$?" -ne 0 ]
-   then
-    newUid=$i
-    break
-   fi
- done
-}
-
-find_available_uid
-
-if [ $newUid -eq 0 ]
-then
-  echo "Failed to find Uid between 1000 and 2000"
-  exit 1
-fi
-
-dir_array=($(echo $directories | sed 's/,/\n/g'))
-old_uid=$(id -u $username)
-echo "Changing uid of $username from $old_uid to $newUid"
-echo "Changing directory permisions for ${dir_array[@]}"
-usermod -u $newUid $username && for dir in ${dir_array[@]} ; do chown -Rh $newUid $dir ; done
-exit 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_args_as_array.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_args_as_array.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_args_as_array.rb
deleted file mode 100644
index 46becea..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_args_as_array.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#to handle differences in how args passed in
-module Puppet::Parser::Functions
-  newfunction(:hdp_args_as_array, :type => :rvalue) do |args|
-    args.kind_of?(Array) ? args : [args]
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_array_from_comma_list.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_array_from_comma_list.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_array_from_comma_list.rb
deleted file mode 100644
index 56882f3..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_array_from_comma_list.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_array_from_comma_list, :type => :rvalue) do |args|
-    args = [args].flatten
-    function_hdp_is_empty(args[0]) ? "" : args[0].split(",") 
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
deleted file mode 100644
index e83a742..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_calc_xmn_from_xms.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_calc_xmn_from_xms, :type => :rvalue) do |args|
-    heapsize_orig_str = args[0].to_s
-    xmn_percent = args[1].to_f
-    xmn_max = args[2].to_i
-    heapsize_str = heapsize_orig_str.gsub(/\D/,"")
-    heapsize = heapsize_str.to_i
-    heapsize_unit = heapsize_orig_str.gsub(/\d/,"")
-    xmn_val = heapsize*xmn_percent
-    xmn_val = xmn_val.floor.to_i
-    xmn_val = xmn_val/8
-    xmn_val = xmn_val*8
-    xmn_val = xmn_val > xmn_max ? xmn_max : xmn_val
-    xmn_val_str = "" + xmn_val.to_s + heapsize_unit
-    xmn_val_str
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_comma_list_from_array.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_comma_list_from_array.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_comma_list_from_array.rb
deleted file mode 100644
index 41007a4..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_comma_list_from_array.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_comma_list_from_array, :type => :rvalue) do |args|
-    args[0].join(",") 
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_default.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_default.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_default.rb
deleted file mode 100644
index 7d48cab..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_default.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_default, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    scoped_var_name = args[0]
-    var_parts = scoped_var_name.split("/")
-    var_name = var_parts.last    
-    default = args[1]    
-    val = lookupvar("::#{var_name}") 
-    if function_hdp_is_empty(val) == false and val.class == String
-      val = val.strip
-    end      
-    # Lookup value inside a hash map.
-    if var_parts.length > 1 and function_hdp_is_empty(val) and function_hdp_is_empty(lookupvar("::configuration")) == false and function_hdp_is_empty(lookupvar("#{var_parts[-2]}")) == false
-      keyHash = var_parts[-2]
-      hashMap = lookupvar("#{keyHash}") 
-      val = hashMap.fetch(var_name, default.to_s)
-    end
-    # To workaround string-boolean comparison issues,
-    # ensure that we return boolean result if the default value
-    # is also boolean
-    if default == true or default == false # we expect boolean value as a result
-      casted_val = (val == "true" or val == true) # converting to boolean
-    else # default
-      casted_val = val
-    end
-    function_hdp_is_empty(val) ? (default||"") : casted_val
-  end
-end
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_escape_spec_characters.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_escape_spec_characters.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_escape_spec_characters.rb
deleted file mode 100644
index a3d7ef8..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_escape_spec_characters.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#to handle differences in how args passed in
-module Puppet::Parser::Functions
-  newfunction(:hdp_escape_spec_characters, :type => :rvalue) do |args|
-    pw_value = args[0]
-    pattern = /(\!|\'|\$|\)|\(|\*|\"|\.|\\)/
-    pw_value.gsub(pattern){|match|"\\"  + match}
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_fail.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_fail.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_fail.rb
deleted file mode 100644
index 9241b1d..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_fail.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_fail) do |args|
-    args = [args].flatten
-    msg = args[0]
-    function_fail(msg)
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_first_value_from_list.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_first_value_from_list.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_first_value_from_list.rb
deleted file mode 100644
index a361419..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_first_value_from_list.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_first_value_from_list, :type => :rvalue) do |args|
-    args.kind_of?(Array) && args.any? ? args[0].to_s : args
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
deleted file mode 100644
index 1bd8ee4..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_dir_from_url.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-# to get directory from URL string
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_dir_from_url, :type => :rvalue) do |args|
-
-    if args.length > 1
-      default = args[1]
-    else
-      default = ""
-    end
-
-    if args.empty?
-      var = default
-    else
-      if args.kind_of?(Array)
-        splitArgsResult = args[0].split(":")
-      else
-        splitArgsResult = args.split(":")
-      end
-      if splitArgsResult.length < 2
-        var = default
-      else
-        strWithDir = splitArgsResult[splitArgsResult.length - 1]
-        startIndexOfDir = strWithDir.index('/')
-        startIndexOfUri = strWithDir.index('///')
-        if startIndexOfDir == nil
-          var = default
-        else
-          if startIndexOfUri == nil
-            var = strWithDir[startIndexOfDir, strWithDir.size - 1]
-          else
-            var = strWithDir[startIndexOfDir + 2, strWithDir.size - 1]
-          end
-        end
-      end
-    end
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_directory_from_filepath.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_directory_from_filepath.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_directory_from_filepath.rb
deleted file mode 100644
index aff6be3..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_directory_from_filepath.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#given file absolute path, return parent directory path
-
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_directory_from_filepath, :type => :rvalue) do |args|
-    dir_path = ""
-    if args.length > 0
-      dir_path = File.split(args[0])[0]
-    end
-    dir_path
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_kinit_path.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_kinit_path.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_kinit_path.rb
deleted file mode 100644
index ee8e6b1..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_kinit_path.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#given set of paths find the first full path to knit
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_kinit_path, :type => :rvalue) do |args|
-    kinit_path = ""
-    if args.length > 0
-      args.join(",").split(',').reject{|s| s.strip.length < 1}.each do |s|
-        path = File.join(s.strip, "kinit")
-        if File.exist?(path) and File.file?(path)
-          kinit_path = path
-          break
-        end
-      end
-    end
-    kinit_path
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb
deleted file mode 100644
index 859af6f..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_major_stack_version.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#to handle differences in how args passed in
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_major_stack_version, :type => :rvalue) do |args|
-    stack_version = args[0]
-    major_stack_version = stack_version.split('.')[0]
-    major_stack_version.to_i
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
deleted file mode 100644
index 8fff51e..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_port_from_url.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-# to get Port from URL string
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_port_from_url, :type => :rvalue) do |args|
-    def is_numeric?(s)
-       !!Integer(s) rescue false
-    end
-
-    var = args.empty? ? "" : args.kind_of?(Array) ? args[0].split(":")[1] : args.split(":")[1]
-    
-    if function_hdp_is_empty(var)
-       if args.kind_of?(Array)
-          if args.length > 1
-             var = args[1]        
-          else 
-             is_numeric?(args[0]) ? args[0] : ""
-          end
-       else 
-          is_numeric?(args) ? args : "";
-       end 
-    else 
-       var
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_value_from_map.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_value_from_map.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_value_from_map.rb
deleted file mode 100644
index f1a9b2a..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_get_value_from_map.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_get_value_from_map, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    hashMap = args[0]
-    key = args[1]
-    default = args[2]
-    val = hashMap.fetch(key, default.to_s)
-    if default == true or default == false
-      casted_val = (val == "true" or val == true) # converting to boolean
-    else # default
-      casted_val = val
-    end
-    function_hdp_is_empty(val) ? (default||"") : casted_val
-  end
-end
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host.rb
deleted file mode 100644
index 00ecb2b..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_host, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    var = args[0]
-    val = lookupvar("::"+var)
-    function_hdp_is_empty(val) ? "" : val 
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host_attribute.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host_attribute.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host_attribute.rb
deleted file mode 100644
index be6ddda..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_host_attribute.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-module Puppet::Parser::Functions
-
-=begin
-  This function returns value of an attribute for a given host
-  or an array of attributes for a given array of hosts (one-to-one mapping).
-  The attribute type is specified by a string identifier (like "publicfqdn").
-=end
-
-  newfunction(:hdp_host_attribute, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    hash,attr,source = args
-    ret_val = lambda do |hash,attr,s|
-      ret = ""
-      ndx = hash[s]
-      unless function_hdp_is_empty(ndx)
-        val = ndx[attr]
-        ret = function_hdp_is_empty(val) ? "" : val
-      end
-      ret
-    end
-    if source.kind_of?(Array)
-      source.map{|s|ret_val.call(hash,attr,s)}
-    else
-     ret_val.call(hash,attr,source)
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_is_empty.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_is_empty.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_is_empty.rb
deleted file mode 100644
index f57f8eb..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_is_empty.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_is_empty, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    el = args[0]
-    el.nil? or (el.respond_to?(:to_s) and ["undefined","undef",""].include?(el.to_s))
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_no_hosts.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_no_hosts.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_no_hosts.rb
deleted file mode 100644
index 6c1a988..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_no_hosts.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_no_hosts, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    var = args[0]
-    function_hdp_is_empty(function_hdp_host(var))
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_option_value.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_option_value.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_option_value.rb
deleted file mode 100644
index 1348879..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_option_value.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_option_value, :type => :rvalue) do |args|
-    args = [args].flatten
-    opts = args[0]
-    key = args[1]
-    if opts.kind_of?(Hash) and not function_hdp_is_empty(key)
-      opts[key]||:undef
-    else
-      :undef
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
deleted file mode 100644
index 8790fde..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_set_from_comma_list.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#to handle differences in how args passed in
-require 'set'
-module Puppet::Parser::Functions
-  newfunction(:hdp_set_from_comma_list, :type => :rvalue) do |args|
-    dir_list = args[0]
-    reject_items = args[1].nil? ? [] : function_hdp_array_from_comma_list(args[1])
-
-    list = function_hdp_array_from_comma_list(dir_list)
-    list.each_index {|i| list [i]=list [i].strip}
-    #Delete empty strings
-    list.reject! { |e| e.empty? or reject_items.include?(e) }
-    list.uniq   
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_str_ends_with.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_str_ends_with.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_str_ends_with.rb
deleted file mode 100644
index d20f515..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_str_ends_with.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_str_ends_with, :type => :rvalue) do |args|
-    args = function_hdp_args_as_array(args)
-    if args.size >= 2
-      str = args[0]
-      substr = args[1]
-      result = str.end_with?(substr)
-    else 
-      result = false
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_template_var.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_template_var.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_template_var.rb
deleted file mode 100644
index 78a84a5..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_template_var.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_template_var, :type => :rvalue) do |args|
-    args = [args].flatten
-    qualified_var = args[0]
-    unless qualified_var =~ /^::/
-      #module_name = lookupvar("module_name")||"UNKNOWN"
-      #qualified_var = "::#{module_name}::params::#{args[0]}"
-      component = lookupvar("component")||"UNKNOWN"
-      module_name = (component == "base" ? "::hdp" : "::hdp-#{component}")      
-      qualified_var = "#{module_name}::params::#{args[0]}"
-    end
-    val = lookupvar(qualified_var)
-    if function_hdp_is_empty(val) == false and val.class == String
-      val = val.strip
-    end  
-    (val.nil? or val == :undefined) ? "" : val 
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_to_lowercase.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_to_lowercase.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_to_lowercase.rb
deleted file mode 100644
index 25e2eaa..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_to_lowercase.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-module Puppet::Parser::Functions
-  newfunction(:hdp_to_lowercase, :type => :rvalue, :doc => <<-EOS
-Converts the case of a string or all strings in an array to lower case.
-    EOS
-  ) do |arguments|
-
-    raise(Puppet::ParseError, "downcase(): Wrong number of arguments " +
-      "given (#{arguments.size} for 1)") if arguments.size < 1
-
-    value = arguments[0]
-    klass = value.class
-
-    unless [Array, String].include?(klass)
-      raise(Puppet::ParseError, 'downcase(): Requires either ' +
-        'array or string to work with')
-    end
-
-    if value.is_a?(Array)
-      # Numbers in Puppet are often string-encoded which is troublesome ...
-      result = value.collect { |i| i.is_a?(String) ? i.downcase : i }
-    else
-      result = value.downcase
-    end
-
-    return result
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_unique_id_and_date.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_unique_id_and_date.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_unique_id_and_date.rb
deleted file mode 100644
index 01179e1..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_unique_id_and_date.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_unique_id_and_date, :type => :rvalue) do 
-    id = lookupvar('::uniqueid')
-    date = `date +"%M%d%y"`.chomp
-    "id#{id}_date#{date}"
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_user.rb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_user.rb b/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_user.rb
deleted file mode 100644
index a858fbb..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/lib/puppet/parser/functions/hdp_user.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-module Puppet::Parser::Functions
-  newfunction(:hdp_user, :type => :rvalue) do |args|
-    args = [args].flatten
-    user = args[0]
-    val = lookupvar("::hdp::params::#{user}")
-    (val.nil? or val == :undefined) ? "" : val 
-  end
-end

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/.directory
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/.directory b/ambari-agent/src/main/puppet/modules/hdp/manifests/.directory
deleted file mode 100644
index 6f816d7..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/.directory
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License
-
-[Dolphin]
-Timestamp=2011,3,16,9,26,14
-ViewMode=1

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
deleted file mode 100644
index b7db742..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/configfile.pp
+++ /dev/null
@@ -1,98 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-define hdp::configfile(
-  $component,
-  $conf_dir = undef, #if this is undef then name is of form conf_dir/file_name
-  $owner = undef, 
-  $group = $hdp::params::user_group,
-  $mode = undef,
-  $size = 64, #32 or 64 bit (used to pick appropriate java_home)
-  $template_tag = undef,
-  $namenode_host = $hdp::params::namenode_host,
-  $jtnode_host = $hdp::params::jtnode_host,
-  $snamenode_host = $hdp::params::snamenode_host,
-  $rm_host = $hdp::params::rm_host,
-  $nm_hosts = $hdp::params::nm_hosts,
-  $hs_host = $hdp::params::hs_host,
-  $slave_hosts = $hdp::params::slave_hosts,
-  $journalnode_hosts = $hdp::params::journalnode_hosts,
-  $zkfc_hosts = $hdp::params::zkfc_hosts,
-  $mapred_tt_hosts = $hdp::params::mapred_tt_hosts,
-  $all_hosts = $hdp::params::all_hosts,
-  $hbase_rs_hosts = $hdp::params::hbase_rs_hosts,
-  $zookeeper_hosts = $hdp::params::zookeeper_hosts,
-  $flume_hosts = $hdp::params::flume_hosts,
-  $hbase_master_hosts = $hdp::params::hbase_master_hosts,
-  $hcat_server_host = $hdp::params::hcat_server_host,
-  $hive_server_host = $hdp::params::hive_server_host,
-  $oozie_server = $hdp::params::oozie_server,
-  $webhcat_server_host = $hdp::params::webhcat_server_host,
-  $hcat_mysql_host = $hdp::params::hcat_mysql_host,
-  $nagios_server_host = $hdp::params::nagios_server_host,
-  $ganglia_server_host = $hdp::params::ganglia_server_host,
-  $dashboard_host = $hdp::params::dashboard_host,
-  $gateway_host = $hdp::params::gateway_host,
-  $public_namenode_host = $hdp::params::public_namenode_host,
-  $public_snamenode_host = $hdp::params::public_snamenode_host,
-  $public_rm_host = $hdp::params::public_rm_host,
-  $public_nm_hosts = $hdp::params::public_nm_hosts,
-  $public_hs_host = $hdp::params::public_hs_host,
-  $public_journalnode_hosts = $hdp::params::public_journalnode_hosts,
-  $public_zkfc_hosts = $hdp::params::public_zkfc_hosts,
-  $public_jtnode_host = $hdp::params::public_jtnode_host,
-  $public_hbase_master_hosts = $hdp::params::public_hbase_master_hosts,
-  $public_zookeeper_hosts = $hdp::params::public_zookeeper_hosts,
-  $public_ganglia_server_host = $hdp::params::public_ganglia_server_host,
-  $public_nagios_server_host = $hdp::params::public_nagios_server_host,
-  $public_dashboard_host = $hdp::params::public_dashboard_host,
-  $public_hive_server_host = $hdp::params::public_hive_server_host,
-  $public_oozie_server = $hdp::params::public_oozie_server,
-  $public_webhcat_server_host = $hdp::params::public_webhcat_server_host
-) 
-{
-
-   if ($conf_dir == undef) {
-     $qualified_file_name = $name
-     $file_name = regsubst($name,'^.+/([^/]+$)','\1')
-   } else {
-     $qualified_file_name = "${conf_dir}/${name}"
-     $file_name = $name
-   }
-   if ($component == 'base') {
-     $module = 'hdp'
-   } else {
-      $module = "hdp-${component}"   
-   }
-
-   if ($template_tag == undef) {  
-     $template_name = "${module}/${file_name}.erb"
-   } else {
-     $template_name = "${module}/${file_name}-${template_tag}.erb"
-   }
-
-   file{ $qualified_file_name:
-     ensure  => present,
-     owner   => $owner,
-     group   => $group,
-     mode    => $mode,
-     content => template($template_name)
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp
deleted file mode 100644
index e404c9e..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/download_keytabs.pp
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-define hdp::download_keytab(
-  $masterhost,
-  $keytabdst,
-  $keytabfile,
-  $owner,
-  $group = undef,
-  $mode = '0400',
-  $hostnameInPrincipals = 'yes'
-)
-{
-  $hostname = $hdp::params::hostname
-  if ($hostnameInPrincipals == 'yes') {
-    $keytabsrc = "puppet://${masterhost}/modules/keytabs/${hostname}.${keytabfile}"
-  } else {
-    $keytabsrc = "puppet://${masterhost}/modules/keytabs/${keytabfile}"
-  }
-  file { $keytabdst :
-    ensure => present,
-    source => $keytabsrc,
-    mode => $mode,
-    owner => $owner,
-    group => $group
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
deleted file mode 100644
index d907130..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
+++ /dev/null
@@ -1,528 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-class hdp(
-  $service_state = undef,
-  $pre_installed_pkgs = undef
-)
-{
-
-  import 'params.pp'
-  include hdp::params
-
-  Exec { logoutput => 'on_failure' }
-  
-  hdp::group { 'hdp_user_group':
-    group_name => $hdp::params::user_group,
-  }
-
- ## Port settings
-  if has_key($configuration, 'hdfs-site') {
-    $hdfs-site = $configuration['hdfs-site']
-
-    if (hdp_get_major_stack_version($stack_version) >= 2) {
-      $namenode_port = hdp_get_port_from_url($hdfs-site["dfs.namenode.http-address"])
-      $snamenode_port = hdp_get_port_from_url($hdfs-site["dfs.namenode.secondary.http-address"])
-    } else {
-      $namenode_port = hdp_get_port_from_url($hdfs-site["dfs.http.address"])
-      $snamenode_port = hdp_get_port_from_url($hdfs-site["dfs.secondary.http.address"])
-    }
-
-    $datanode_port = hdp_get_port_from_url($hdfs-site["dfs.datanode.http.address"])
-    $journalnode_port = hdp_get_port_from_url($hdfs-site["dfs.journalnode.http-address"])
-  } else {
-    $namenode_port = "50070"
-    $snamenode_port = "50090"
-    $datanode_port = "50075"
-    $journalnode_port = "8480"
-  }
-
-  if has_key($configuration, 'mapred-site') {
-    $mapred-site = $configuration['mapred-site']
-
-    if (hdp_get_major_stack_version($stack_version) >= 2) {
-      $jtnode_port = hdp_get_port_from_url($mapred-site["mapreduce.jobtracker.http.address"],"50030")
-      $tasktracker_port = hdp_get_port_from_url($mapred-site["mapreduce.tasktracker.http.address"],"50060")
-    } else {
-      $jtnode_port = hdp_get_port_from_url($mapred-site["mapred.job.tracker.http.address"],"50030")
-      $tasktracker_port = hdp_get_port_from_url($mapred-site["mapred.task.tracker.http.address"],"50060")
-    }
-    $jobhistory_port = hdp_get_port_from_url($mapred-site["mapreduce.history.server.http.address"],"51111")
-
-    $hs_port = hdp_get_port_from_url($mapred-site["mapreduce.jobhistory.webapp.address"],"19888")
-  }
-
-  if has_key($configuration, 'yarn-site') {
-    $yarn-site = $configuration['yarn-site']
-    $rm_port = hdp_get_port_from_url($yarn-site["yarn.resourcemanager.webapp.address"],"8088")
-    $rm_https_port = hdp_get_port_from_url($yarn-site["yarn.resourcemanager.webapp.https.address"],"8090")
-    $nm_port = hdp_get_port_from_url($yarn-site["yarn.nodemanager.webapp.address"],"8042")
-  }
-
-  $hbase_master_port = hdp_default("hbase-site/hbase.master.info.port","60010")
-  $hbase_rs_port = hdp_default("hbase-site/hbase.regionserver.info.port","60030")
-  ## Nagios check_tcp port
-  $hbase_master_rpc_port = hdp_default("hbase-site/hbase.master.port", "60000")
-  
-  $ganglia_port = hdp_default("ganglia_port","8651")
-  $ganglia_collector_slaves_port = hdp_default("ganglia_collector_slaves_port","8660")
-  $ganglia_collector_namenode_port = hdp_default("ganglia_collector_namenode_port","8661")
-  $ganglia_collector_jobtracker_port = hdp_default("ganglia_collector_jobtracker_port","8662")
-  $ganglia_collector_hbase_port = hdp_default("ganglia_collector_hbase_port","8663")
-  $ganglia_collector_rm_port = hdp_default("ganglia_collector_rm_port","8664")
-  $ganglia_collector_nm_port = hdp_default("ganglia_collector_nm_port","8660")
-  $ganglia_collector_hs_port = hdp_default("ganglia_collector_hs_port","8666")
-
-  $oozie_server_port = hdp_default("oozie_server_port","11000")
-
-  $templeton_port = hdp_default("webhcat-site/templeton.port","50111")
-
-  $namenode_metadata_port = hdp_default("namenode_metadata_port","8020")
-
-  $changeUid_path = "/tmp/changeUid.sh"
-
-  file { $changeUid_path :
-    ensure => present,
-    source => "puppet:///modules/hdp/changeToSecureUid.sh",
-    mode => '0755'
-  }
-  
-  #TODO: think not needed and also there seems to be a puppet bug around this and ldap
-  class { 'hdp::snmp': service_state => 'running'}
-
-  class { 'hdp::create_smoke_user': }
-
-  if ($pre_installed_pkgs != undef) {
-    class { 'hdp::pre_install_pkgs': }
-  }
-
-  #turns off selinux
-  class { 'hdp::set_selinux': }
-
-  if ($service_state != 'uninstalled') {
-    if ($hdp::params::lzo_enabled == true) {
-      @hdp::lzo::package{ 32:}
-      @hdp::lzo::package{ 64:}
-    }
-    if ($hdp::params::security_enabled) {
-      hdp::package{ 'unzip':
-        ensure       => 'present',
-        size         => $size,
-        java_needed  => false,
-        lzo_needed   => false
-      }
-    }
-  }
-
-  #TODO: treat consistently 
-  if ($service_state != 'uninstalled') {
-    if ($hdp::params::snappy_enabled == true) {
-      include hdp::snappy::package
-    }
-  }
-
-  Hdp::Package<|title == 'hadoop 32'|> ->   Hdp::Package<|title == 'hbase'|>
-  Hdp::Package<|title == 'hadoop 64'|> ->   Hdp::Package<|title == 'hbase'|>
-
-  hdp::package{ 'glibc':
-    ensure       => 'present',
-    size         => $size,
-    java_needed  => false,
-    lzo_needed   => false
-  }
-
-    anchor{'hdp::begin':}
-    anchor{'hdp::end':}
-
-    ##Create all users for all components presents in cluster
-    if ($hdp::params::hbase_master_hosts != "") {
-      class { 'hdp::create_hbase_user': }
-    }
-    
-    if ($hdp::params::nagios_server_host != "") {
-	    hdp::group { 'nagios_group':
-	      group_name => $hdp::params::nagios_group,
-	    }
-
-      hdp::user{ 'nagios_user':
-        user_name => $hdp::params::nagios_user,
-        gid => $hdp::params::nagios_group
-      }
-
-      Anchor['hdp::begin'] -> Hdp::Group['nagios_group'] -> Hdp::User['nagios_user'] -> Anchor['hdp::end']
-    }
-
-    if ($hdp::params::oozie_server != "") {
-      hdp::user{ 'oozie_user':
-        user_name => $hdp::params::oozie_user
-      }
-
-      Anchor['hdp::begin'] -> Hdp::Group['hdp_user_group'] -> Hdp::User['oozie_user'] -> Anchor['hdp::end']  
-    }
-
-    if ($hdp::params::hcat_server_host != "") {
-      hdp::user{ 'webhcat_user':
-        user_name => $hdp::params::webhcat_user
-      }
-
-      if ($hdp::params::webhcat_user != $hdp::params::hcat_user) {
-        hdp::user { 'hcat_user':
-          user_name => $hdp::params::hcat_user
-        }
-      }
-
-      Anchor['hdp::begin'] -> Hdp::Group['hdp_user_group'] -> Hdp::User<|title == 'webhcat_user' or title == 'hcat_user'|> -> Anchor['hdp::end'] 
-    }
-
-    if ($hdp::params::hive_server_host != "") {
-      hdp::user{ 'hive_user':
-        user_name => $hdp::params::hive_user
-      }
-
-      Anchor['hdp::begin'] -> Hdp::Group['hdp_user_group'] -> Hdp::User['hive_user'] -> Anchor['hdp::end']  
-    }
-
-    if ($hdp::params::rm_host != "") {
-      hdp::user { 'yarn_user':
-        user_name => $hdp::params::yarn_user
-      }
-      
-      Anchor['hdp::begin'] -> Hdp::Group['hdp_user_group'] -> Hdp::User['yarn_user'] -> Anchor['hdp::end']
-    }
-
-}
-
-class hdp::pre_install_pkgs
-{
-
-  if ($service_state == 'installed_and_configured') {
-    hdp::exec{ 'yum install $pre_installed_pkgs':
-       command => "yum install -y $pre_installed_pkgs"
-    }
-  } elsif ($service_state == 'uninstalled') {
-    hdp::exec{ 'yum erase $pre_installed_pkgs':
-       command => "yum erase -y $pre_installed_pkgs"
-    }
-  }
-}
-
-class hdp::create_hbase_user()
-{
-  $hbase_user = $hdp::params::hbase_user
-
-  hdp::user{ 'hbase_user':
-    user_name => $hbase_user,
-    groups => [$hdp::params::user_group]
-  }
-
-  ## Set hbase user uid to > 1000
-  $cmd_set_hbase_uid_check = "test $(id -u ${hbase_user}) -gt 1000"
-  $hbase_user_dirs = "/home/${hbase_user},/tmp/${hbase_user},/usr/bin/${hbase_user}"
-
-  hdp::set_uid { 'set_hbase_user_uid':
-    user      => $hbase_user,
-    user_dirs => $hbase_user_dirs,
-    unless    => $cmd_set_hbase_uid_check
-  }
-
-  Group['hdp_user_group'] -> Hdp::User['hbase_user'] -> Hdp::Set_uid['set_hbase_user_uid']
-}
-
-class hdp::create_smoke_user()
-{
-
-  $smoke_group = $hdp::params::smoke_user_group
-  $smoke_user = $hdp::params::smokeuser
-  $security_enabled = $hdp::params::security_enabled
-
-  hdp::group { 'smoke_group':
-    group_name => $smoke_group,
-  }
-  
-	hdp::group { 'proxyuser_group':
-	  group_name => $proxyuser_group,
-	}
-  
-  hdp::user { 'smoke_user':
-    user_name => $smoke_user,
-    gid    => $hdp::params::user_group,
-    groups => ["$proxyuser_group"]
-  }
-
-  ## Set smoke user uid to > 1000 for enable security feature
-  $smoke_user_dirs = "/tmp/hadoop-${smoke_user},/tmp/hsperfdata_${smoke_user},/home/${smoke_user},/tmp/${smoke_user},/tmp/sqoop-${smoke_user}"
-  $cmd_set_uid_check = "test $(id -u ${smoke_user}) -gt 1000"
-
-  hdp::set_uid { 'set_smoke_user_uid':
-    user      => $smoke_user,
-    user_dirs => $smoke_user_dirs,
-    unless    => $cmd_set_uid_check
-  }
-
-  Hdp::Group<|title == 'smoke_group' or title == 'proxyuser_group'|> ->
-  Hdp::User['smoke_user'] -> Hdp::Set_uid['set_smoke_user_uid']
-}
-
-
-class hdp::set_selinux()
-{
- $cmd = "/bin/echo 0 > /selinux/enforce"
- hdp::exec{ $cmd:
-    command => $cmd,
-    unless => "head -n 1 /selinux/enforce | grep ^0$",
-    onlyif => "test -f /selinux/enforce"
- }
-}
-
-define hdp::group(
-  $group_name = undef
-)
-{
-  if($hdp::params::defined_groups[$group_name]!="defined"){
-    group { $name:
-      name => $group_name,
-      ensure => present   
-    }
-    
-    $hdp::params::defined_groups[$group_name] = "defined"
-  }
-}
-
-define hdp::user(
-  $user_name = undef,
-  $gid = $hdp::params::user_group,
-  $just_validate = undef,
-  $groups = undef,
-  $uid = undef
-)
-{
-  $user_info = $hdp::params::user_info[$user_name]
-  
-  if ($just_validate != undef) {
-    $just_val  = $just_validate
-  } elsif (($user_info == undef) or ("|${user_info}|" == '||')){ #tests for different versions of Puppet
-    $just_val = false
-  } else {
-    $just_val = $user_info[just_validate]
-  }
-  
-  if ($just_val == true) {
-    exec { "user ${name} exists":
-      command => "su - ${user_name} -c 'ls /dev/null' >/dev/null 2>&1",
-      path    => ['/bin']
-    }
-  } else {
-      if(!defined(User[$user_name])){
-        user { $user_name:
-          ensure     => present,
-          managehome => true,
-          gid        => $gid, #TODO either remove this to support LDAP env or fix it
-          shell      => '/bin/bash',
-          groups     => $groups,
-          uid        => $uid
-        }
-      } else {
-        User <| $name == $user_name |> {
-          groups +> $groups
-        }
-      }
-  }
-}
-
-     
-define hdp::directory(
-  $owner = undef,
-  $group = $hdp::params::user_group,
-  $mode  = undef,
-  $ensure = directory,
-  $force = undef,
-  $links = 'follow',
-  $service_state = 'running',
-  $override_owner = false
-  )
-{
- if (($service_state == 'uninstalled') and ($wipeoff_data == true)) {
-  file { $name :
-    ensure => absent,
-    owner  => $owner,
-    group  => $group,
-    mode   => $mode,
-    links  => $links,
-    force  => $force
-   }
-  } elsif ($service_state != 'uninstalled') {
-    if $override_owner == true {
-      file { $name :
-      ensure => $ensure,
-      owner  => $owner,
-      group  => $group,
-      links  => $links,
-      mode   => $mode,
-      force  => $force
-     }
-    } else {
-      file { $name :
-      ensure => $ensure,
-      links  => $links,
-      mode   => $mode,
-      force  => $force
-     }
-    }
-  }
-}
-#TODO: check on -R flag and use of recurse
-define hdp::directory_recursive_create(
-  $owner = undef,
-  $group = $hdp::params::user_group,
-  $mode = undef,
-  $context_tag = undef,
-  $ensure = directory,
-  $force = undef,
-  $service_state = 'running',
-  $override_owner = true
-  )
-{
-
-  hdp::exec {"mkdir -p ${name}" :
-    command => "mkdir -p ${name}",
-    creates => $name
-  }
-  #to take care of setting ownership and mode
-  hdp::directory { $name :
-    owner => $owner,
-    group => $group,
-    mode  => $mode,
-    ensure => $ensure,
-    force => $force,
-    service_state => $service_state,
-    override_owner => $override_owner
-  }
-  Hdp::Exec["mkdir -p ${name}"] -> Hdp::Directory[$name]
-}
-
-define hdp::directory_recursive_create_ignore_failure(
-  $owner = undef,
-  $group = $hdp::params::user_group,
-  $mode = undef,
-  $context_tag = undef,
-  $ensure = directory,
-  $force = undef,
-  $service_state = 'running'
-  )
-{
-  hdp::exec {"mkdir -p ${name} ; exit 0" :
-    command => "mkdir -p ${name} ; exit 0",
-    creates => $name
-  }
-    hdp::exec {"chown ${owner}:${group} ${name}; exit 0" :
-    command => "chown ${owner}:${group} ${name}; exit 0"
-  }
-    hdp::exec {"chmod ${mode} ${name} ; exit 0" :
-    command => "chmod ${mode} ${name} ; exit 0"
-  }
-  Hdp::Exec["mkdir -p ${name} ; exit 0"] -> Hdp::Exec["chown ${owner}:${group} ${name}; exit 0"] -> Hdp::Exec["chmod ${mode} ${name} ; exit 0"]
-}
-
-### helper to do exec
-define hdp::exec(
-  $command,
-  $refreshonly = undef,
-  $unless = undef,
-  $onlyif = undef,
-  $path = $hdp::params::exec_path,
-  $user = undef,
-  $creates = undef,
-  $tries = 1,
-  $timeout = 300,
-  $try_sleep = undef,
-  $initial_wait = undef,
-  $logoutput = 'on_failure',
-  $cwd = undef
-)
-{
-     
-
-
-  if (($initial_wait != undef) and ($initial_wait != "undef")) {
-    #passing in creates and unless so dont have to wait if condition has been acheived already
-    hdp::wait { "service ${name}" : 
-      wait_time => $initial_wait,
-      creates   => $creates,
-      unless    => $unless,
-      onlyif    => $onlyif,
-      path      => $path
-    }
-  }
-  
-  exec { $name :
-    command     => $command,
-    refreshonly => $refreshonly,
-    path        => $path,
-    user        => $user,
-    creates     => $creates,
-    unless      => $unless,
-    onlyif      => $onlyif,
-    tries       => $tries,
-    timeout     => $timeout,
-    try_sleep   => $try_sleep,
-    logoutput   => $logoutput,
-    cwd         => $cwd
-  }
-
-  hdp::java::package{ $name:}
-  
-  anchor{ "hdp::exec::${name}::begin":} -> Hdp::Java::Package[$name] -> Exec[$name] -> anchor{ "hdp::exec::${name}::end":}
-  if (($initial_wait != undef) and ($initial_wait != "undef")) {
-    Anchor["hdp::exec::${name}::begin"] -> Hdp::Wait["service ${name}"] -> Hdp::Java::Package[$name] -> Exec[$name]
-  }
-}
-
-#### utilities for waits
-define hdp::wait(
-  $wait_time,
-  $creates = undef,
-  $unless = undef,
-  $onlyif = undef,
-  $path = undef #used for unless
-)   
-{
-  exec { "wait ${name} ${wait_time}" :
-    command => "/bin/sleep ${wait_time}",
-    creates => $creates,
-    unless  => $unless,
-    onlyif  => $onlyif,
-    path    => $path
-  } 
-}
-
-define hdp::set_uid(
-  $user = undef,
-  $user_dirs = undef,
-  $unless = undef
-)
-{
-  $cmd_set_uid = "/tmp/changeUid.sh ${user} ${user_dirs} 2>/dev/null"
-
-  hdp::exec{ $cmd_set_uid:
-    command => $cmd_set_uid,
-    unless  => $unless
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/java/jce/package.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/java/jce/package.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/java/jce/package.pp
deleted file mode 100644
index 41b8bc9..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/java/jce/package.pp
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-define hdp::java::jce::package(
-  $java_home_dir, $jdk_location, $jdk_bin
-)
-{
-  include hdp::params
-
-  $jce_policy_zip = $hdp::params::jce_policy_zip
-  $artifact_dir = $hdp::params::artifact_dir
-  $jce_curl_target = "${artifact_dir}/${jce_policy_zip}"
-
-  if $jdk_location != '' and $jdk_bin != ''  {
-    $jce_location = regsubst($jdk_location, $jdk_bin, '')
-  } else {
-    $jce_location = $hdp::params::jce_location
-  }
-
-  #TODO:SUHAS how to avoid redownload and install if correct version already present.
-  # may be check the file sizes for local_policy and export_US policy jars? 
-  # UNLESS  => "test -e ${java_exec}"
-  # curl -k - ignoring unverified server ssl sertificate,
-  $curl_cmd = "mkdir -p ${artifact_dir}; curl -kf --retry 10 ${jce_location}/${jce_policy_zip} -o ${jce_curl_target}; echo 0"
-  exec{ "jce-download ${name}":
-    command => $curl_cmd,
-    creates => $jce_curl_target,
-    path    => ["/bin","/usr/bin/"],
-    unless => "test -e ${jce_curl_target}"
-  }
-
-  $security_dir = "${java_home_dir}/jre/lib/security"
-  $cmd = "rm -f local_policy.jar; rm -f US_export_policy.jar; unzip -o -j -q ${jce_curl_target}" 
-  exec { "jce-install ${name}":
-    command => $cmd,
-    onlyif  => "test -e ${security_dir} && test -f ${jce_curl_target}",
-    cwd     => $security_dir,
-    path    => ['/bin/','/usr/bin']
-  }
-
-  #TODO: SUHAS add ensure code to check local and us export policy files exist -> File["${java_exec} ${name}"]
-
-  anchor{"hdp::java::jce::package::${name}::begin":} -> Exec["jce-download ${name}"] ->  Exec["jce-install ${name}"] -> anchor{"hdp::java::jce::package::${name}::end":}
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/java/package.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/java/package.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/java/package.pp
deleted file mode 100644
index 1b748f6..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/java/package.pp
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-define hdp::java::package()
-{
-    
-  include hdp::params
-  
-  $security_enabled = $hdp::params::security_enabled
-  $jdk_bin = $hdp::params::jdk_name
-  $artifact_dir = $hdp::params::artifact_dir
-  $jdk_location = $hdp::params::jdk_location
-  $jdk_curl_target = "${artifact_dir}/${jdk_bin}"
- 
-  $java_home = $hdp::params::java64_home
-  $java_exec = "${java_home}/bin/java"
-  $java_dir = regsubst($java_home,'/[^/]+$','')
-
-  if ($jdk_bin != "") {
-    # curl -k - ignoring unverified server ssl sertificate,
-    $curl_cmd = "mkdir -p ${artifact_dir} ; curl -kf --retry 10 ${jdk_location}/${jdk_bin} -o ${jdk_curl_target}"
-    exec{ "${curl_cmd} ${name}":
-      command => $curl_cmd,
-      creates => $jdk_curl_target,
-      path    => ["/bin","/usr/bin/"],
-      unless  => "test -e ${java_exec}"
-    }
-
-    if (hdp_str_ends_with($jdk_bin, ".bin")) {
-      $install_cmd = "mkdir -p ${java_dir} ; chmod +x ${jdk_curl_target}; cd ${java_dir} ; echo A | ${jdk_curl_target} -noregister > /dev/null 2>&1"
-    }
-    elsif (hdp_str_ends_with($jdk_bin, ".gz")) {
-      $install_cmd = "mkdir -p ${java_dir} ; cd ${java_dir} ; tar -xf ${jdk_curl_target} > /dev/null 2>&1"
-    }
-
-    exec{ "${install_cmd} ${name}":
-      command => $install_cmd,
-      unless  => "test -e ${java_exec}",
-      path    => ["/bin","/usr/bin/"]
-    }
-
-    exec{ "${java_exec} ${name}":
-      command => "test -e ${java_exec}",
-      path    => ["/bin","/usr/bin/"]
-    }
-
-    if ($security_enabled == true) {
-      hdp::java::jce::package{ $name:
-        java_home_dir  => $java_home,
-        jdk_location => $jdk_location,
-        jdk_bin => $jdk_bin
-      }
-    }
-
-    anchor{"hdp::java::package::${name}::begin":} -> Exec["${curl_cmd} ${name}"] ->  Exec["${install_cmd} ${name}"] -> Exec["${java_exec} ${name}"] ->  anchor{"hdp::java::package::${name}::end":}
-    if ($security_enabled == true) {
-      Exec["${java_exec} ${name}"] -> Hdp::Java::Jce::Package[$name]
-   }
- }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/lzo/package.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/lzo/package.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/lzo/package.pp
deleted file mode 100644
index fe5a764..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/lzo/package.pp
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-define hdp::lzo::package()
-{
-  $size = $name
-
-  $pkg_type = "lzo"
-
-  hdp::package {"lzo ${size}":
-    package_type  => "${pkg_type}",
-    size          => $size,
-    java_needed   => false
-  }
-
-  $anchor_beg = "hdp::lzo::package::${size}::begin"
-  $anchor_end = "hdp::lzo::package::${size}::end"
-  anchor{$anchor_beg:} ->  Hdp::Package["lzo ${size}"] -> anchor{$anchor_end:}
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/namenode-conn.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/namenode-conn.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/namenode-conn.pp
deleted file mode 100644
index 268e213..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/namenode-conn.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-class hdp::namenode-conn($namenode_host)
-{
-  Hdp::Configfile<||>{namenode_host => $namenode_host}
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp/manifests/package.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp/manifests/package.pp b/ambari-agent/src/main/puppet/modules/hdp/manifests/package.pp
deleted file mode 100644
index 0ed383e..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp/manifests/package.pp
+++ /dev/null
@@ -1,156 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-define hdp::package(
-  $ensure = present,
-  $package_type = undef,
-  $size = 64,
-  $java_needed = true,
-  $lzo_needed = false
-  )
-{
-
-  $pt = $package_type ? {
-    undef  => $name,
-    default  => $package_type
-  }
-  
-  hdp::package::process_pkg { $name:
-    ensure       => $ensure,
-    package_type => $pt,
-    size         => $size,
-    java_needed  => $java_needed,
-    lzo_needed   => $lzo_needed
-  }
-}
-
-define hdp::package::process_pkg(
-  $ensure = present,
-  $package_type,
-  $size,
-  $java_needed,
-  $lzo_needed
-  )
-{
-
-  $stack_version = $hdp::params::stack_version
-    
-
-  debug("##Processing package:  $ensure,$package_type,$size,$java_needed,$lzo_needed")
-
-  include hdp::params
-
-  if hdp_is_empty($hdp::params::package_names[$package_type]) {
-    hdp_fail("No packages for $package_type")
-  }
-  
-  ## Process packages depending on stack
-  if hdp_is_empty($hdp::params::package_names[$package_type][$stack_version]) {
-
-    if hdp_is_empty($hdp::params::package_names[$package_type][ALL]) {
-      hdp_fail("No packages for $package_type")
-    }
-    else {
-      $packages_list_by_stack = $hdp::params::package_names[$package_type][ALL]
-    }
-  }
-  else {
-    $packages_list_by_stack = $hdp::params::package_names[$package_type][$stack_version]
-  }
-  
-  debug("##Pkg for stack: $packages_list_by_stack")
-  
-  ## Process packages depending on arch
-  if hdp_is_empty($packages_list_by_stack[$size]) {
-
-    if hdp_is_empty($packages_list_by_stack[ALL]) {
-      hdp_fail("No packages for $package_type")
-    }
-    else {
-      $packages_list_by_size = $packages_list_by_stack[ALL]
-    }
-  }
-  else {
-    $packages_list_by_size = $packages_list_by_stack[$size]
-
-  }
-  
-  debug("##Pkg for arch: $packages_list_by_size")
-  
-  ## Process packages depending on os
-  if hdp_is_empty($packages_list_by_size[$hdp::params::hdp_os_type]) {
-
-    if hdp_is_empty($packages_list_by_size[ALL]) {
-      hdp_fail("No packages for $package_type")
-    }
-    else {
-      $packages_list = $packages_list_by_size[ALL]
-    }
-  }
-  else {
-    $packages_list = $packages_list_by_size[$hdp::params::hdp_os_type]
-  }
-
-  debug("##Packages list: $packages_list")
-
-  if (($java_needed == true) and ($ensure == 'present')){
-    hdp::java::package{ $name:}
-  }
-
-  if (($lzo_needed == true) and ($ensure == 'present')){
-    Hdp::Lzo::Package<|title == $size|>
-  }
-
-  if ($ensure == 'uninstalled') {
-    $ensure_actual = 'purged'
-  } else {
-    $ensure_actual = $ensure
-  }
-  $tag = regsubst($name,' ','-',G)
-  if $packages_list != $hdp::params::NOTHING {
-    package{ $packages_list:
-      ensure   => $ensure_actual,
-      tag      => $tag
-    }
-  }
-  anchor{ "hdp::package::${name}::begin": } -> Package<|tag == $tag|> -> anchor{ "hdp::package::${name}::end": }
-  
-  if (($java_needed == true)and ($ensure == 'present')) {
-   Anchor["hdp::package::${name}::begin"] -> Hdp::Java::Package[$name] -> Anchor["hdp::package::${name}::end"] 
-  }
-}
-
-# Removes the specified package using shell command appropriate for current OS type.
-# Method DOES NOT resolve package name via hdp::params.
-# If package does not exist or is not installed, command does nothing.
-define hdp::package::remove_pkg(
-    $package_type,
-  )
-{
-
-  # TODO: For non-rpm based systems, provide appropriate command
-  exec { "remove_package ${package_type}":
-    path    => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-    command => $hdp::params::hdp_os_type ? {
-      default => "rpm -e --allmatches ${package_type} ; true"
-    },
-  }
-
-}


Mime
View raw message