Matteo Scandolo | bf5b6a1 | 2017-02-13 11:25:07 -0800 | [diff] [blame] | 1 | Vagrant.configure("2") do |config| |
| 2 | # base image |
| 3 | config.vm.box = "ubuntu/trusty64" |
| 4 | |
| 5 | # share the folder |
| 6 | config.vm.synced_folder "../../", "/home/vagrant/cord/", create: true |
| 7 | config.vm.synced_folder ".", "/vagrant", disabled: true |
| 8 | |
| 9 | # set the frontend vm |
| 10 | config.vm.define "head-node" do |d| |
| 11 | d.vm.network "forwarded_port", guest: 9999, host: 9999 |
| 12 | d.vm.network "forwarded_port", guest: 6379, host: 6379 |
| 13 | d.vm.network "private_network", ip: "192.168.46.100" |
| 14 | d.vm.provider "virtualbox" do |vb| |
| 15 | vb.memory = "2048" |
| 16 | vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |
| 17 | vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] |
| 18 | end |
| 19 | end |
| 20 | |
| 21 | config.vm.provision "shell", privileged: false, inline: <<-SHELL |
| 22 | curl -o ~/cord-bootstrap.sh https://raw.githubusercontent.com/opencord/platform-install/master/scripts/cord-bootstrap.sh |
| 23 | bash cord-bootstrap.sh |
| 24 | ssh-keygen -t rsa -N "" -f .ssh/id_rsa |
| 25 | cp ~/.ssh/id_rsa node_key |
| 26 | SHELL |
| 27 | |
| 28 | end |