From 6edbcf2224abc56f0123816b69147c9f98e65031 Mon Sep 17 00:00:00 2001 From: "Sean P. Kane" Date: Fri, 24 Jul 2015 08:48:34 -0700 Subject: [PATCH] Add VMware support and fix ulimits --- Vagrantfile | 12 ++++++++++-- scripts/vagrant/provision.sh | 12 +++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index e76694005..6c338e4b8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,16 +6,24 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - + + # A VMware compatible box is avaliable from: + # https://github.com/spkane/vagrant-boxes/releases/download/v1.0.0/trusty64_vmware.box config.vm.box = "ubuntu/trusty64" - + config.vm.network "forwarded_port", guest: 3000, host: 3000 config.vm.network "forwarded_port", guest: 9485, host: 9485 config.vm.provision "shell", path: "scripts/vagrant/provision.sh" + config.vm.provider "virtualbox" do |v| v.memory = 2048 v.cpus = 2 end + config.vm.provider "vmware_fusion" do |v| + v.memory = 2048 + v.cpus = 2 + end + end diff --git a/scripts/vagrant/provision.sh b/scripts/vagrant/provision.sh index 207df8b36..a97ed945a 100644 --- a/scripts/vagrant/provision.sh +++ b/scripts/vagrant/provision.sh @@ -1,11 +1,21 @@ #!/bin/bash # Original content copyright (c) 2014 dpen2000 licensed under the MIT license + +# Set default ulimits +cat <<- EOF > /tmp/limits.conf +* soft nofile 10000 +* hard nofile 10000 +EOF +sudo mv /tmp/limits.conf /etc/security/limits.conf +sudo chown root:root /etc/security/limits.conf + +#Install required software sudo apt-get -y update sudo apt-get -y install python-software-properties git sudo add-apt-repository -y ppa:chris-lea/node.js sudo apt-get -y update sudo apt-get -y install nodejs -sudo apt-get -y install g++ make +sudo apt-get -y install g++ make mkdir /vagrant/node_modules sudo mkdir /node_modules sudo chown vagrant:vagrant /node_modules