Updated Branches:
  refs/heads/master 5d127272e -> 83a7f8fde

BIGTOP-1072 : Fully automated Bigtop Fedora Box (Vagrant, VBox, Bigtop YARN 
Hadoop , Fedora 19), round 2

Signed-off-by: Sean Mackrory <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/83a7f8fd
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/83a7f8fd
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/83a7f8fd

Branch: refs/heads/master
Commit: 83a7f8fde6512070e58d67d3dc828d3f1ffa6704
Parents: 5d12727
Author: jayunit100 <[email protected]>
Authored: Sat Nov 16 17:39:07 2013 -0500
Committer: Sean Mackrory <[email protected]>
Committed: Tue Dec 10 11:13:57 2013 -0800

----------------------------------------------------------------------
 bigtop-deploy/vm/vagrant/README       | 11 +++++++++
 bigtop-deploy/vm/vagrant/Vagrantfile  | 39 ++++++++++++++++++++++++++++++
 bigtop-deploy/vm/vagrant/provision.sh | 31 ++++++++++++++++++++++++
 3 files changed, 81 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/83a7f8fd/bigtop-deploy/vm/vagrant/README
----------------------------------------------------------------------
diff --git a/bigtop-deploy/vm/vagrant/README b/bigtop-deploy/vm/vagrant/README
new file mode 100644
index 0000000..59b6d0d
--- /dev/null
+++ b/bigtop-deploy/vm/vagrant/README
@@ -0,0 +1,11 @@
+Set up a vagrant box with bigtop ecosystem.
+
+Shell example:
+
+1) Use fedora19 base box and 
+
+2) yum install the repo
+
+2) yum-config-manager --add-repo 
http://bigtop01.cloudera.org:8080/view/Bigtop-trunk/job/Bigtop-trunk-repository/label=fedora18/lastSuccessfulBuild/artifact/repo/bigtop.repo
+
+3) yum install hadoop , ...

http://git-wip-us.apache.org/repos/asf/bigtop/blob/83a7f8fd/bigtop-deploy/vm/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/bigtop-deploy/vm/vagrant/Vagrantfile 
b/bigtop-deploy/vm/vagrant/Vagrantfile
new file mode 100644
index 0000000..892f079
--- /dev/null
+++ b/bigtop-deploy/vm/vagrant/Vagrantfile
@@ -0,0 +1,39 @@
+VAGRANTFILE_API_VERSION = "2"
+Vagrant.configure("2") do |config|
+  vmbox = "vagrant-fedora19B"
+
+  # Virtual Box implementation
+  vmboxurl = "http://rhbd.s3-us-west-1.amazonaws.com/vagrant/fedora19B.box";
+
+  #First node in the cluster.
+  #HMaster
+  config.vm.define :bigtop1 do |bigtop1|
+  
+               # cachier plugin for faster install,
+               # see https://github.com/fgrehm/vagrant-cachier
+        # bigtop1.cache.enable :yum
+        
+        bigtop1.vm.box = vmbox
+        bigtop1.vm.box_url = vmboxurl
+                
+        bigtop1.vm.network :private_network, ip: "10.10.10.11"
+        
+        # bigtop1.vm.synced_folder "./config", "/vagrant"
+        
+        bigtop1.vm.hostname = "rs1"
+        bigtop1.vm.provision :shell, :path => "provision.sh"
+  end
+
+  # Master node
+  # config.vm.define :bigtop2 do |bigtop2|
+  #       bigtop2.cache.enable :yum
+  #       bigtop2.cache.auto_detect = true
+  #       bigtop2.vm.box = vmbox
+  #       bigtop2.vm.box_url = vmboxurl
+  #       bigtop2.vm.host_name = "master"
+  #       bigtop2.vm.network "private_network", ip: "10.10.10.12"
+  #       bigtop2.vm.synced_folder "./config", "/vagrant"
+  #       bigtop2.vm.provision "shell", path: "provision.sh"
+  # end
+ 
+end

http://git-wip-us.apache.org/repos/asf/bigtop/blob/83a7f8fd/bigtop-deploy/vm/vagrant/provision.sh
----------------------------------------------------------------------
diff --git a/bigtop-deploy/vm/vagrant/provision.sh 
b/bigtop-deploy/vm/vagrant/provision.sh
new file mode 100644
index 0000000..0635dab
--- /dev/null
+++ b/bigtop-deploy/vm/vagrant/provision.sh
@@ -0,0 +1,31 @@
+#Taken from : 
https://cwiki.apache.org/confluence/display/BIGTOP/How+to+install+Hadoop+distribution+from+Bigtop+0.6.0
+#A Vagrant recipe for setting up a hadoop box.
+
+#Get the apache yum repo
+sudo yum install -y wget java-1.7.0-openjdk-devel.x86_64
+
+wget -O /etc/yum.repos.d/bigtop.repo 
http://www.apache.org/dist/bigtop/bigtop-0.6.0/repos/fedora18/bigtop.repo
+
+#Now install the base components
+sudo yum install -y  hadoop\* mahout\* hive\* pig\*
+
+export JAVA_HOME=`sudo find /usr -name java-* | grep openjdk | grep 64 | grep 
"jvm/java" | grep -v fc`
+
+sudo /etc/init.d/hadoop-hdfs-namenode init
+
+#Start each datanode
+for i in hadoop-hdfs-namenode hadoop-hdfs-datanode ; 
+       do sudo service $i start ; 
+done
+
+sudo /usr/lib/hadoop/libexec/init-hdfs.sh
+
+sudo service hadoop-yarn-resourcemanager start
+sudo service hadoop-yarn-nodemanager start
+
+hadoop fs -ls -R /
+
+# Make a directory so that vagrant user has a dir to run jobs inside of. 
+hadoop fs -mkdir /user/vagrant && hadoop fs -chown vagrant:vagrant 
/user/vagrant
+
+hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples*.jar pi 2 2
\ No newline at end of file

Reply via email to