forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
60 lines (49 loc) · 2.16 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This file was downloaded from https://raw.githubusercontent.com/edx/configuration/master/vagrant/release/fullstack/Vagrantfile
# This includes a full image of edx. The servers and user logins are here:
# https://github.com/edx/configuration/wiki/edx-Full-stack--installation-using-Vagrant-Virtualbox
# Note: this does not use the code from the Cyanna repo.
Vagrant.require_version ">= 1.5.3"
VAGRANTFILE_API_VERSION = "2"
MEMORY = 4096
CPU_COUNT = 2
# map the name of the git branch that we use for a release
# to a name and a file path, which are used for retrieving
# a Vagrant box from the internet.
openedx_releases = {
"named-release/dogwood.rc" => {
:name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
},
"named-release/dogwood.rc2" => {
:name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
},
"named-release/cypress" => {
:name => "cypress-fullstack", :file => "cypress-fullstack.box",
},
# Birch is deprecated and unsupported
"named-release/birch.2" => {
:name => "birch-fullstack-2", :file => "birch-2-fullstack.box",
},
}
openedx_releases.default = {
# changing default to what I can guess is the closest to what we have
:name => "birch-fullstack-2", :file => "birch-2-fullstack.box",
}
rel = ENV['OPENEDX_RELEASE']
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Creates an edX fullstack VM from an official release
config.vm.box = openedx_releases[rel][:name]
config.vm.box_url = "http://files.edx.org/vagrant-images/#{openedx_releases[rel][:file]}"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.ssh.insert_key = true
config.vm.network :private_network, ip: "192.168.33.10"
config.hostsupdater.aliases = ["preview.localhost"]
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end