Skip to content

Commit

Permalink
add RBD support
Browse files Browse the repository at this point in the history
  • Loading branch information
odyssey4me authored and mancdaz committed Sep 10, 2013
1 parent b969793 commit 1c3f652
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 10 additions & 4 deletions providers/conf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"]
)
Expand Down

0 comments on commit 1c3f652

Please sign in to comment.