Created
May 4, 2014 19:15
-
-
Save diraulo/487c48b4bf74beb9dbcc to your computer and use it in GitHub Desktop.
Vagrantfile for EdX Saas class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Server Configuration | |
# Set a local private network IP address. | |
# See http://en.wikipedia.org/wiki/Private_network for explanation | |
# You can use the following IP ranges: | |
# 10.0.0.1 - 10.255.255.254 | |
# 172.16.0.1 - 172.31.255.254 | |
# 192.168.0.1 - 192.168.255.254 | |
server_ip = "192.168.22.10" | |
server_memory = "512" # MB | |
server_timezone = "UTC" | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
# Create a hostname, don't forget to put it to the `hosts` file | |
# This will point to the server's default virtual host | |
# TO DO: Make this work with virtualhost along-side xip.io URL | |
config.vm.hostname = "cs169-1x.dev" | |
# Create a static IP | |
config.vm.network :private_network, ip: server_ip | |
# Use NFS for the shared folder | |
config.vm.synced_folder ".", "/vagrant", | |
id: "core", | |
:nfs => true, | |
:mount_options => ['nolock,vers=3,udp,noatime'] | |
# If using VirtualBox | |
config.vm.provider :virtualbox do |vb| | |
# Set server memory | |
vb.customize ["modifyvm", :id, "--memory", server_memory] | |
# Set the timesync threshold to 10 seconds, instead of the default 20 minutes. | |
# If the clock gets more than 15 minutes out of sync (due to your laptop going | |
# to sleep for instance, then some 3rd party services will reject requests. | |
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000] | |
# Prevent VMs running on Ubuntu to lose internet connection | |
# vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
# vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment