stx-monitoring: restructure into standalnoe recipes

Signed-off-by: babak sarashki <babak.sarashki@windriver.com>
This commit is contained in:
babak sarashki
2020-05-16 10:56:20 -07:00
parent e847ef732a
commit dbb6b3430b
5 changed files with 44 additions and 94 deletions

View File

@@ -13,9 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
PACKAGES += " collectd-extensions"
require monitoring-common.inc
RDEPENDS_collectd-extensions += " \
S = "${S_DIR}/collectd-extensions/src"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
RDEPENDS_${PN}_append += " \
systemd \
collectd \
fm-api \
@@ -25,13 +30,6 @@ RDEPENDS_collectd-extensions += " \
tsconfig \
"
do_configure_append () {
:
}
do_compile_append() {
:
}
local_unit_dir = "${sysconfdir}/systemd/system"
local_plugin_dir = "${sysconfdir}/collectd.d"
@@ -41,7 +39,6 @@ local_config_extensions_dir = "/opt/collectd/extensions/config"
do_install_append() {
cd ${S}/collectd-extensions/src
install -m 755 -d ${D}/${sysconfdir}
install -m 755 -d ${D}/${local_unit_dir}
install -m 755 -d ${D}/${local_plugin_dir}
@@ -81,7 +78,11 @@ do_install_append() {
}
FILES_collectd-extensions = " \
FILES_${PN}_append = " \
${local_python_extensions_dir} \
${local_config_extensions_dir} \
"
_FILES_collectd-extensions = " \
${local_unit_dir}/collectd.service \
${local_config_extensions_dir}/collectd.conf.pmon \
${local_python_extensions_dir}/fm_notifier.py \
@@ -105,3 +106,6 @@ FILES_collectd-extensions = " \
${local_plugin_dir}/ptp.conf \
${local_plugin_dir}/ovs_interface.conf \
"
#SYSTEMD_PACKAGES += "${PN}"
#SYSTEMD_SERVICE_${PN}= "collectd.service"

View File

@@ -13,26 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
PACKAGES += " influxdb-extensions"
require monitoring-common.inc
RDEPENDS_influxdb-extensions += " \
S = "${S_DIR}/influxdb-extensions/src"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
RDEPENDS_${PN} += " \
systemd \
python-influxdb \
"
do_configure_append () {
:
}
do_compile_append() {
:
}
local_unit_dir = "${sysconfdir}/systemd/system"
do_install_append() {
cd ${S}/influxdb-extensions/src
install -m 755 -d ${D}/${sysconfdir}
install -m 755 -d ${D}/${local_unit_dir}
install -m 755 -d ${D}/${sysconfdir}/influxdb
@@ -42,7 +39,5 @@ do_install_append() {
install -m 600 influxdb.conf.pmon ${D}/${sysconfdir}/influxdb
}
FILES_influxdb-extensions = " \
${local_unit_dir}/influxdb.service \
${sysconfdir}/influxdb \
"
#SYSTEMD_PACKAGES += "${PN}"
#SYSTEMD_SERVICE_${PN} = "influxdb.service"

View File

@@ -13,30 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
PACKAGES += " monitor-tools"
require monitoring-common.inc
# RDEPENDS_monitor-tools += " initscripts-config"
S = "${S_DIR}/monitor-tools/scripts"
do_configure_append () {
:
}
do_compile_append() {
:
}
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
do_install_append() {
cd ${S}/monitor-tools/scripts
install -m 755 -d ${D}/${bindir}
# support files ; service and pmon conf
install -m 644 memtop ${D}/${bindir}
install -m 600 schedtop ${D}/${bindir}
install -m 600 occtop ${D}/${bindir}
}
FILES_monitor-tools = " \
${bindir}/memtop \
${bindir}/schedtop \
${bindir}/occtop \
"

View File

@@ -19,51 +19,28 @@ PROTOCOL = "https"
BRANCH = "r/stx.3.0"
SRCNAME = "monitoring"
SRCREV = "8befe1720b02c5e1e3ddf637947643b9b0a0f96f"
S = "${WORKDIR}/git"
S_DIR = "${WORKDIR}/git"
PV = "1.0.0"
LICENSE = "Apache-2.0"
#LICENSE = "Apache-2.0"
# TODO:
#3b83ef96387f14655fc854ddc3c6bd57 ./collectd-extensions/src/LICENSE
#3b83ef96387f14655fc854ddc3c6bd57 ./influxdb-extensions/src/LICENSE
#3b83ef96387f14655fc854ddc3c6bd57 ./monitor-tools/LICENSE
#3b83ef96387f14655fc854ddc3c6bd57 ./monitor-tools/scripts/LICENSE
#3b83ef96387f14655fc854ddc3c6bd57 ./vm-topology/vm-topology/LICENSE
LIC_FILES_CHKSUM = "file://collectd-extensions/src/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
#LIC_FILES_CHKSUM = "file://collectd-extensions/src/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = "git://opendev.org/starlingx/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
DEPENDS += " \
python \
python-pbr-native \
stx-metal \
stx-fault \
mtce \
fm-common \
json-c \
openssl \
libevent \
libgcc \
"
require collectd-extensions.inc
require influxdb-extensions.inc
require monitor-tools.inc
require vm-topology.inc
do_configure () {
:
}
do_compile() {
:
}
do_install () {
:
}
pkg_postinst_ontarget_${PN} () {
}
FILES_${PN} = " "
#require monitor-tools.inc
#require vm-topology.inc

View File

@@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
PACKAGES += " vm-topology"
require monitoring-common.inc
RDEPENDS_vm-topology += " \
S = "${S_DIR}/vm-topology/vm-topology"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
RDEPENDS_${PN}_append = " \
python \
libvirt \
python-keyring \
@@ -26,24 +32,4 @@ DEPENDS += " \
libvirt \
"
inherit setuptools distutils python-dir
do_configure_append () {
cd ${S}/vm-topology/vm-topology
distutils_do_configure
}
do_compile_append() {
cd ${S}/vm-topology/vm-topology
distutils_do_compile
}
do_install_append() {
cd ${S}/vm-topology/vm-topology
distutils_do_install
}
FILES_vm-topology = " \
${bindir}/vm-topology \
${PYTHON_SITEPACKAGES_DIR}/ \
"
inherit setuptools python-dir