Developing a Ceph module: requirements or guidelines for inclusion

Hi, ansible-devel.

So, we use Ansible a lot to deploy Ceph and our Ceph solutions, to the point where it started to make sense to develop our own custom Ansible modules for Ceph operations.

I’d just like ask about any requirements or guidelines we should consider to get our custom modules included into “ansible-modules-extras”?

In particular, I’d like to ask if:

  1. Are there any naming conventions for modules? Right now I just used, for example, “ceph_osd_pool”, “ceph_rbd”, and “ceph_rbd_map”.

  2. Should they be in their own folder, or should they be in the “system” folder (where “gluster_volume” is located)?

  3. Are we required to provide integration tests, and if so, how are these done? It does take a bit of effort to test against an actual Ceph ‘cluster’ (I use a VM provisioned with ceph-ansible).

Thanks!

  • alistair

1. Are there any naming conventions for modules? Right now I just used,
for example, "ceph_osd_pool", "ceph_rbd", and "ceph_rbd_map".

​That sounds fine to me.​

2. Should they be in their own folder, or should they be in the "system"
folder (where "gluster_volume" is located)?

If you expect to have lots of modules, they might be in another
subdirectory ceph/ (like the cloud modules in core.)​

My first idea would be to put in with cliud modules. Whatever you choose,
that can be sorted out as feedback to your pull request.​

Thank you, Serge.

For now I'll place move them under cloud/ceph and issue a pull request
to get the discussion going.