Created
March 9, 2013 01:06
-
-
Save armon/5121899 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$setup = <<SCRIPT | |
# Update apt | |
apt-get update | |
# Install the things we need to build | |
apt-get install -y autoconf | |
apt-get install -y automake | |
apt-get install -y build-essential | |
apt-get install -y git-core | |
apt-get install -y libtool | |
apt-get install -y telnet | |
# Compile Erlang from source | |
if [ ! -f /usr/local/bin/erl ]; then | |
pushd /tmp | |
# Download Erlang | |
wget --progress=dot -e dotbytes=1M http://www.erlang.org/download/otp_src_R15B03-1.tar.gz | |
# Untar it | |
tar xvzf otp_src_R15B03-1.tar.gz | |
# Compile it | |
pushd otp_src_R15B03 | |
./configure | |
make | |
make install | |
popd | |
popd | |
fi | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.provision :shell, :inline => $setup | |
config.vm.network :forwarded_port, | |
guest: 22, | |
host: 2456, | |
id: "ssh" | |
config.vm.provider :vmware_fusion do |p| | |
p.vmx["numvcpus"] = "2" | |
p.vmx["coresPerSocket"] = "2" | |
p.vmx["memsize"] = "1024" | |
end | |
config.vm.define :n1 do |x| | |
config.vm.network :private_network, ip: "33.33.36.10" | |
end | |
config.vm.define :n2 do |x| | |
config.vm.network :private_network, ip: "33.33.36.11" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment