Commit Graph

232 Commits

Author SHA1 Message Date
Yuri Weinstein
bf30425f5e
Merge pull request #55409 from cybozu/add-ceph-exporter-to-deb-package
debian: add ceph-exporter package

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2024-03-20 08:40:57 -07:00
Nizamudeen A
2a112acd0a mgr/cephadm: mount grafana dashboards from the path
For this, the grafana dashboards are installed directly to the
containers and later, cephadm picks it up to mount the dashboards to the
grafana container

Signed-off-by: Nizamudeen A <nia@redhat.com>
2024-03-08 15:51:08 +05:30
Shinya Hayashi
a53c0651fb debian: add ceph-exporter package
It is hard for Debian/Ubuntu users to use ceph-exporter
because it is not included in any deb packages.

This commit adds a new deb package for ceph-exporter.

Fixes: https://tracker.ceph.com/issues/64095
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
2024-02-13 01:48:22 +00:00
Matthew Vernon
e4393e574c debian: call dh_python3 for ceph-{base,common,fuse,volume}
In the cases of ceph-base, ceph-common, and ceph-fuse, this picks up
that these packages contain python scripts and adds a necessary
python3 dependency. In the case of ceph-volume it additionally parses
the requirements.txt file.

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
2023-09-22 17:32:04 +01:00
Matthew Vernon
67abe9c49a debian: radosgw.init to installinit, remove auto_build override
Installation of init scripts properly belongs with dh_installinit, so
move the installation there.

That means we no longer need the override of dh_auto_build, which
simplifies the rules file.

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
2023-09-22 17:32:04 +01:00
Matthew Vernon
96edd84e47 debian: remove obsolete ceph-base.docs, restore dh_installdocs
debian/ceph-base.docs only referred to a README that doesn't exist, so
remove it. Because dpkg-source doesn't reflect deletions from debian/
cf the orig.tar.gz, also remove the file in dh_auto_clean.

Then do away with the removal of the empty override of dh_installdocs;
the main benefit of which here is that debian/copyright gets installed
in all of the built packages, which otherwise lack a copyright
file.

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
2023-09-22 17:32:04 +01:00
Matthew Vernon
86863990ca debian: dh compat to 12, necessary init/systemd adjustments
Bring the dh compat level to 12, the most recent supported by the
oldest supported Ubuntu LTS release, 20.04. This necessitates changes
to how initscripts & systemd packaging are done.

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
2023-09-22 17:32:04 +01:00
Matthew Vernon
c14ed9bf1b debian: Build-Depend on g++ 11 or greater
Rely on the packaging system to provide a suitable g++ of version 11
or greater, and removing the corresponding hard-coding from
debian/rules, since cmake will then find a suitable version. This
seems better than trying to hard-code a particular version in
debian/rules, and Debian package building tools like e.g. sbuild will
then do the right thing.

This enables Reef (v18.2.0) to build on Debian bookworm in a clean
chroot.

Fixes: https://tracker.ceph.com/issues/61845

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
2023-09-22 17:31:50 +01:00
Michael Fritch
f756b3cfcc rpm, debian: use cmake to install the cephadm binary
Signed-off-by: Michael Fritch <mfritch@suse.com>
2022-09-13 12:17:20 -04:00
Kefu Chai
9f00a70232 debian: use dpkg/default.mk to init popular make variables
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-04 16:35:20 +08:00
Casey Bodley
79d7ae7195 debian: pin gcc-11
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-07-30 13:02:16 +08:00
Kefu Chai
6726fe7304
Merge pull request #46416 from tchaikov/wip-debian-dh-python3
debian: python3 related cleanups

Reviewed-by: Redouane Kachach <rkachach@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2022-06-05 21:44:41 +08:00
Kefu Chai
42f5465755 debian: extract python3 packages to a single place
to better maintainability

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-31 19:42:32 +08:00
Kefu Chai
ef19547e83 debian: add .requires for specifying python3 deps
we use dh_python3 to define subvar of ${python3:Depends} as a part
of the runtime dependencies of python3 packages, like,
ceph-mgr modules named "ceph-mgr-*", python3 bindings named "python3-*".

but unlike python3 bindings of Ceph APIs, the ceph-mgr modules are
not packaged in a typical python way. in other words, they do not
ship a "dist-info" or an "egg-info" directory. instead, we just
install the python scripts into a directory which can be found by
ceph-mgr, by default it is /usr/share/ceph/mgr/dashboard/plugins.

this does not follow the convention of python packaging or
debian packaging policies related to python package. but it
still makes to put these files in this non-convention place, as
they are not supposed to be python packages consumed by the
outer world -- they are but plugins. and should always work
with the same version of ceph-mgr.

the problem is, despite that we have ${python3:Depends} in
the "Depends" field of packages like ceph-mgr-dashboard, dh_python3
is not able to figure out the dependencies by looking at the
installed files. for instance, we have following "Depends" of
ceph-mgr-dashboard:

Depends: ceph-mgr (= 17.0.0-12481-g805d2320-1focal), python3-cherrypy3, python3-jwt, python3-bcrypt, python3-werkzeug, python3-routes

and in the debian/control file we have:

Depends: ceph-mgr (= ${binary:Version}),
         python3-cherrypy3,
         python3-jwt,
         python3-bcrypt,
         python3-werkzeug,
         python3-routes,
         ${misc:Depends},
         ${python:Depends},
         ${shlibs:Depends},

apparently, none of the subvar is materialized to
a non-empty string.

to improve the packaging, in this change:

* drop all subvars from ceph-mgr-*, as they
  are all implemented in pure python.
* add debian/ceph-mgr-*.requires, it's content
  is replicated with the corresponding requirements.txt
  files.
  * add python3-distutils for distutils, as debian
    and its derivatives package non-essetial part of
    distutils into a separate package, see
    https://packages.debian.org/stable/python3-distutils
* add ${python3:Depends} so dh_python3
  can extract the deps from debian/ceph-mgr-*.pydist
* update the rule for "override_dh_python3" target,
  so dh_python3 can pick up the dependencies specified
  in .requires file.
* remove the python3 dependencies not used by
  ceph-mgr from ceph-mgr's "Depends"

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-05-31 19:42:32 +08:00
Deepika Upadhyay
bee4d993fb debian: make jaeger package installation as default
jaeger opentelemetry deps that will be installed by default now:
libyaml-dev  > 0.6
libthrift-dev (thift deps: libevent-dev, bison, flex, boost(we use ceph compiled boost))
nlohmann-json3-dev

removes:
pkg.ceph.jaeger build package optional option

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2022-05-17 04:38:01 -04:00
Casey Bodley
90662cad56 cmake: WITH_SYSTEM_UTF8PROC defaults to OFF
change the default value of WITH_SYSTEM_UTF8PROC from ON to OFF, so that
centos/rhel users can build with the default cmake configuration. no other
WITH_SYSTEM_* variable in ceph defaults to ON, so this is consistent
with other bundled libraries like boost and rocksdb

unfortunately, this also means that users that do have system packages
must opt-in to using them with -DWITH_SYSTEM_UTF8PROC=ON

both deb and rpm builds dependended on the previous default value, so
their logic was negated to match the new default

Fixes: https://tracker.ceph.com/issues/55114

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-03-29 17:49:18 -04:00
Casey
e8460cbd5a deb: add build profile for system arrow
Signed-off-by: Casey <cbodley@redhat.com>
2022-03-14 10:19:02 -04:00
Nizamudeen A
27592b7561 cephadm: change shared_folder directory for prometheus and grafana
After https://github.com/ceph/ceph/pull/44059 the monitoring/prometheus
and monitoring/grafana/dashboards directories are changed to
monitoring/ceph-mixins. That broke the shared_folders in the cephadm
bootstrap script.

Changed all the instances of monitoring/prometheus and
monitoring/grafana/dashboards to monitoring/ceph-mixins

Also, renaming all the instances of prometheus_alerts.yaml to
prometheus_alerts.yml.

Fixes: https://tracker.ceph.com/issues/54176
Signed-off-by: Nizamudeen A <nia@redhat.com>
2022-02-07 16:34:37 +05:30
Arthur Outhenin-Chalandre
98236e3a1d
mgr/dashboard: monitoring: refactor into ceph-mixin
Mixin is a way to bundle dashboards, prometheus rules and alerts into
jsonnet package. Shifting to mixin will allow easier integration with
monitoring automation that some users may use.

This commit moves `/monitoring/grafana/dashboards` and
`/monitoring/prometheus` to `/monitoring/ceph-mixin`. Prometheus alerts
was also converted to Jsonnet using an automated way (from yaml to json
to jsonnet). This commit minimises any change made to the generated files
and should not change neithers the dashboards nor the Prometheus alerts.

In the future some configuration will also be added to jsonnet to add
more functionalities to the dashboards or alerts (i.e.: multi cluster).

Fixes: https://tracker.ceph.com/issues/53374
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
2022-02-03 13:08:20 +01:00
胡玮文
8e49d36170 cmake: fix default systemd unit install dir
The original usage of CMAKE_INSTALL_LIBEXECDIR is incorrect.

Also try to get the path from pkg-config

Signed-off-by: 胡玮文 <huww98@outlook.com>
2021-11-18 15:07:26 +08:00
Yaarit Hatuka
7ca39fa92b rpm, debian: move smartmontools and nvme-cli to ceph-base
We wish to be able to scrape SMART and NVMe metrics from OSD and MON
nodes. For this we require / recommend smartmontools and nvme-cli
dependencies for both the ceph-osd and ceph-mon packages.  However, the
sudoers file (which is required for invoking `smartctl` by user 'ceph')
was installed only in the ceph-osd package.  Since different packages
cannot own the same file, and because we want to be able to scrape from
every daemon, we move the dependencies and the sudoers installation to
ceph-base. For generalization, we rename:
	sudoers.d/ceph-osd-smartctl -> sudoers.d/ceph-smartctl

Fixes: https://tracker.ceph.com/issues/50657
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
2021-08-25 13:20:23 +00:00
Deepika
52fc62520f debian, install-deps.sh: use Build-Profiles to optionally build debian libjaeger
library

* use pkg.ceph.jaeger for debian optional pkgs
remove mangling needing install-deps, instead use, buildProfileSpec feature
introduced for debian.  https://wiki.debian.org/BuildProfileSpec * check and

* set extraopts in debian/rules using pkg.ceph.jaeger
see: https://github.com/ceph/ceph/pull/38783#discussion_r662995612

* cleanup libjaeger.install mangling from CMakeLists

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-19 21:01:42 +00:00
Kevin Zhao
8c7729af08 ceph.spec.in, debian/rules: Set rbd-rwl-cache optional on arm64 and ppc64le
set rwl cache option on arm64 and ppc64le as PMDK is not well supported.
Currently, only 64-bit Linux* and Windows* on x86 are supported PMDK

Reference:
1. Experimental support on Arm64, but lacking of librpmem:
See: https://github.com/pmem/pmdk#experimental-support-for-64-bit-arm
2. No RPM for PMDK on Arm64:
See: https://bugzilla.redhat.com/show_bug.cgi?id=1340635
3. > Does PMDK support ARM64*?
   > Currently only 64-bit Linux* and Windows* on x86 are supported.
See: https://software.intel.com/content/www/us/en/develop/articles/persistent-memory-faq.html
4. Make check fail on Arm64
See: https://github.com/pmem/pmdk/issues/5255

Fixes: https://tracker.ceph.com/issues/51339
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2021-06-25 11:53:18 +08:00
Kefu Chai
9438c23acd debian/rules: add with_system_libs option
so the maintainer can choose to use the packages shipped by distro.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-24 18:52:42 +08:00
Kefu Chai
561a34a685 debian/rules: exclude ceph_crypto from dh_shlibdep
as libceph_crypto* are plugins, and they are not self-contained. they
reference symbols offered by the executable loading them. dh_shlibdep
should not complain when checking them, so add them to the exclude list.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-24 18:52:42 +08:00
Patrick Donnelly
75980798f1
ceph.spec,debian: package libcephsqlite
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:55 -07:00
lixiaoy1
12ca24fc26 spec: enable RWL/SSD caches
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
2021-01-26 04:21:30 -05:00
Venky Shankar
d5062c60f6 spec, deb: package cephfs-top utility
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-11 06:15:53 -05:00
David Turner
1de14c7f9b rpm,deb: change sudoers file mode to 440
change sudoers file mode to 440 to match recommended defaults.

From the sudoers man page.

> the default file mode is 0440 (read‐able by owner and group, writable
by none).
> The default mode may be changed via the “sudoers_mode” option to the
sudoers
>  Plugin line in the sudo.conf(5) file.

Fixes: https://tracker.ceph.com/issues/48169
Signed-off-by: David Turner <drakonstein@gmail.com>
2020-11-12 14:09:03 +08:00
Adam C. Emerson
5429f10c47 dpkg: Remove use of no-longer-existing WITH_BOOST_CONTEXT option
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-10-23 11:21:53 -04:00
Nathan Cutler
c1783d3d8f rpm,deb: drop /etc/sudoers.d/cephadm
Current behavior (without this patch) is:

1. cephadm package installs cephadm at /usr/sbin/cephadm
2. cephadm package installs /etc/sudoers.d/cephadm
3. !!! BUT this file refers to a non-existent executable (/usr/bin/cephadm) !!!
4. the PR that introduced this sudoers file (and this discrepancy) was merged in 2019
5. nobody noticed the discrepancy until now

My conclusion: the file /etc/sudoers.d/cephadm is not needed for cephadm to
work.

Fixes: https://tracker.ceph.com/issues/47112
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-03 16:31:30 +02:00
Venky Shankar
ad4e611924 ceph.spec, debian: changes for building cephfs-mirror daemon
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-09-02 06:50:08 -04:00
Jason Dillaman
74a3b4c312 rbd-nbd: quisce hook should be installed to /usr/libexec/...
The rbd-nbd daemon expects the rbd-nbd_quiesce script to be installed
in the libexec directory on all distros.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-07-14 12:09:39 -04:00
Neal Gompa
79d4bf5b2f debian: Use /usr/libexec for libexecdir
Debian has adopted FHS 3.0 with Debian Policy Standard version 4.4.0,
and now defaults to /usr/libexec for libexecdir as well. This is
present in Ubuntu 20.04 LTS, for example.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-06-08 13:15:04 -04:00
Mykola Golub
8b6e38a6bf rpm,deb: add quiesce hook script to rbd-nbd package
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-05-09 16:36:49 +01:00
Sage Weil
01015f8ca3 debian: add ceph-grafana-dashboards package
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-23 20:13:19 -05:00
Kefu Chai
5fc657b40d cmake: drop WITH_PYTHON2 option
* drop WITH_PYTHON2 option
* print warning message if WITH_PYTHON3 is disabled
* drop MGR_PYTHON_VERSION option, as we don't support use different
  python version for python binding and ceph-mgr embedded python
  interpreter anymore. as before switching to python3-only build,
  we can build python3 and python2 python bindings, and ceph-mgr
  can use either of them. but after switching to python3-only
  build, ceph-mgr has to use whatever python version used to
  build python binding.
* move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr
  and python binding will share this option.
* hardware ${PYTHON_VERSION} to 3
* hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3
* only build boost library with python3
* s/Python_EXECUTABLE/Python3_EXECUTABLE/
* update the build scripts and packagings accordingly
* rename all cython${PYTHON_VERSION}_* targets to cython_*
* update distutils_install_module() so it does not take python_version
  parameter anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 10:58:58 +08:00
Alfredo Deza
4b2b066217 debian: add mgr python versions
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 13:06:54 -06:00
Alfredo Deza
f317453c02 debian: explicitly set PYTHON2=OFF to prevent picking up python2 interpreter
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 13:06:54 -06:00
Alfredo Deza
adae1ac89a debian: remove all python2 overrides and declarations
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 13:04:57 -06:00
Sage Weil
c8750b7066 files,rpm,deb: rename ceph-daemon -> cephadm
This is just renaming the files and adjusting the packages.  Lots of
cleanup to do still.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-11 19:14:09 -06:00
Sage Weil
660233935e rpm,deb: add cephdaemon user and sudoers file
Signed-off-by: Sage Weil <sage@redhat.com>
2019-11-21 15:34:07 -06:00
Thomas Bechtold
4258c4772a ceph-daemon: Move ceph-daemon executable to own directory
Moving ceph-daemon into src/ceph-daemon/ makes it simpler to add extra
code (eg. tox.ini, README, unittests, ...) specific to ceph-daemon.
That way related files are in a single directory.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-11-08 17:05:57 +01:00
Kefu Chai
6eef7d002a debian/rules: run dh_python2 with ceph-daemon
to set substitute variable of `${python:Depends}` for this package

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-01 15:01:17 +08:00
Sage Weil
ae4bed49cf debian: ceph-daemon package, required by ceph-mgr-ssh
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-04 20:33:35 -05:00
Sebastian Wagner
ea15a67b98 ceph.spec, debian: Add python-common to ceph-common
Co-authored-by: Tim Serong <tserong@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-07-26 12:10:52 +02:00
Kefu Chai
4fed8e6111
Merge pull request #28788 from hjwsm1989/cleanup-debian
debian: remove dup ceph-fuse line

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-07-04 00:33:14 +08:00
huangjun
d81284ba3d debian: remove dup ceph-fuse line
Signed-off-by: huangjun <huangjun@xsky.com>
2019-06-29 15:58:50 +08:00
Kefu Chai
e5f00d2fdc debian/: use ceph-osd for packaging crimson-osd
* debian/: remove ceph-crimson-osd package.
* debian/control: set `CEPH_OSD_BASENAME` env variable, which
  will be consumed by `ceph-osd.install`. alternatively, we could
  rename crimson-osd to ceph-osd in `override_dh_auto_install`,
  but let's go with this way at this moment, unless `mv` in
  `override_dh_auto_install` is proved to be better.
* ceph-osd.install: replace ceph-osd with crimson-osd if
  `CEPH_EXTRA_CMAKE_ARGS` has `WITH_SEASTAR` in it. this only
  happens when we are packaging the "crimson" flavor packages from
  jenkins.
* ceph-osd.install: `chmod +x` this file, as we need to use
  `/usr/bin/dh-exec` as the interpreter of it to perform variable
  substitution and install.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-13 23:06:59 +08:00
Yuan Zhou
9466d70985 build/ops: adding build spec for immutable object cache daemon
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
2019-03-22 00:16:26 +08:00