Updates to fix running with OpenStack

Signed-off-by: Ivan Font <ivan.font@redhat.com>
pull/1019/head
Ivan Font 2016-10-07 13:06:42 -07:00
parent 9eccd339a7
commit bd2cfcfb9e
2 changed files with 27 additions and 22 deletions

21
Vagrantfile vendored
View File

@ -9,7 +9,7 @@ DEBUG = false
config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
settings=YAML.load_file(config_file)
LABEL_PREFIX = settings['label_prefix'] ? settings['label_prefix'] : ""
LABEL_PREFIX = settings['label_prefix'] ? settings['label_prefix'] + "-" : ""
NMONS = settings['mon_vms']
NOSDS = settings['osd_vms']
NMDSS = settings['mds_vms']
@ -30,14 +30,6 @@ ETH = settings['eth']
DOCKER = settings['docker']
USER = settings['ssh_username']
if BOX == 'openstack'
require 'vagrant-openstack-provider'
if not USER then
USER = settings['os_ssh_username']
end
LABEL_PREFIX = "#{USER}-"
end
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
ansible_provision = proc do |ansible|
@ -162,8 +154,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
os.image = settings['os_image']
os.keypair_name = settings['os_keypair_name']
os.security_groups = ['default']
os.networks = settings['os_networks']
os.floating_ip_pool = settings['os_floating_ip_pool']
if settings['os.networks'] then
os.networks = settings['os_networks']
end
if settings['os.floating_ip_pool'] then
os.floating_ip_pool = settings['os_floating_ip_pool']
end
config.vm.provision "shell", inline: "true", upload_path: "/home/#{USER}/vagrant-shell"
end
elsif BOX == 'linode'

View File

@ -9,7 +9,9 @@ osd_vms: 1
mds_vms: 0
rgw_vms: 0
nfs_vms: 0
rbd_mirror_vms: 0
client_vms: 0
iscsi_gw_vms: 0
# Deploy RESTAPI on each of the Monitors
#restapi: false
@ -31,17 +33,21 @@ vagrant_box: 'openstack'
# When using Atomic Hosts (RHEL or CentOS), uncomment the line below to skip package installation
#skip_tags: 'with_pkg'
# For deploying on OpenStack VMs uncomment these vars and assign values.
# Set a label prefix for the machines in this cluster to differentiate
# between different concurrent clusters e.g. your OpenStack username
label_prefix: 'your-openstack-username'
# For deploying on OpenStack VMs uncomment these vars and assign values.
# You can use env vars for the values if it makes sense.
#os_ssh_username :
#os_ssh_private_key_path :
#os_openstack_auth_url :
#os_username : ENV['OS_USERNAME']
#os_password : ENV['OS_PASSWORD']
#os_tenant_name :
#os_region :
#os_flavor :
#os_image :
#os_keypair_name :
#ssh_username :
#ssh_private_key_path :
#os_openstack_auth_url :
#os_username :
#os_password :
#os_tenant_name :
#os_region :
#os_flavor :
#os_image :
#os_keypair_name :
#os_networks :
#os_floating_ip_pool :