Skip to content

Instantly share code, notes, and snippets.

@nmilford
Created March 25, 2011 02:25
Show Gist options
  • Save nmilford/886260 to your computer and use it in GitHub Desktop.
Save nmilford/886260 to your computer and use it in GitHub Desktop.
# all the config is in attributes and is placed by the hadoop::default recipe.
package "hadoop-0.20-datanode" do
action :install
version node[:Hadoop][:Version]
end
package "hadoop-0.20-tasktracker" do
action :install
version node[:Hadoop][:Version]
end
node[:Hadoop][:HDFS][:dfsDataDir].each do |dataDir|
directory dataDir do
owner "hdfs"
group "hadoop"
mode "0755"
recursive true
action :create
end
end
node[:Hadoop][:Mapred][:mapredLocalDir].each do |localDir|
directory localDir do
owner "mapred"
group "hadoop"
mode "0755"
recursive true
action :create
end
end
service "hadoop-0.20-datanode" do
action [ :enable, :start ]
running true
supports :status => true, :start => true, :stop => true, :restart => true
end
service "hadoop-0.20-tasktracker" do
action [ :enable, :start ]
running true
supports :status => true, :start => true, :stop => true, :restart => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment