Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 = {
- "open-release/eucalyptus.master" => {
- :name => "eucalyptus-fullstack-2017-01-10", :file => "eucalyptus-fullstack-2017-01-10.box",
- },
- "open-release/eucalyptus/1rc1" => {
- :name => "eucalyptus-fullstack-1rc1", :file => "eucalyptus-fullstack-2016-08-19.box",
- },
- "open-release/eucalyptus.1rc2" => {
- :name => "eucalyptus-fullstack-2016-08-19", :file => "eucalyptus-fullstack-2016-08-19.box",
- },
- "open-release/eucalyptus.1" => {
- :name => "eucalyptus-fullstack-2016-08-25", :file => "eucalyptus-fullstack-2016-08-25.box",
- },
- "open-release/eucalyptus.2" => {
- :name => "eucalyptus-fullstack-2016-09-01", :file => "eucalyptus-fullstack-2016-09-01.box",
- },
- "open-release/eucalyptus.3" => {
- :name => "eucalyptus-fullstack-2017-01-10", :file => "eucalyptus-fullstack-2017-01-10.box",
- },
- # Note: the devstack and fullstack boxes differ, because devstack had an issue
- # that needed fixing, but it didn't affect fullstack.
- "named-release/dogwood" => {
- :name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
- },
- "named-release/dogwood.1" => {
- :name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
- },
- "named-release/dogwood.2" => {
- :name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
- },
- "named-release/dogwood.3" => {
- :name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
- },
- "named-release/dogwood.rc" => {
- :name => "dogwood-fullstack-rc2", :file => "20151221-dogwood-fullstack-rc2.box",
- },
- # Cypress is deprecated and unsupported
- # "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 = {
- :name => "eucalyptus-fullstack-2017-01-10", :file => "eucalyptus-fullstack-2017-01-10.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.ssh.forward_agent = true
- config.vm.network :public_network, ip: "10.0.2.109"
- 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
- config.ssh.username = "vagrant"
- config.ssh.password = "P7xorj$447"
- config.ssh.insert_key = false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement