Just a cheeky repository with some base Vagrantfiles
I use in a number of projects.
Each setup is based on an almost vanilla install of Ubuntu 12.04 LTS x64 (Precise Pagolin)
from Vagrantbox.es.
- Clojure (Latest stable Leiningen with OpenJDK 7)
- Elixir (Version 0.12.5 from github with Rebar)
- Erlang (Latest stable from
erlang-solutions.com
with Rebar) - Go (Version 1.2 via Google Code)
- Haskell (Haskell 2010 with latest stable GHC)
- HHVM (Latest stable from
ppa:mapnik/boost
with Composer) - Julia (Latest stable from
ppa:staticfloat/juliareleases
) - Lua (Latest stable 5.2.x from Ubuntu repositories)
- Node.js (Latest stable from
ppa:chris-lea/node.js
) - Perl (Latest stable Perl 5 from Ubuntu repositories)
- PHP (Latest stable from
ppa:ondrej/php5
with Composer) - Python (Latest stable from apt repository)
- Racket (Version 5.93)
- Ruby (Version 2.0.0 via
RVM
) - Scheme (Latest stable mit-scheme from Ubuntu repositories)
Vagrant will mount your directory to /srv
via your provider's shared folder feature.
Alternatively, you can use NFS by replacing the synced_folder
line with this:
# Shared folders
config.vm.synced_folder ".", "/srv", :nfs => true
# Network
config.vm.network :private_network, ip: "33.33.33.101"
Other dependencies installed by default on every instance are:
- cURL
- Python Software Properties
- Make
- G++
- Git
- Cowsay (important)
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
Typically you won't want to download all configuration files, so rather than cloning this project with git, a simple cURL download will do.
$ # Download the file for the language you want to use (nodejs in this example)
$ curl -O https://raw.github.com/adlawson/vagrantfiles/master/nodejs/Vagrantfile
$ # Create and SSH into the VM
$ vagrant up
$ vagrant ssh
...
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
$ # Move into the mounted project directory
$ cd /srv
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://www.opensource.org/licenses/mit.