diff --git a/recipes-cloud/amazon-cloudwatch-publisher/amazon-cloudwatch-publisher_1.2.4.bb b/recipes-cloud/amazon-cloudwatch-publisher/amazon-cloudwatch-publisher_1.2.4.bb index 32b50518d..228d39ced 100644 --- a/recipes-cloud/amazon-cloudwatch-publisher/amazon-cloudwatch-publisher_1.2.4.bb +++ b/recipes-cloud/amazon-cloudwatch-publisher/amazon-cloudwatch-publisher_1.2.4.bb @@ -1,44 +1,47 @@ -# -*- mode: Conf; -*- +SUMMARY = "amazon cloudwatch publisher" DESCRIPTION = "Push metrics and logs to CloudWatch from any system that can run Python" HOMEPAGE = "https://github.com/awslabs/amazon-cloudwatch-publisher" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" -RDEPENDS:${PN} += " \ - python3-boto3 \ - python3-psutil \ - python3-requests \ - python3-timeloop \ -" +BRANCH ?= "main" + +SRC_URI = "\ + git://github.com/awslabs/${BPN};branch=${BRANCH};protocol=https \ + file://run-ptest \ + " +SRCREV = "9feebfa9facb6bfddade737de7a90bfbfd65cf6e" +S = "${WORKDIR}/git" -inherit systemd +inherit systemd ptest SYSTEMD_SERVICE:${PN} = "${BPN}.service" SYSTEMD_AUTO_ENABLE = "enable" -FILES:${PN} += " \ - ${systemd_system_unitdir}/${BPN}.service \ - /opt/aws/${BPN}/${BPN} \ - /opt/aws/${BPN}/etc/.gitkeep \ - /opt/aws/${BPN}/logs/.gitkeep \ +FILES:${PN} += "\ + ${systemd_system_unitdir}/${BPN}.service \ + /opt/aws/${BPN}/${BPN} \ + /opt/aws/${BPN}/etc/.gitkeep \ + /opt/aws/${BPN}/logs/.gitkeep \ " -BRANCH ?= "main" - -SRC_URI += "git://github.com/awslabs/${BPN};branch=${BRANCH};protocol=https" -SRCREV = "9feebfa9facb6bfddade737de7a90bfbfd65cf6e" -S = "${WORKDIR}/git" +RDEPENDS:${PN} += "\ + python3-boto3 \ + python3-psutil \ + python3-requests \ + python3-timeloop \ +" do_install() { - install -d ${D}${systemd_system_unitdir} - install -d ${D}/opt/aws/${BPN}/etc - touch ${D}/opt/aws/${BPN}/etc/.gitkeep - install -d ${D}/opt/aws/${BPN}/logs - touch ${D}/opt/aws/${BPN}/logs/.gitkeep - install -m 744 ${BPN} ${D}/opt/aws/${BPN}/ - - # TODO: user and group should be cwpublisher/wheel - cat <<-EOF > ${D}${systemd_system_unitdir}/${BPN}.service + install -d ${D}${systemd_system_unitdir} + install -d ${D}/opt/aws/${BPN}/etc + touch ${D}/opt/aws/${BPN}/etc/.gitkeep + install -d ${D}/opt/aws/${BPN}/logs + touch ${D}/opt/aws/${BPN}/logs/.gitkeep + install -m 744 ${BPN} ${D}/opt/aws/${BPN}/ + + # TODO: user and group should be cwpublisher/wheel + cat <<-EOF > ${D}${systemd_system_unitdir}/${BPN}.service [Unit] Description=Push metrics and logs to CloudWatch from any system that can run Python DefaultDependencies=no diff --git a/recipes-cloud/amazon-cloudwatch-publisher/files/run-ptest b/recipes-cloud/amazon-cloudwatch-publisher/files/run-ptest new file mode 100644 index 000000000..1b46a8c39 --- /dev/null +++ b/recipes-cloud/amazon-cloudwatch-publisher/files/run-ptest @@ -0,0 +1,15 @@ +#!/bin/sh +set -euxo pipefail + +cd /opt/aws/amazon-cloudwatch-publisher + +./amazon-cloudwatch-publisher & +sleep 30 +grep "Instance ID is" /opt/aws/amazon-cloudwatch-publisher/logs/amazon-cloudwatch-publisher.log + +RETVAL=$? +if [ $RETVAL -eq 0 ] ; then + echo "PASS: amazon-cloudwatch-publisher: startup test" +else + echo "FAIL: amazon-cloudwatch-publisher: startup test" +fi diff --git a/recipes-external/python3-timeloop/python3-timeloop_1.0.2.bb b/recipes-external/python3-timeloop/python3-timeloop_1.0.2.bb index 88b5e6c3f..09d254787 100644 --- a/recipes-external/python3-timeloop/python3-timeloop_1.0.2.bb +++ b/recipes-external/python3-timeloop/python3-timeloop_1.0.2.bb @@ -1,15 +1,14 @@ SUMMARY = "Timeloop" -DESCRIPTION = "" -HOMEPAGE = "" +DESCRIPTION = "An elegant periodic task executor " +HOMEPAGE = "https://github.com/sankalpjonn/timeloop" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=030635eb18c38d9fd120c13a324721b7" -inherit setuptools3 - SRC_URI = "git://github.com/sankalpjonn/timeloop.git;protocol=https;branch=master" SRCREV = "36ec5cbb133a6dcfb5316f59b5e11765c14e62c2" S = "${WORKDIR}/git" -RDEPENDS:${PN} += "python3-core" +inherit setuptools3 +RDEPENDS:${PN} += "python3-core"