Skip to content

Commit 10575b9

Browse files
committedApr 11, 2014
Centos 6.4 x64 Vagrant box with Hadoop and dependencies (Java, yum)
0 parents  commit 10575b9

File tree

8 files changed

+101
-0
lines changed

8 files changed

+101
-0
lines changed
 

‎.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
.vagrant
3+
cookbooks/*
4+
tmp
5+

‎Cheffile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
#^syntax detection
3+
4+
site 'http://community.opscode.com/api/v1'
5+
6+
cookbook 'yum'
7+
cookbook 'java'
8+
cookbook 'cdh', :path => 'site-cookbooks/cdh'

‎Cheffile.lock

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SITE
2+
remote: http://community.opscode.com/api/v1
3+
specs:
4+
java (1.22.0)
5+
yum (3.2.0)
6+
7+
PATH
8+
remote: site-cookbooks/cdh
9+
specs:
10+
cdh (0.1.0)
11+
12+
DEPENDENCIES
13+
cdh (>= 0)
14+
java (>= 0)
15+
yum (>= 0)
16+

‎Vagrantfile

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Vagrant.configure('2') do |config|
2+
config.vm.box = 'centos6.4'
3+
config.vm.box_url = 'http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.box'
4+
config.vm.synced_folder '.', '/home/vagrant/cdh'
5+
6+
config.vm.define :cdh do |cdh|
7+
public_ip = "10.201.112.42"
8+
9+
cdh.vm.network :private_network, ip: public_ip
10+
cdh.vm.hostname = "cdh.local"
11+
12+
cdh.vm.provider :virtualbox do |vb|
13+
vb.name = "cdh"
14+
vb.customize ["modifyvm", :id, "--memory", 1024]
15+
end
16+
17+
cdh.vm.provision :chef_solo do |chef|
18+
chef.cookbooks_path = "cookbooks"
19+
chef.add_recipe "yum"
20+
chef.add_recipe "java"
21+
chef.add_recipe "cdh"
22+
23+
chef.log_level = :debug
24+
25+
chef.json = {
26+
java:{
27+
install_flavor: "oracle",
28+
jdk_version: "7",
29+
oracle: {
30+
accept_oracle_download_terms: true
31+
}
32+
}
33+
}
34+
end
35+
end
36+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
default[:cdh] = {
2+
public_ip: '127.0.0.1',
3+
}

‎site-cookbooks/cdh/metadata.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
maintainer "CodeMangler"
2+
maintainer_email "hsdpal@gmail.com"
3+
description "Installs/Configures CDH5 (Hadoop and misc)"
4+
version "0.1"

‎site-cookbooks/cdh/recipes/default.rb

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Cookbook Name:: freeswitch
2+
## Recipe:: default
3+
##
4+
5+
## Build requirements
6+
package 'git-core'
7+
package 'rpm-build'
8+
9+
template '/etc/yum.repos.d/cdh5.repo' do
10+
source 'cdh5.repo.erb'
11+
end
12+
13+
%w(hadoop-yarn-resourcemanager hadoop-hdfs-namenode hadoop-yarn-nodemanager hadoop-hdfs-datanode hadoop-mapreduce hadoop-mapreduce-historyserver hadoop-yarn-proxyserver hadoop-client).each do |pkg|
14+
package pkg do
15+
action :upgrade
16+
end
17+
end
18+
19+
%w(hadoop-0.20-mapreduce-jobtracker hadoop-0.20-mapreduce-tasktracker hadoop-hdfs-datanode).each do |pkg|
20+
package pkg do
21+
action :upgrade
22+
end
23+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[cloudera-cdh5]
2+
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 6 x86_64
3+
name=Cloudera's Distribution for Hadoop, Version 5
4+
baseurl=http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/
5+
gpgkey = http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera
6+
gpgcheck = 1

0 commit comments

Comments
 (0)
Please sign in to comment.