diff --git a/attributes/default.rb b/attributes/default.rb index 29cefed..751374d 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -80,6 +80,13 @@ default["cinder"]["storage"]["netapp"]["nfsdirect"]["nfs_shares_config"] = "/etc/cinder/shares.txt" default["cinder"]["storage"]["netapp"]["nfsdirect"]["export"] = "" +# Ceph RBD settings - set these if you're using Ceph RBD Volumes +# http://docs.openstack.org/grizzly/openstack-block-storage/admin/content/ceph-rados.html +# http://ceph.com/docs/next/rbd/rbd-openstack/ +default["cinder"]["storage"]["rbd"]["rbd_pool"] = "volumes" +default["cinder"]["storage"]["rbd"]["rbd_user"] = "volumes" +default["cinder"]["storage"]["rbd"]["rbd_secret_uuid"] = "" + # can use a separate 'cinder' network if so desired. Define this network in # your environment in the same way you define management/nova etc networks default["cinder"]["services"]["volume"]["network"] = "management" diff --git a/providers/conf.rb b/providers/conf.rb index d7846ce..1868a48 100644 --- a/providers/conf.rb +++ b/providers/conf.rb @@ -14,7 +14,6 @@ cinder_volume_network = node["cinder"]["services"]["volume"]["network"] - # Set iscsi address iscsi_ip_address = node["cinder"]["storage"]["iscsi"]["ip_address"] iscsi_ip_address ||= get_ip_for_net(cinder_volume_network) @@ -28,8 +27,8 @@ Chef::Log.info("cinder::cinder-volume got cinder_info from cinder-setup recipe holder") end - - # Currently we support SolidFire, EMC VMAX/VNX, NetApp ISCSI (onCommand), and NetApp NFSDirect + # Currently we support SolidFire, EMC VMAX/VNX, NetApp ISCSI (onCommand), + # NetApp NFSDirect and ceph RBD storage_provider = node["cinder"]["storage"]["provider"] storage_options = {} case storage_provider @@ -61,6 +60,13 @@ when "lvm" storage_options["volume_group"] = node["cinder"]["storage"]["lvm"]["volume_group"] storage_options["volume_clear"] = node["cinder"]["storage"]["lvm"]["volume_clear"] + storage_options["volume_pool_size"] = node["cinder"]["storage"]["lvm"]["pool_size"] + when "rbd" + storage_options["volume_driver"] = "cinder.volume.drivers.rbd.RBDDriver" + storage_options["rbd_pool"] = node["cinder"]["storage"]["rbd"]["rbd_pool"] + storage_options["rbd_user"] = node["cinder"]["storage"]["rbd"]["rbd_user"] + storage_options["rbd_secret_uuid"] = node["cinder"]["storage"]["rbd"]["rbd_secret_uuid"] + storage_options["glance_api_version"] = "2" else msg = "#{storage_provider}, is not currently supported by these cookbooks. Please change the storage provider attribute in your environment to one of lvm, emc, solidfire, netappiscsi, netappnfsdirect." Chef::Application.fatal! msg @@ -82,7 +88,7 @@ "cinder_api_listen_port" => cinder_api["port"], "storage_availability_zone" => node["cinder"]["config"]["storage_availability_zone"], "max_gigabytes" => node["cinder"]["config"]["max_gigabytes"], - "storage_options" => storage_options, + "storage_options" => storage_options, "iscsi_ip_address" => iscsi_ip_address, "glance_host" => glance_api["host"] )