]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Updates to fix running with OpenStack 1019/head
authorIvan Font <ivan.font@redhat.com>
Fri, 7 Oct 2016 20:06:42 +0000 (13:06 -0700)
committerIvan Font <ivan.font@redhat.com>
Fri, 7 Oct 2016 20:48:50 +0000 (13:48 -0700)
Signed-off-by: Ivan Font <ivan.font@redhat.com>
Vagrantfile
vagrant_variables.yml.openstack

index 2a7aa5607f2f3452535b180f4cb339003848c858..4afec8368e66d93a407174f3750c9425c6665197 100644 (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'
index 34f96379dc624caef40682f6e62a63698c2e9dde..797ecc42b3a387e8a89de7fd408a328627b175dd 100644 (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 :