ceph rebase stx.3.0 patches

Reconfig build to enable ceph-mgr and python3
This commit is contained in:
Sar Ashki, Babak 2020-02-22 13:42:14 -08:00
parent d302973bb2
commit ae06d68746
6 changed files with 30 additions and 78 deletions

View File

@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/patches:${THISDIR}/files:"
inherit python3native python3-dir
SRC_URI += "\
file://ceph/0001-Add-hooks-for-orderly-shutdown-on-controller.patch \
file://ceph/0001-ceph-rebase-on-stx.3.0-and-warrior.patch \
file://ceph/ceph.conf \
file://ceph/ceph-init-wrapper.sh \
file://ceph/ceph-preshutdown.sh \
@ -15,16 +15,13 @@ SRC_URI += "\
file://ceph/ceph-radosgw.service \
file://ceph/ceph.sh \
file://ceph/mgr-restful-plugin.service \
file://ceph/ceph-mon_config.sh \
file://ceph/ceph-mgr_manual.sh \
file://ceph/ceph-volume_manual.sh \
"
DEPENDS = "boost rdma-core bzip2 curl expat gperf-native \
keyutils libaio lz4 \
nspr nss oath openldap openssl \
python python3 python3-cython-native rocksdb snappy udev \
python3 python3-cython-native rocksdb snappy udev \
python-cython-native valgrind xfsprogs zlib \
rabbitmq-c \
"
RDEPENDS_${PN} += " rdma-core python3-core python3"
@ -37,19 +34,22 @@ EXTRA_OECMAKE = "-DWITH_MANPAGE=OFF \
-DWITH_BABELTRACE=OFF \
-DWITH_TESTS=OFF \
-DWITH_MGR=ON \
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
-DWITH_PYTHON2=OFF \
-DWITH_PYTHON3=ON \
-DMGR_PYTHON_VERSION=3 \
-DWITH_MGR_DASHBOARD_FRONTEND=OFF \
-DWITH_SYSTEM_BOOST=ON \
-DWITH_SYSTEM_ROCKSDB=ON \
-DWITH_RDMA=OFF \
-DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
"
# TODO: Should be fixed in either boost package or CMake files.
do_configure_prepend() {
ln -f -s ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python35.so \
${WORKDIR}/recipe-sysroot/usr/lib/libboost_python.so
}
#do_configure_prepend() {
# ln -f -s ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python35.so \
# ${WORKDIR}/recipe-sysroot/usr/lib/libboost_python.so
#}
do_install_append () {
install -d ${D}${sysconfdir}/ceph
install -m 0644 ${WORKDIR}/ceph/ceph.conf ${D}${sysconfdir}/ceph/
@ -81,7 +81,7 @@ do_install_append () {
install -m 0644 -D ${S}/COPYING ${D}${docdir}/ceph/COPYING
install -m 0644 -D ${S}/etc/sysctl/90-ceph-osd.conf ${D}${libdir}/sysctl.d/90-ceph-osd.conf
install -m 0644 -D ${S}/udev/50-rbd.rules ${D}${libdir}/udev/rules.d/50-rbd.rules
install -m 0644 -D ${S}/udev/60-ceph-by-parttypeuuid.rules ${D}${libdir}/udev/rules.d/60-ceph-by-parttypeuuid.rules
# install -m 0644 -D ${S}/udev/60-ceph-by-parttypeuuid.rules ${D}${libdir}/udev/rules.d/60-ceph-by-parttypeuuid.rules
mkdir -p ${D}${localstatedir}/ceph
#TODO:
@ -106,16 +106,16 @@ do_install_append () {
install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/rc.d/init.d/ceph
install -m 0750 -D ${B}/bin/init-ceph ${D}${sysconfdir}/init.d/ceph
install -d -m 0750 ${D}${localstatedir}/log/radosgw
install -d -m 0750 ${D}/home/root/cluster
cp ${WORKDIR}/ceph/ceph-mon_config.sh ${D}/home/root/cluster
cp ${WORKDIR}/ceph/ceph-mgr_manual.sh ${D}/home/root/cluster
cp ${WORKDIR}/ceph/ceph-volume_manual.sh ${D}/home/root/cluster
chmod 755 ${D}/home/root/cluster/*
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-disk
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-detect-init
sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume
sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume-systemd
# sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-disk
# sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-detect-init
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-crash
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-volume
sed -i -e 's:${WORKDIR}.*python3:${bindir}/python3:' ${D}${bindir}/ceph-volume-systemd
#sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume
#sed -i -e '1s:python$:python3:' ${D}${bindir}/ceph-volume-systemd
sed -i -e 's:/sbin/:/bin/:' ${D}${systemd_system_unitdir}/ceph-volume@.service
}

View File

@ -1,3 +1,8 @@
From 3763a20314ec2b80ec9d8525a1d3867b3c731266 Mon Sep 17 00:00:00 2001
From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
Date: Sat, 22 Feb 2020 04:48:04 -0800
Subject: [PATCH] ceph rebase on stx.3.0 and warrior
From 03340eaf0004e3cc8e3f8991ea96a46757d92830 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Sat, 26 Jan 2019 13:34:55 -0500
@ -5,18 +10,16 @@ Subject: [PATCH] Add hooks for orderly shutdown on controller
Hook the ceph init script to add systemd overrides to define
an orderly shutdown for StarlingX controllers.
Signed-off-by: Don Penney <don.penney@windriver.com>
---
src/init-ceph.in | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/init-ceph.in b/src/init-ceph.in
index 1fdb4b3..515d818 100644
index 1843710..a31b900 100755
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -861,6 +861,38 @@ for name in $what; do
fi
@@ -434,6 +434,38 @@ for name in $what; do
continue
fi
+ . /etc/platform/platform.conf
@ -55,5 +58,5 @@ index 1fdb4b3..515d818 100644
[ -n "$lockfile" ] && [ "$?" -eq 0 ] && touch $lockfile
;;
--
1.8.3.1
2.23.0

View File

@ -1,2 +0,0 @@
ceph-mds --cluster ceph -i starlingx-host-aio/keyring -m 10.30.0.110:6789

View File

@ -1,13 +0,0 @@
#!/bin/bash
mkdir -p /var/lib/ceph/mgr/ceph-starlingx-host-aio
chown ceph:ceph /var/lib/ceph/mgr
chown ceph:ceph /var/lib/ceph/mgr/ceph-starlingx-host-aio
ceph auth get-or-create mgr.starlingx-host-aio mon 'allow profile mgr' osd ' allow *' mds ' allow *'
#systemctl enable ceph-mgr@starlingx-host-aio
systemctl start ceph-mgr@starlingx-host-aio
sleep 4
ceph mgr module enable status
ceph mgr module enable dashboard
ceph dashboard create-self-signed-cert
ceph dashboard set-login-credentials sysadmin sysadmin

View File

@ -1,28 +0,0 @@
#!/bin/bash
rm -rf /tmp/ceph.mon.keyring /etc/ceph/ceph.client.admin.keyring /tmp/monmap
rm -rf /var/lib/ceph/mon/ceph-starlingx-host-aio
mkdir -p /var/lib/ceph/mon/ceph-starlingx-host-aio
mkdir -p /var/lib/ceph/mon/ceph-starlingx-host-aio
mkdir -p /var/run/ceph
chown ceph:ceph /var/run/ceph
ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring \
--gen-key -n client.admin --set-uid=0 --cap mon 'allow *' \
--cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring \
--gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
monmaptool --create --add starlingx-host-aio 10.30.0.109 --fsid b4fb230f-a5e7-4d72-ba62-ecc8c7dacac5 /tmp/monmap
chown -R ceph:ceph /tmp/monmap
chown -R ceph:ceph /var/lib/ceph/mon/ceph-starlingx-host-aio
chown -R ceph:ceph /tmp/ceph.mon.keyring
sudo -u ceph ceph-mon --mkfs -i starlingx-host-aio --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
sudo -u ceph touch /var/lib/ceph/mon/ceph-starlingx-host-aio/done
systemctl enable ceph-mon@starlingx-host-aio
systemctl start ceph-mon@starlingx-host-aio

View File

@ -1,8 +0,0 @@
#!/bin/bash
ceph-volume lvm create --data /dev/sda12
OSDFSID=$(ceph-volume lvm list | sed -n -e "s/^.*osd fsid.* \([a-z0-9].*$\)/\1/pg")
ceph-volume lvm create --filestore --data /dev/sda12 --journal /dev/sda13
systemctl enable ceph-volume@lvm-0-$OSDFSID
#ceph-volume lvm activate 0 $OSDFSID
#ceph-volume lvm activate 0 $OSDFSID