mirror of https://github.com/ceph/ceph-ansible.git
Updates to fix running with OpenStack
Signed-off-by: Ivan Font <ivan.font@redhat.com>pull/1019/head
parent
9eccd339a7
commit
bd2cfcfb9e
|
@ -9,7 +9,7 @@ DEBUG = false
|
||||||
config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
|
config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
|
||||||
settings=YAML.load_file(config_file)
|
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']
|
NMONS = settings['mon_vms']
|
||||||
NOSDS = settings['osd_vms']
|
NOSDS = settings['osd_vms']
|
||||||
NMDSS = settings['mds_vms']
|
NMDSS = settings['mds_vms']
|
||||||
|
@ -30,14 +30,6 @@ ETH = settings['eth']
|
||||||
DOCKER = settings['docker']
|
DOCKER = settings['docker']
|
||||||
USER = settings['ssh_username']
|
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')
|
ASSIGN_STATIC_IP = !(BOX == 'openstack' or BOX == 'linode')
|
||||||
|
|
||||||
ansible_provision = proc do |ansible|
|
ansible_provision = proc do |ansible|
|
||||||
|
@ -162,8 +154,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
os.image = settings['os_image']
|
os.image = settings['os_image']
|
||||||
os.keypair_name = settings['os_keypair_name']
|
os.keypair_name = settings['os_keypair_name']
|
||||||
os.security_groups = ['default']
|
os.security_groups = ['default']
|
||||||
|
|
||||||
|
if settings['os.networks'] then
|
||||||
os.networks = settings['os_networks']
|
os.networks = settings['os_networks']
|
||||||
|
end
|
||||||
|
|
||||||
|
if settings['os.floating_ip_pool'] then
|
||||||
os.floating_ip_pool = settings['os_floating_ip_pool']
|
os.floating_ip_pool = settings['os_floating_ip_pool']
|
||||||
|
end
|
||||||
|
|
||||||
config.vm.provision "shell", inline: "true", upload_path: "/home/#{USER}/vagrant-shell"
|
config.vm.provision "shell", inline: "true", upload_path: "/home/#{USER}/vagrant-shell"
|
||||||
end
|
end
|
||||||
elsif BOX == 'linode'
|
elsif BOX == 'linode'
|
||||||
|
|
|
@ -9,7 +9,9 @@ osd_vms: 1
|
||||||
mds_vms: 0
|
mds_vms: 0
|
||||||
rgw_vms: 0
|
rgw_vms: 0
|
||||||
nfs_vms: 0
|
nfs_vms: 0
|
||||||
|
rbd_mirror_vms: 0
|
||||||
client_vms: 0
|
client_vms: 0
|
||||||
|
iscsi_gw_vms: 0
|
||||||
|
|
||||||
# Deploy RESTAPI on each of the Monitors
|
# Deploy RESTAPI on each of the Monitors
|
||||||
#restapi: false
|
#restapi: false
|
||||||
|
@ -31,13 +33,17 @@ vagrant_box: 'openstack'
|
||||||
# When using Atomic Hosts (RHEL or CentOS), uncomment the line below to skip package installation
|
# When using Atomic Hosts (RHEL or CentOS), uncomment the line below to skip package installation
|
||||||
#skip_tags: 'with_pkg'
|
#skip_tags: 'with_pkg'
|
||||||
|
|
||||||
|
# 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.
|
# For deploying on OpenStack VMs uncomment these vars and assign values.
|
||||||
# You can use env vars for the values if it makes sense.
|
# You can use env vars for the values if it makes sense.
|
||||||
#os_ssh_username :
|
#ssh_username :
|
||||||
#os_ssh_private_key_path :
|
#ssh_private_key_path :
|
||||||
#os_openstack_auth_url :
|
#os_openstack_auth_url :
|
||||||
#os_username : ENV['OS_USERNAME']
|
#os_username :
|
||||||
#os_password : ENV['OS_PASSWORD']
|
#os_password :
|
||||||
#os_tenant_name :
|
#os_tenant_name :
|
||||||
#os_region :
|
#os_region :
|
||||||
#os_flavor :
|
#os_flavor :
|
||||||
|
|
Loading…
Reference in New Issue