diff options
Diffstat (limited to 'vagrant/Vagrantfile')
-rw-r--r-- | vagrant/Vagrantfile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 84836d05e72..c0e569c8cb2 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -1,6 +1,7 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +disable_gui = ENV['VESPA_DISABLE_VAGRANT_GUI'] def validate_vm_env_option(name) opt = ENV[name] @@ -10,16 +11,18 @@ def validate_vm_env_option(name) end validate_vm_env_option('VESPA_VAGRANT_VM_BOX') -validate_vm_env_option('VESPA_VAGRANT_VM_BOX_URL') - vm_box = ENV['VESPA_VAGRANT_VM_BOX'] -vm_box_url = ENV['VESPA_VAGRANT_VM_BOX_URL'] + +unless disable_gui + validate_vm_env_option('VESPA_VAGRANT_VM_BOX_URL') + vm_box_url = ENV['VESPA_VAGRANT_VM_BOX_URL'] +end # For a complete reference, please see the online documentation at https://docs.vagrantup.com. Vagrant.configure("2") do |config| config.vm.box = vm_box - config.vm.box_url = vm_box_url + config.vm.box_url = vm_box_url unless disable_gui config.ssh.forward_agent = true @@ -27,7 +30,7 @@ Vagrant.configure("2") do |config| config.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machine - vb.gui = true + vb.gui = true unless disable_gui vb.name = "vespa-dev" vb.memory = "8192" @@ -52,9 +55,13 @@ Vagrant.configure("2") do |config| yum-builddep -y /vagrant/dist/vespa.spec echo -e "* soft nproc 409600\n* hard nproc 409600" > /etc/security/limits.d/99-nproc.conf echo -e "* soft nofile 262144\n* hard nofile 262144" > /etc/security/limits.d/99-nofile.conf - echo -e "fs.inotify.max_user_watches = 524288" > /etc/sysctl.d/clion.conf - wget -q -O - https://download.jetbrains.com/cpp/CLion-2017.3.3.tar.gz | tar -C /opt -zx - ln -sf /opt/clion-2017.3.3/bin/clion.sh /usr/bin/clion + + unless disable_gui + echo -e "fs.inotify.max_user_watches = 524288" > /etc/sysctl.d/clion.conf + wget -q -O - https://download.jetbrains.com/cpp/CLion-2017.3.3.tar.gz | tar -C /opt -zx + ln -sf /opt/clion-2017.3.3/bin/clion.sh /usr/bin/clion + end + yum update -y hostname localhost SHELL |