Support EL, Fedora and (open)SuSE repo

- Recipe is now ceph::repo
- For EL, add EPEL repository for dependencies by default.
Deactivable by using el_add_epel: false under ceph: {} in
the chef environment.
- Handle package names difference between EL/FC/SuSE and Debian.

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Upstart and SYSV Init support

- Handles different service names between upstart
and sysvinit.
- Create mon_dir/(upstart|sysvinit) depending on
service to be used.

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Create mon data dir before calling ceph-mon --mkfs

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Merge pull request #17 from alram/wip-rpm-distro

Chef support for CentOS/RHEL, Fedora and SuSE

Reviewed-by-not-tested-by: Sage Weil <sage@inktank.com>
Fix issue with old ceph-disk-prepare

Old ceph-disk-prepare re-write the partition table and fail before writting
the Parition GUID.
This fix tests the presence of a osd_device status, if present, we skip
the OSD.
It also fix a typo when setting the osd_device status

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Merge pull request #18 from alram/master

Fix for old ceph-disk-prepare
- Fix recipe compile error when 'public network' is set to Ceph environment

================================================================================
Recipe Compile Error in /var/cache/chef/cookbooks/ceph/recipes/mon.rb
================================================================================

NoMethodError
-------------
undefined method `[]' for nil:NilClass

Cookbook Trace:
---------------
  /var/cache/chef/cookbooks/ceph/libraries/default.rb:84:in `get_mon_addresses'
  /var/cache/chef/cookbooks/ceph/libraries/default.rb:84:in `map'
  /var/cache/chef/cookbooks/ceph/libraries/default.rb:84:in `get_mon_addresses'
  /var/cache/chef/cookbooks/ceph/recipes/conf.rb:4:in `from_file'
  /var/cache/chef/cookbooks/ceph/recipes/mon.rb:20:in `from_file'

Relevant File Content:
----------------------
/var/cache/chef/cookbooks/ceph/libraries/default.rb:

 77:      end
 78:
 79:      mons += get_mon_nodes()
 80:      if is_crowbar?
 81:        mon_ips = mons.map { |node| Chef::Recipe::Barclamp::Inventory.get_network_by_type(node, "admin").address }
 82:      else
 83:        if node['ceph']['config']['global'] && node['ceph']['config']['global']['public network']
 84>>         mon_ips = mons.map { |node| find_node_ip_in_network(node['ceph']['config']['global']['public network'], node) }
 85:        else
 86:          mon_ips = mons.map { |node| node['ipaddress'] + ":6789" }
 87:        end
 88:      end
 89:    end
 90:    return mon_ips.uniq
 91:  end
 92:
 93:  def get_quorum_members_ips()
Merge pull request #19 from yuryu/master

Fix recipe compile error when 'public network' is set to Ceph environment

Reviewed-by: Alexandre Marangone <alexandre.marangone@inktank.com>
ceph-mon-all-starter is a task, not a service
Ensure that ceph-mon-all is start at the end of recipe
creates prevent re-run
refactor to use chef commands
move ceph_bootstrap_osd_key to node['ceph']
we must wait for get osd-bootstrap keyring to finish
Last fixes
create /var/lib/ceph/mon/ceph-{hostname} directory if it doesn't exist.
remove ceph.mon.node attribute (more reflexion to this behaviour later)
fix typo for done file
service ceph-mon-all support restart and status
service must be restart immediately to launch ceph-mon
correct rebase
Don't use libraries for things that must be in attributes
Place service at the end of script to ensure that service is always enable and running after chef is execute
ceph support "status" command