Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ubuntu 20.04 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions snapshot_tool/snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ set_vm_prefix(){
ubuntu16.4)
vm_prefix=u16
;;
ubuntu20.4)
vm_prefix=u20
;;
debian7.6)
vm_prefix=d76
;;
Expand Down
73 changes: 73 additions & 0 deletions ubuntu20.4/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
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 = "bento/ubuntu-20.04"

# Fixes changes from https://github.com/mitchellh/vagrant/pull/4707
config.ssh.insert_key = false

config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", 2048] # RAM allocated to each VM
end

config.vm.provision :shell, :path => "bootstrap.sh"

config.vm.define :u2001 do |u2001|
# uncomment the line below to set up the ambari dev environment
# u2001.vm.provision :shell, :path => "dev-bootstrap.sh"
u2001.vm.hostname = "u2001.ambari.apache.org"
u2001.vm.network :private_network, ip: "192.168.20.101"
end

config.vm.define :u2002 do |u2002|
u2002.vm.hostname = "u2002.ambari.apache.org"
u2002.vm.network :private_network, ip: "192.168.20.102"
end

config.vm.define :u2003 do |u2003|
u2003.vm.hostname = "u2003.ambari.apache.org"
u2003.vm.network :private_network, ip: "192.168.20.103"
end

config.vm.define :u2004 do |u2004|
u2004.vm.hostname = "u2004.ambari.apache.org"
u2004.vm.network :private_network, ip: "192.168.20.104"
end

config.vm.define :u2005 do |u2005|
u2005.vm.hostname = "u2005.ambari.apache.org"
u2005.vm.network :private_network, ip: "192.168.20.105"
end

config.vm.define :u2006 do |u2006|
u2006.vm.hostname = "u2006.ambari.apache.org"
u2006.vm.network :private_network, ip: "192.168.20.106"
end

config.vm.define :u2007 do |u2007|
u2007.vm.hostname = "u2007.ambari.apache.org"
u2007.vm.network :private_network, ip: "192.168.20.107"
end

config.vm.define :u2008 do |u2008|
u2008.vm.hostname = "u2008.ambari.apache.org"
u2008.vm.network :private_network, ip: "192.168.20.108"
end

config.vm.define :u2009 do |u2009|
u2009.vm.hostname = "u2009.ambari.apache.org"
u2009.vm.network :private_network, ip: "192.168.20.109"
end

config.vm.define :u2010 do |u2010|
u2010.vm.hostname = "u2010.ambari.apache.org"
u2010.vm.network :private_network, ip: "192.168.20.110"
end

end
17 changes: 17 additions & 0 deletions ubuntu20.4/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
cp /vagrant/hosts /etc/hosts
cp /vagrant/resolv.conf /etc/resolv.conf

mkdir -p /root/.ssh
chmod 700 /root/.ssh
cp /home/vagrant/.ssh/authorized_keys /root/.ssh/

# Increasing swap space
dd if=/dev/zero of=/swapfile bs=1024 count=3072k
mkswap /swapfile
chmod 600 /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab

cp /vagrant/insecure_private_key /root/insecure_private_key
chmod 600 /root/insecure_private_key
33 changes: 33 additions & 0 deletions ubuntu20.4/dev-bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

cp /vagrant/hosts /etc/hosts
cp /vagrant/resolv.conf /etc/resolv.conf
apt-get update
apt-get install ntp -y
service ntp start

# install tools necessary to build Ambari
apt-get install make -y
apt-get install g++ -y
apt-get install git -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
/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'
12 changes: 12 additions & 0 deletions ubuntu20.4/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.20.101 u2001.ambari.apache.org u2001
192.168.20.102 u2002.ambari.apache.org u2002
192.168.20.103 u2003.ambari.apache.org u2003
192.168.20.104 u2004.ambari.apache.org u2004
192.168.20.105 u2005.ambari.apache.org u2005
192.168.20.106 u2006.ambari.apache.org u2006
192.168.20.107 u2007.ambari.apache.org u2007
192.168.20.108 u2008.ambari.apache.org u2008
192.168.20.109 u2009.ambari.apache.org u2009
192.168.20.110 u2010.ambari.apache.org u2010
27 changes: 27 additions & 0 deletions ubuntu20.4/insecure_private_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEA6NF8iallvQVp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XAcj
3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
-----END RSA PRIVATE KEY-----
4 changes: 4 additions & 0 deletions ubuntu20.4/resolv.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
; generated by /sbin/dhclient-script
search ambari.apache.org
nameserver 8.8.8.8

1 change: 1 addition & 0 deletions ubuntu20.4/snapshot.sh
6 changes: 6 additions & 0 deletions ubuntu20.4/up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

for i in `seq -f '%02g' 1 $1`;
do
vagrant up u20$i
done