From e3f52986163fca4729a429fb8d648ee016925283 Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Thu, 11 Jun 2015 11:43:43 -0700 Subject: [PATCH 1/6] Install python-dev so that psutils-compile in ambari-metrics-host-monitoring can succeed --- ubuntu12.4/dev-bootstrap.sh | 1 + ubuntu14.4/dev-bootstrap.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ubuntu12.4/dev-bootstrap.sh b/ubuntu12.4/dev-bootstrap.sh index ec880ee..eb13406 100644 --- a/ubuntu12.4/dev-bootstrap.sh +++ b/ubuntu12.4/dev-bootstrap.sh @@ -10,6 +10,7 @@ service ntp start apt-get install make -y apt-get install g++ -y apt-get install git -y +apt-get install python-dev wget http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz tar zxvf node-v0.10.31-linux-x64.tar.gz mv node-v0.10.31-linux-x64 /usr/share/node diff --git a/ubuntu14.4/dev-bootstrap.sh b/ubuntu14.4/dev-bootstrap.sh index ec880ee..eb13406 100644 --- a/ubuntu14.4/dev-bootstrap.sh +++ b/ubuntu14.4/dev-bootstrap.sh @@ -10,6 +10,7 @@ service ntp start apt-get install make -y apt-get install g++ -y apt-get install git -y +apt-get install python-dev wget http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz tar zxvf node-v0.10.31-linux-x64.tar.gz mv node-v0.10.31-linux-x64 /usr/share/node From cb739ec16c9f4bfcf3e4dede0c653ff52a2db00e Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Tue, 16 Jun 2015 12:09:48 -0700 Subject: [PATCH 2/6] Run devtools for ubuntu 12 --- ubuntu12.4/Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu12.4/Vagrantfile b/ubuntu12.4/Vagrantfile index 82002b6..37763bb 100644 --- a/ubuntu12.4/Vagrantfile +++ b/ubuntu12.4/Vagrantfile @@ -26,7 +26,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :u1201 do |u1201| # uncomment the line below to set up the ambari dev environment - #u1201.vm.provision :shell, :path => "dev-bootstrap.sh" + u1201.vm.provision :shell, :path => "dev-bootstrap.sh" u1201.vm.hostname = "u1201.ambari.apache.org" u1201.vm.network :private_network, ip: "192.168.12.101" end @@ -110,7 +110,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the host to the actual folder. The second argument is # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. - # config.vm.synced_folder "../data", "/vagrant_data" + config.vm.synced_folder "/Users/jonathan/dev/ambari", "/ambari" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. From 15765e54614f70f05df8d131e3e5232e738f430f Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Tue, 16 Jun 2015 12:10:29 -0700 Subject: [PATCH 3/6] For ubuntu 14: * run devtools * sync maven and local/ambari folders * use proper trusty box * install jdk 7 --- ubuntu14.4/Vagrantfile | 21 +++++++++++++-------- ubuntu14.4/dev-bootstrap.sh | 26 +++++--------------------- ubuntu14.4/up.sh | 0 3 files changed, 18 insertions(+), 29 deletions(-) mode change 100644 => 100755 ubuntu14.4/up.sh diff --git a/ubuntu14.4/Vagrantfile b/ubuntu14.4/Vagrantfile index 37bfdf0..3f3d004 100644 --- a/ubuntu14.4/Vagrantfile +++ b/ubuntu14.4/Vagrantfile @@ -7,13 +7,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # All Vagrant configuration is done here. The most common configuration # Every Vagrant virtual environment requires a box to build off of. - config.vm.box = "ubuntu14.4" - - # The url from where the 'config.vm.box' box will be fetched if it - # doesn't already exist on the user's system. - - # Ubuntu 14.04 x64 VM with VirtualBox 4.3.10 Guest Additions - config.vm.box_url = "https://github.com/hnakamur/packer-templates/releases/download/v1.0.2/ubuntu-14-04-x64-virtualbox.box" + config.vm.box = "ubuntu/trusty64" config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--memory", 2048] # RAM allocated to each VM @@ -23,9 +17,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.define :u1401 do |u1401| # uncomment the line below to set up the ambari dev environment - # u1401.vm.provision :shell, :path => "dev-bootstrap.sh" + u1401.vm.provision :shell, :path => "dev-bootstrap.sh" u1401.vm.hostname = "u1401.ambari.apache.org" u1401.vm.network :private_network, ip: "192.168.76.101" + + # Share package folders + u1401.vm.synced_folder "~/.m2/repository", "/home/vagrant/.m2/repository" + u1401.vm.synced_folder "~/.npm", "/home/vagrant/.npm" + + # Share source folder + u1401.vm.synced_folder "../../", "/ambari" + + # Forward ports for remote debugging/REPL + u1401.vm.network :forwarded_port, host: 6000, guest: 6000 + u1401.vm.network :forwarded_port, host: 6001, guest: 6001 end config.vm.define :u1402 do |u1402| diff --git a/ubuntu14.4/dev-bootstrap.sh b/ubuntu14.4/dev-bootstrap.sh index eb13406..c4a6644 100644 --- a/ubuntu14.4/dev-bootstrap.sh +++ b/ubuntu14.4/dev-bootstrap.sh @@ -11,24 +11,8 @@ apt-get install make -y apt-get install g++ -y apt-get install git -y apt-get install python-dev -wget http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz -tar zxvf node-v0.10.31-linux-x64.tar.gz -mv node-v0.10.31-linux-x64 /usr/share/node -/usr/share/node/bin/npm install -g brunch -#wget --no-check-certificate http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg -#sh setuptools-0.6c11-py2.6.egg -wget http://psg.mtu.edu/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz -tar zxvf apache-maven-3.0.5-bin.tar.gz -mv apache-maven-3.0.5 /usr/share/maven -apt-get install openjdk-6-jdk -y - -# make maven and node available in PATH -echo 'PATH=$PATH:/usr/share/node/bin' > /etc/profile.d/node.sh -chmod +x /etc/profile.d/node.sh -echo 'PATH=$PATH:/usr/share/maven/bin' > /etc/profile.d/maven.sh -chmod +x /etc/profile.d/maven.sh - -# check out Ambari source - -echo 'Ambari Development VM has been set up! Enjoy!' -echo 'You can check out Ambari source by running: git clone https://git-wip-us.apache.org/repos/asf/ambari.git' +apt-get install openjdk-7-jdk -y +apt-get install maven -y +apt-get install nodejs-legacy -y +apt-get install npm -y +/usr/bin/npm install -g brunch diff --git a/ubuntu14.4/up.sh b/ubuntu14.4/up.sh old mode 100644 new mode 100755 From 7e03ce42d904f0d16cc58af1a2e52cd144268d3e Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Thu, 18 Jun 2015 12:54:38 -0700 Subject: [PATCH 4/6] Dev setup for centos 6.4 --- centos6.4/Vagrantfile | 8 +++++++- centos6.4/dev-bootstrap.sh | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/centos6.4/Vagrantfile b/centos6.4/Vagrantfile index e354df5..9395228 100644 --- a/centos6.4/Vagrantfile +++ b/centos6.4/Vagrantfile @@ -27,8 +27,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision :shell, :path => "bootstrap.sh" config.vm.define :c6401 do |c6401| + c6401.vm.synced_folder "~/.m2/repository", "/home/vagrant/.m2/repository" + c6401.vm.synced_folder "~/.npm", "/home/vagrant/.npm" + + # Share source folder + c6401.vm.synced_folder "../../", "/ambari" + # uncomment the line below to set up the ambari dev environment - # c6401.vm.provision :shell, :path => "dev-bootstrap.sh" + c6401.vm.provision :shell, :path => "dev-bootstrap.sh" c6401.vm.hostname = "c6401.ambari.apache.org" c6401.vm.network :private_network, ip: "192.168.64.101" end diff --git a/centos6.4/dev-bootstrap.sh b/centos6.4/dev-bootstrap.sh index b585b78..ac5ec90 100644 --- a/centos6.4/dev-bootstrap.sh +++ b/centos6.4/dev-bootstrap.sh @@ -9,6 +9,7 @@ service ntpd start yum install git -y yum install rpm-build -y yum install gcc-c++ -y +yum install python-devel -y wget http://nodejs.org/dist/v0.10.31/node-v0.10.31-linux-x64.tar.gz tar zxvf node-v0.10.31-linux-x64.tar.gz mv node-v0.10.31-linux-x64 /usr/share/node From 8d06cb869f6b8f0219cfc46fa42fd514048b8112 Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Tue, 23 Jun 2015 14:40:34 -0700 Subject: [PATCH 5/6] Increase resources, use nfs shares --- ubuntu14.4/Vagrantfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ubuntu14.4/Vagrantfile b/ubuntu14.4/Vagrantfile index 3f3d004..050d7e7 100644 --- a/ubuntu14.4/Vagrantfile +++ b/ubuntu14.4/Vagrantfile @@ -10,7 +10,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" config.vm.provider :virtualbox do |vb| - vb.customize ["modifyvm", :id, "--memory", 2048] # RAM allocated to each VM + vb.memory = 3048 + vb.cpus = 3 end config.vm.provision :shell, :path => "bootstrap.sh" @@ -22,11 +23,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| u1401.vm.network :private_network, ip: "192.168.76.101" # Share package folders - u1401.vm.synced_folder "~/.m2/repository", "/home/vagrant/.m2/repository" - u1401.vm.synced_folder "~/.npm", "/home/vagrant/.npm" + u1401.vm.synced_folder "~/.m2/repository", "/home/vagrant/.m2/repository", type: "nfs" + u1401.vm.synced_folder "~/.npm", "/home/vagrant/.npm", type: "nfs" # Share source folder - u1401.vm.synced_folder "../../", "/ambari" + u1401.vm.synced_folder "../../", "/ambari", type: "nfs" # Forward ports for remote debugging/REPL u1401.vm.network :forwarded_port, host: 6000, guest: 6000 From 56e6f5860e2f931d0e8f526343b10b971fbfa603 Mon Sep 17 00:00:00 2001 From: Jonathan Halterman Date: Tue, 23 Jun 2015 15:15:59 -0700 Subject: [PATCH 6/6] Added python-setuptools to dev build --- ubuntu14.4/dev-bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ubuntu14.4/dev-bootstrap.sh b/ubuntu14.4/dev-bootstrap.sh index c4a6644..46eef8d 100644 --- a/ubuntu14.4/dev-bootstrap.sh +++ b/ubuntu14.4/dev-bootstrap.sh @@ -10,7 +10,8 @@ service ntp start apt-get install make -y apt-get install g++ -y apt-get install git -y -apt-get install python-dev +apt-get install python-dev -y +apt-get install python-setuptools -y apt-get install openjdk-7-jdk -y apt-get install maven -y apt-get install nodejs-legacy -y