Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 1 | # -*- mode: ruby -*- |
| 2 | # vi: set ft=ruby : |
| 3 | |
| 4 | Vagrant.configure(2) do |config| |
| 5 | |
| 6 | if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil |
Rouzbahan Rashidi-Tabrizi | 4b9fdf4 | 2017-02-17 13:39:42 -0500 | [diff] [blame^] | 7 | config.vm.synced_folder "../../..", "/cord", mount_options: ["dmode=700,fmode=600"] |
Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 8 | else |
Rouzbahan Rashidi-Tabrizi | 4b9fdf4 | 2017-02-17 13:39:42 -0500 | [diff] [blame^] | 9 | config.vm.synced_folder "../../..", "/cord" |
Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 10 | end |
| 11 | |
Rouzbahan Rashidi-Tabrizi | 54e3e29 | 2016-11-29 14:32:50 -0500 | [diff] [blame] | 12 | config.vm.define "voltha-base" do |d| |
Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 13 | d.ssh.forward_agent = true |
Rouzbahan Rashidi-Tabrizi | f11d1ed | 2017-01-27 11:58:57 -0500 | [diff] [blame] | 14 | d.vm.box = "v0rtex/xenial64" |
Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 15 | d.vm.hostname = "voltha" |
| 16 | d.vm.network "private_network", ip: "10.100.198.220" |
| 17 | #d.vm.network "public_network" |
| 18 | d.vm.provision :shell, path: "../ansible/scripts/bootstrap_ansible.sh" |
Rouzbahan Rashidi-Tabrizi | 4b9fdf4 | 2017-02-17 13:39:42 -0500 | [diff] [blame^] | 19 | d.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/incubator/voltha/ansible/voltha.yml -c local" |
| 20 | d.vm.provision :shell, inline: "cd /cord/incubator/voltha/vagrant-base && make install-protoc" |
Rouzbahan Rashidi-Tabrizi | 663f01a | 2016-11-17 11:39:02 -0500 | [diff] [blame] | 21 | #d.vm.provision :shell, path: "./test_script.sh" |
| 22 | d.vm.provider "virtualbox" do |v| |
| 23 | v.name = "voltha-base" |
| 24 | v.memory = 4096 |
| 25 | end |
| 26 | end |
| 27 | |
| 28 | config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" |
| 29 | |
| 30 | if Vagrant.has_plugin?("vagrant-cachier") |
| 31 | config.cache.scope = :box |
| 32 | end |
| 33 | |
| 34 | end |