Commit 590a5be6 by Ned Batchelder

Make the fullstack Vagrantfiles like the devstack

parent 1f4c8404
...@@ -5,6 +5,18 @@ VAGRANTFILE_API_VERSION = "2" ...@@ -5,6 +5,18 @@ VAGRANTFILE_API_VERSION = "2"
MEMORY = 4096 MEMORY = 4096
CPU_COUNT = 2 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| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64" config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.vm.box_url = "http://files.vagrantup.com/precise64.box"
...@@ -31,17 +43,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ...@@ -31,17 +43,20 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# point Vagrant at the location of your playbook you want to run # point Vagrant at the location of your playbook you want to run
ansible.playbook = "../../../playbooks/vagrant-fullstack.yml" ansible.playbook = "../../../playbooks/vagrant-fullstack.yml"
ansible.verbose = "vvv" 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 # they are written out to /edx/etc/server-vars.yml which can
# be used later when running ansible locally # be used later when running ansible locally.
if ENV['OPENEDX_RELEASE'] ansible.extra_vars = {}
ansible.extra_vars = { VERSION_VARS.each do |var|
edx_platform_version: ENV['OPENEDX_RELEASE'], if ENV['OPENEDX_RELEASE']
certs_version: ENV['OPENEDX_RELEASE'], ansible.extra_vars[var] = ENV['OPENEDX_RELEASE']
forum_version: ENV['OPENEDX_RELEASE'], end
xqueue_version: ENV['OPENEDX_RELEASE'], env_var = var.upcase
demo_version: ENV['OPENEDX_RELEASE'], if ENV[env_var]
} ansible.extra_vars[var] = ENV[env_var]
end
end end
end end
end end
...@@ -40,14 +40,14 @@ openedx_releases = { ...@@ -40,14 +40,14 @@ openedx_releases = {
} }
openedx_releases.default = "eucalyptus-fullstack-2016-09-01" openedx_releases.default = "eucalyptus-fullstack-2016-09-01"
rel = ENV['OPENEDX_RELEASE'] openedx_release = ENV['OPENEDX_RELEASE']
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
reldata = openedx_releases[rel] reldata = openedx_releases[openedx_release]
if Hash == reldata.class if Hash == reldata.class
boxname = openedx_releases[rel][:name] boxname = openedx_releases[openedx_release][:name]
boxfile = openedx_releases[rel].fetch(:file, "#{boxname}.box") boxfile = openedx_releases[openedx_release].fetch(:file, "#{boxname}.box")
else else
boxname = reldata boxname = reldata
boxfile = "#{boxname}.box" 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