Skip to content

Commit

Permalink
wip: split mon/osd/mds server packages
Browse files Browse the repository at this point in the history
Split up the "ceph" package into four new packages:

  1. ceph-mon
  2. ceph-osd
  3. ceph-mds (already done on Debian)
  4. ceph-base (files shared among multiple servers)

and then:

  5. Make "ceph" into a metapackage that depends on both -mon and -osd
    (and -mds, for RPMs).

To describe the outcome of this change another way:

  For RPMs:
  - "ceph-{mon,osd,mds}" Require: ceph-base.
  - "ceph" will become a metapackage that Requires: ceph-{mon,osd,mds}.

  For DEBs:
  - "ceph-{mon,osd,mds}" will Depends: ceph-base.
  - "ceph" will become a metapackage that Depends: ceph-{mon,osd}.
  - "ceph" will continue to Recommends: ceph-mds

New users should "yum install ceph-mon" or "yum install ceph-osd" (or
"apt-get install ceph-mon", etc) in order to install the exact daemons
that they need.

http://tracker.ceph.com/issues/10587 Fixes: #10587

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
  • Loading branch information
alimaredia committed Feb 22, 2016
1 parent 64c1d54 commit 00793dc
Show file tree
Hide file tree
Showing 17 changed files with 288 additions and 107 deletions.
173 changes: 134 additions & 39 deletions ceph.spec.in
Expand Up @@ -87,6 +87,9 @@ Patch0: init-ceph.in-fedora.patch
#################################################################################
# dependencies that apply across all distro families
#################################################################################
Requires: ceph-osd = %{epoch}:%{version}-%{release}
Requires: ceph-mds = %{epoch}:%{version}-%{release}
Requires: ceph-mon = %{epoch}:%{version}-%{release}
Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{epoch}:%{version}-%{release}
Expand Down Expand Up @@ -239,6 +242,13 @@ on commodity hardware and delivers object, block and file system storage.
#################################################################################
# packages
#################################################################################
%package base
Summary: Ceph Base Package
Group: System Environment/Base
Requires: ceph-common = %{epoch}:%{version}-%{release}
%description base
Base is the package that includes all the files shared amongst ceph servers

%package -n ceph-common
Summary: Ceph Common
Group: System Environment/Base
Expand All @@ -260,6 +270,28 @@ Requires: python-argparse
%endif
%description -n ceph-common
Common utilities to mount and interact with a ceph storage cluster.
Comprised of files that are common to Ceph clients and servers.

%package mds
Summary: Ceph Metadata Server Daemon
Group: System Environment/Base
Requires: ceph-base = %{epoch}:%{version}-%{release}
%description mds
ceph-mds is the metadata server daemon for the Ceph distributed file system.
One or more instances of ceph-mds collectively manage the file system
namespace, coordinating access to the shared OSD cluster.

%package mon
Summary: Ceph Monitor Daemon
Group: System Environment/Base
Requires: ceph-base = %{epoch}:%{version}-%{release}
# For ceph-rest-api
Requires: python-flask
%description mon
ceph-mon is the cluster monitor daemon for the Ceph distributed file
system. One or more instances of ceph-mon form a Paxos part-time
parliament cluster that provides extremely reliable and durable storage
of cluster membership, configuration, and state.

%package fuse
Summary: Ceph fuse-based client
Expand Down Expand Up @@ -326,6 +358,15 @@ under Open Cluster Framework (OCF) compliant resource
managers such as Pacemaker.
%endif

%package osd
Summary: Ceph Object Storage Daemon
Group: System Environment/Base
Requires: ceph-base = %{epoch}:%{version}-%{release}
%description osd
ceph-osd is the object storage daemon for the Ceph distributed file
system. It is responsible for storing objects on a local file system
and providing access to them over the network.

%package -n librados2
Summary: RADOS distributed object store client library
Group: System Environment/Libraries
Expand Down Expand Up @@ -557,6 +598,21 @@ librbd1 or libcephfs1 instead.

%endif

%package compat
Summary: Compatibility package for Ceph MON/OSD/MDS servers
Group: Development/Libraries
License: LGPL-2.0
# FIXME: this version number should reflect "git describe" on the relevant
# branch.
Obsoletes: ceph < 10
Requires: ceph-mon = %{epoch}:%{version}-%{release}
Requires: ceph-osd = %{epoch}:%{version}-%{release}
Requires: ceph-mds = %{epoch}:%{version}-%{release}
%description compat
This is a compatibility package to accommodate ceph split into ceph-mon,
ceph-osd, and ceph-mds. Packages or tools still depending on ceph should be
fixed to depend on ceph-mon, ceph-osd, or ceph-mds instead.

%package devel-compat
Summary: Compatibility package for Ceph headers
Group: Development/Libraries
Expand Down Expand Up @@ -819,49 +875,25 @@ rm -rf $RPM_BUILD_ROOT
# files
#################################################################################
%files

%files base
%defattr(-,root,root,-)
%docdir %{_docdir}
%dir %{_docdir}/ceph
%{_docdir}/ceph/sample.ceph.conf
%{_docdir}/ceph/sample.fetch_config
%{_bindir}/cephfs
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-rest-api
%{python_sitelib}/ceph_rest_api.py*
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/ceph-run
%{_bindir}/ceph-mon
%{_bindir}/ceph-mds
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph-bluefs-tool
%{_bindir}/ceph-osd
%{_bindir}/ceph-detect-init
%{_bindir}/librados-config
%{_bindir}/ceph-client-debug
%{_bindir}/cephfs-journal-tool
%{_bindir}/cephfs-table-tool
%{_bindir}/cephfs-data-scan
%{_bindir}/ceph-debugpack
%{_bindir}/ceph-coverage
%{_bindir}/cephfs
%if 0%{?_with_systemd}
%{_unitdir}/ceph-mds@.service
%{_unitdir}/ceph-mon@.service
%{_unitdir}/ceph-create-keys@.service
%{_unitdir}/ceph-osd@.service
%{_unitdir}/ceph-radosgw@.service
%{_unitdir}/ceph-disk@.service
%{_unitdir}/ceph.target
%{_unitdir}/ceph-osd.target
%{_unitdir}/ceph-mon.target
%{_unitdir}/ceph-mds.target
%{_unitdir}/ceph-radosgw.target
%else
%{_initrddir}/ceph
%endif
%{_sbindir}/ceph-disk
%{_sbindir}/ceph-disk-udev
%{_sbindir}/ceph-create-keys
%{_sbindir}/rcceph
%if 0%{?rhel} >= 7 || 0%{?fedora} || 0%{?suse_version}
Expand All @@ -871,7 +903,6 @@ rm -rf $RPM_BUILD_ROOT
%endif
%dir %{_libdir}/ceph
%{_libdir}/ceph/ceph_common.sh
%{_libexecdir}/ceph/ceph-osd-prestart.sh
%dir %{_libdir}/rados-classes
%{_libdir}/rados-classes/libcls_cephfs.so*
%{_libdir}/rados-classes/libcls_rbd.so*
Expand Down Expand Up @@ -908,30 +939,20 @@ rm -rf $RPM_BUILD_ROOT
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-mon
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds
%endif
%{_unitdir}/ceph.target
%{python_sitelib}/ceph_detect_init*
%{python_sitelib}/ceph_disk*
%{_mandir}/man8/ceph-deploy.8*
%{_mandir}/man8/ceph-detect-init.8*
%{_mandir}/man8/ceph-disk.8*
%{_mandir}/man8/ceph-create-keys.8*
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-mds.8*
%{_mandir}/man8/ceph-osd.8*
%{_mandir}/man8/ceph-run.8*
%{_mandir}/man8/ceph-rest-api.8*
%{_mandir}/man8/crushtool.8*
%{_mandir}/man8/osdmaptool.8*
%{_mandir}/man8/monmaptool.8*
%{_mandir}/man8/cephfs.8*
%{_mandir}/man8/mount.ceph.8*
%{_mandir}/man8/ceph-debugpack.8*
%{_mandir}/man8/ceph-clsinfo.8*
%{_mandir}/man8/librados-config.8*
#set up placeholder directories
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/tmp
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-osd
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-mds
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/bootstrap-rgw
Expand Down Expand Up @@ -1023,6 +1044,36 @@ if [ "$1" -eq "0" ] ; then
rm -rf /etc/ceph
fi

%files mds
%{_bindir}/ceph-mds
%{_bindir}/cephfs-journal-tool
%{_bindir}/cephfs-table-tool
%{_bindir}/cephfs-data-scan
%{_mandir}/man8/ceph-mds.8*
%if 0%{?_with_systemd}
%{_unitdir}/ceph-mds@.service
%{_unitdir}/ceph-mds.target
%else
%{_initrddir}/ceph
%endif
%dir %{_localstatedir}/lib/ceph/mds
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mds

%files mon
%{_bindir}/ceph-mon
%{_bindir}/ceph-rest-api
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-rest-api.8*
%dir %{_localstatedir}/lib/ceph/mon
%{python_sitelib}/ceph_rest_api.py*
%if 0%{?_with_systemd}
%{_unitdir}/ceph-mon@.service
%{_unitdir}/ceph-mon.target
%else
%{_initrddir}/ceph
%endif
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mon

#################################################################################
%files fuse
%defattr(-,root,root,-)
Expand Down Expand Up @@ -1063,6 +1114,8 @@ fi
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
%dir %{_localstatedir}/lib/ceph/radosgw
%if 0%{?_with_systemd}
%{_unitdir}/ceph-radosgw@.service
%{_unitdir}/ceph-radosgw.target
%else
%{_initrddir}/ceph-radosgw
%{_sbindir}/rcceph-radosgw
Expand Down Expand Up @@ -1112,6 +1165,41 @@ fi
fi
%endif

%files osd
%{_bindir}/ceph-clsinfo
%{_bindir}/ceph-bluefs-tool
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph-osd
%{_sbindir}/ceph-disk
%{_sbindir}/ceph-disk-udev
%{_libexecdir}/ceph/ceph-osd-prestart.sh
%dir %{_libdir}/rados-classes
%{_libdir}/rados-classes/libcls_rbd.so*
%{_libdir}/rados-classes/libcls_hello.so*
%{_libdir}/rados-classes/libcls_rgw.so*
%{_libdir}/rados-classes/libcls_lock.so*
%{_libdir}/rados-classes/libcls_kvs.so*
%{_libdir}/rados-classes/libcls_refcount.so*
%{_libdir}/rados-classes/libcls_log.so*
%{_libdir}/rados-classes/libcls_replica_log.so*
%{_libdir}/rados-classes/libcls_statelog.so*
%{_libdir}/rados-classes/libcls_user.so*
%{_libdir}/rados-classes/libcls_version.so*
%{_udevrulesdir}/60-ceph-partuuid-workaround.rules
%{_udevrulesdir}/95-ceph-osd.rules
%{_mandir}/man8/ceph-clsinfo.8*
%{_mandir}/man8/ceph-disk.8*
%{_mandir}/man8/ceph-osd.8*
%if 0%{?_with_systemd}
%{_unitdir}/ceph-osd@.service
%{_unitdir}/ceph-osd.target
%{_unitdir}/ceph-disk@.service
%else
%{_initrddir}/ceph
%endif
%dir %{_localstatedir}/lib/ceph/osd
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd

#################################################################################
%if %{with ocf}
%files resource-agents
Expand Down Expand Up @@ -1153,6 +1241,8 @@ fi
%if 0%{?_with_lttng}
%{_libdir}/librados_tp.so
%endif
%{_bindir}/librados-config
%{_mandir}/man8/librados-config.8*

#################################################################################
%files -n python-rados
Expand Down Expand Up @@ -1283,9 +1373,12 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%{_bindir}/librgw_file*
%{_bindir}/ceph_tpbench
%{_bindir}/ceph_xattr_bench
%{_bindir}/ceph-coverage
%{_bindir}/ceph-monstore-tool
%{_bindir}/ceph-osdomap-tool
%{_bindir}/ceph-kvstore-tool
%{_bindir}/ceph-debugpack
%{_mandir}/man8/ceph-debugpack.8*
%dir %{_libdir}/ceph
%{_libdir}/ceph/ceph-monstore-update-crush.sh

Expand Down Expand Up @@ -1434,4 +1527,6 @@ exit 0
# We need an empty %%files list for python-ceph-compat, to tell rpmbuild to
# actually build this meta package.

%files compat

%changelog
4 changes: 4 additions & 0 deletions debian/.gitignore
Expand Up @@ -9,6 +9,10 @@
/ceph-fs-common
/ceph-mds-dbg
/ceph-mds
/ceph-mon-dbg
/ceph-mon
/ceph-osd-dbg
/ceph-osd
/ceph-resource-agents
/ceph.init
/radosgw.init
Expand Down
2 changes: 0 additions & 2 deletions debian/ceph.dirs → debian/ceph-base.dirs
@@ -1,6 +1,4 @@
var/lib/ceph/tmp
var/lib/ceph/mon
var/lib/ceph/osd
var/lib/ceph/bootstrap-osd
var/lib/ceph/bootstrap-mds
var/lib/ceph/bootstrap-rgw
File renamed without changes.
22 changes: 22 additions & 0 deletions debian/ceph-base.install
@@ -0,0 +1,22 @@
etc/bash_completion.d/ceph
usr/sbin/ceph-create-keys
usr/bin/ceph-detect-init
usr/bin/ceph-debugpack
usr/bin/ceph-run
usr/bin/crushtool
usr/bin/monmaptool
usr/bin/osdmaptool
usr/lib/ceph/ceph_common.sh
usr/lib/ceph/erasure-code/*
usr/share/doc/ceph/sample.ceph.conf
usr/share/doc/ceph/sample.fetch_config
usr/share/man/man8/ceph-debugpack.8
usr/share/man/man8/ceph-deploy.8
usr/share/man/man8/ceph-run.8
usr/share/man/man8/crushtool.8
usr/share/man/man8/monmaptool.8
usr/share/man/man8/osdmaptool.8
usr/lib/python*/dist-packages/ceph_detect_init*
usr/share/man/man8/ceph-detect-init.8
usr/share/man/man8/ceph-create-keys.8
usr/bin/ceph-client-debug
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions debian/ceph-common.install
Expand Up @@ -30,3 +30,4 @@ etc/ceph/rbdmap
etc/init.d/rbdmap
lib/udev/rules.d/50-rbd.rules
usr/lib/python*/dist-packages/ceph_argparse.py*
usr/lib/python*/dist-packages/ceph_daemon.py*
1 change: 1 addition & 0 deletions debian/ceph-mon.dirs
@@ -0,0 +1 @@
var/lib/ceph/mon
5 changes: 5 additions & 0 deletions debian/ceph-mon.install
@@ -0,0 +1,5 @@
usr/bin/ceph-mon
usr/bin/ceph-rest-api
usr/share/man/man8/ceph-mon.8
usr/share/man/man8/ceph-rest-api.8
usr/lib/python*/dist-packages/ceph_rest_api.py*
1 change: 1 addition & 0 deletions debian/ceph-osd.dirs
@@ -0,0 +1 @@
var/lib/ceph/osd
15 changes: 15 additions & 0 deletions debian/ceph-osd.install
@@ -0,0 +1,15 @@
lib/udev/rules.d/95-ceph-osd.rules
lib/udev/rules.d/60-ceph-partuuid-workaround.rules
usr/sbin/ceph-disk
usr/sbin/ceph-disk-udev
usr/bin/ceph-clsinfo
usr/bin/ceph-objectstore-tool
usr/bin/ceph-bluefs-tool
usr/bin/ceph_objectstore_bench
usr/bin/ceph-osd
usr/lib/rados-classes/*
usr/libexec/ceph/ceph-osd-prestart.sh
usr/share/man/man8/ceph-clsinfo.8
usr/share/man/man8/ceph-disk.8
usr/share/man/man8/ceph-osd.8
usr/lib/python*/dist-packages/ceph_disk*

0 comments on commit 00793dc

Please sign in to comment.