Skip to content

Instantly share code, notes, and snippets.

@armon
Created March 9, 2013 01:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armon/5121899 to your computer and use it in GitHub Desktop.
Save armon/5121899 to your computer and use it in GitHub Desktop.
# -*- 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