Commit 590a5be6 by Ned Batchelder

Make the fullstack Vagrantfiles like the devstack

parent 1f4c8404
......@@ -5,6 +5,18 @@ VAGRANTFILE_API_VERSION = "2"
MEMORY = 4096
CPU_COUNT = 2
# These are versioning variables in the roles. Each can be overridden, first
# with OPENEDX_RELEASE, and then with a specific environment variable of the
# same name but upper-cased.
VERSION_VARS = [
'edx_platform_version',
'configuration_version',
'certs_version',
'forum_version',
'xqueue_version',
'demo_version',
]
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
......@@ -31,17 +43,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# point Vagrant at the location of your playbook you want to run
ansible.playbook = "../../../playbooks/vagrant-fullstack.yml"
ansible.verbose = "vvv"
# set extra-vars here instead of in the vagrant play so that
# Set extra-vars here instead of in the vagrant play so that
# they are written out to /edx/etc/server-vars.yml which can
# be used later when running ansible locally
if ENV['OPENEDX_RELEASE']
ansible.extra_vars = {
edx_platform_version: ENV['OPENEDX_RELEASE'],
certs_version: ENV['OPENEDX_RELEASE'],
forum_version: ENV['OPENEDX_RELEASE'],
xqueue_version: ENV['OPENEDX_RELEASE'],
demo_version: ENV['OPENEDX_RELEASE'],
}
# be used later when running ansible locally.
ansible.extra_vars = {}
VERSION_VARS.each do |var|
if ENV['OPENEDX_RELEASE']
ansible.extra_vars[var] = ENV['OPENEDX_RELEASE']
end
env_var = var.upcase
if ENV[env_var]
ansible.extra_vars[var] = ENV[env_var]
end
end
end
end
......@@ -40,14 +40,14 @@ openedx_releases = {
}
openedx_releases.default = "eucalyptus-fullstack-2016-09-01"
rel = ENV['OPENEDX_RELEASE']
openedx_release = ENV['OPENEDX_RELEASE']
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
reldata = openedx_releases[rel]
reldata = openedx_releases[openedx_release]
if Hash == reldata.class
boxname = openedx_releases[rel][:name]
boxfile = openedx_releases[rel].fetch(:file, "#{boxname}.box")
boxname = openedx_releases[openedx_release][:name]
boxfile = openedx_releases[openedx_release].fetch(:file, "#{boxname}.box")
else
boxname = reldata
boxfile = "#{boxname}.box"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment