For more than a year, Ceph has become increasingly popular and saw several deployments inside and outside OpenStack. For those of you who do not know Ceph is unified, distributed and massively scalable open source storage technology that provides several ways to access and consume your data such as object, block and filesystem. The community and Ceph itself has greatly matured. More developers have joined the project as well. Since I joined eNovance, I have been thinking about building a Ceph support for DevStack. DevStack is a documented collection of shell scripts to build complete OpenStack development environments. I finally got some time to make this happening. It was not easy though, after 7 months and 42 patch sets (42 was the answer I guess), my patch got merged into DevStack. Here is the link of the review: https://review.openstack.org/#/c/65113/
It took me a while to get this into DevStack, however thanks to this patch DevStack got several improvements and new capabilities that we will discuss in this article.
What does it do?
Basically, the patch configures everything for you. So it will bootstrap a Ceph cluster and then configure all the OpenStack services, meaning: Glance, Cinder, Cinder backup and Nova. Many things are configurable such as Ceph size, pool names, user names, replica level. Setting a replica count greater than 1 does not make sense unless you want to look at the Ceph replication. Using a replica count of 2, will bootstrap 2 OSDs within the exact same loopback device. Thus Ceph will report having twice the amount of space to store object which is not true. So be careful with that. I believe this might be improved in the future but once again DevStack is a development platform not a production. DevStack Swift does the exact same thing for the replication.
This patch relies on a recent patch that came into DevStack, the Cinder multi-backend support. So thanks to Dean Troyer, we can now use several backends for Cinder. This patch was really critical in order to get Ceph into DevStack. To use it, simply add the flag CINDER_ENABLED_BACKENDS to your localrc file. Then append comma-separated backends names.
A new capability was introduced because of Ceph as well, the ability to perform a pre-install phase for extras.d plugins. An additional call hook for the extras.d plugins that is called before any service installation occurs. This is called between the installation of the system packages listed as prerequisites and the installation of the actual services.
Below you will find a complete localrc example with every variables that you can use. Of course every variables like USERS, POOL, PG are not mandatory, we have default values for that:
# Enable Logging
# Glance - Image Service
# Cinder - Block Device Service
# Nova - Compute Service
Why is it useful?
Well, as mentioned in the introduction many organizations are interested in Ceph and thus they have committed on new functionalities. As DevStack is the de facto platform to program in OpenStack, the need for a DevStack Ceph was natural.
This patch is part of my commitment to the Juno cycle for the Ceph integration into OpenStack effort. I would like to thank the community for its support with this patch. It was important to see that many people want Ceph to be in DevStack, this helped me a lot and gave me the motivation to persevere. More is coming, we are currently working on getting Ceph into the CI gate so we will see our patches more easily accepted and also for Cinder since it requires a CI per volume backend.