e82baba8d0
Add a Vagrant configuration for Astara. This makes it easy for someone to pull the openstack/astara repository and get up and running with an Astara setup quickly. Change-Id: I600328c2a53a8d4aff5bf39a96aaa5b79ef99464 Signed-off-by: Kyle Mestery <mestery@mestery.com>
48 lines
1.4 KiB
Ruby
48 lines
1.4 KiB
Ruby
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
VM_MEMORY = ENV.fetch('VAGRANT_ASTARA_VM_MEMORY', 6144)
|
|
VM_CPUS = ENV.fetch('VAGRANT_ASTARA_VM_CPUS', 2)
|
|
RUN_DEVSTACK = ENV.fetch('VAGRANT_ASTARA_RUN_DEVSTACK', 'true')
|
|
|
|
config.vm.hostname = 'devstack'
|
|
|
|
config.vm.provider 'virtualbox' do |v, override|
|
|
override.vm.box = ENV.fetch('VAGRANT_ASTARA_VM_BOX', 'ubuntu/trusty64')
|
|
v.memory = VM_MEMORY
|
|
v.cpus = VM_CPUS
|
|
end
|
|
|
|
config.vm.provider 'parallels' do |v, override|
|
|
override.vm.box = ENV.fetch('VAGRANT_ASTARA_VM_BOX', 'boxcutter/ubuntu1404')
|
|
v.memory = VM_MEMORY
|
|
v.cpus = VM_CPUS
|
|
v.customize ['set', :id, '--nested-virt', 'on']
|
|
end
|
|
|
|
config.vm.provider 'libvirt' do |v, override|
|
|
override.vm.box = ENV.fetch('VAGRANT_ASTARA_VM_BOX', 'celebdor/trusty64')
|
|
v.memory = VM_MEMORY
|
|
v.cpus = VM_CPUS
|
|
v.nested = true
|
|
v.graphics_type = 'spice'
|
|
v.video_type = 'qxl'
|
|
end
|
|
|
|
config.vm.synced_folder '../devstack/', '/devstack'
|
|
# For CentOS machines it needs to be specified
|
|
config.vm.synced_folder '.', '/vagrant'
|
|
|
|
config.vm.provision :shell do |s|
|
|
s.path = 'vagrant.sh'
|
|
s.args = RUN_DEVSTACK
|
|
end
|
|
|
|
if Vagrant.has_plugin?('vagrant-cachier')
|
|
config.cache.scope = :box
|
|
end
|
|
|
|
config.vm.network :forwarded_port, guest: 80, host_ip: "127.0.0.1", host: 8080
|
|
end
|