hyphyphyph / vagrantfiles

Basic Vagrantfiles. Nothing fancy.

Home Page:vagrantup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vagrantfiles

Just a cheeky repository with some base Vagrantfiles I use in a number of projects. Each setup is based on a vanilla installation of Ubuntu 14.04 LTS (Trusty Tahr) from Vagrant Cloud.

How do I use it?

To download a vagrant box for your project, just run the following. Remember to replace $LANG with an available language from the list below.

curl -O https://raw.githubusercontent.com/adlawson/vagrantfiles/master/$LANG/Vagrantfile
vagrant up
vagrant ssh
cd /srv

Available languages

Language Tooling Version Extras
clojure Leiningen stable Java 8
elixir Mix latest from erlang-solutions.com
erlang Rebar latest from erlang-solutions.com
golang Godep 1.4.2 from golang.org
haskell 2010
hhvm Composer latest from ppa:mapnik/boost
iojs NPM 1.2.0 from iojs.org
julia latest from ppa:staticfloat/juliareleases
lua 5.2.*
nodejs NPM latest from ppa:chris-lea/node.js
perl 5.*
php Composer 5.6.* from ppa:ondrej/php5-5.6
python Pip 3.4.* and 2.7.* (python3 and python)
racket 5.93
ruby Gem 2.2.0 RVM
rust Cargo stable
scala SBT 2.11.5 Java 8
scheme latest mit-scheme

Configuration

Static IP

To add support for a static IP address to your box, add the following to the Vagrantfile after download:

# Network
config.vm.network :private_network, ip: "10.10.10.100"

NFS

If you prefer NFS to the default network filesystem provided by your VM, replace the # Shared folders lines in the Vagrantfile with the following. You will need a Static IP for this to work correctly.

# Shared folders
config.vm.synced_folder ".", "/srv", :nfs => true

Performance

It may be important to you to limit the performance hit to your local machine, or ensure enough memory is available to your provider. For example, the configuration below will limit the VM to using no more than 50% of your CPU and allocate up to 2GB of memory. Note: This example uses VirtualBox, but if you use a different provider such as VMWare, then this will be ignored safely.

  config.vm.provider :virtualbox do |v|
    v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
    v.customize ["modifyvm", :id, "--memory", 2048]
  end

License

The content of this library is released under the MIT License by Andrew Lawson.
You can find a copy of this license in LICENSE or at http://opensource.org/licenses/mit.

About

Basic Vagrantfiles. Nothing fancy.

vagrantup.com

License:MIT License


Languages

Language:Ruby 100.0%