diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/interfaces')
16 files changed, 234 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb.bb new file mode 100644 index 0000000000..c0f53251f6 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb.bb @@ -0,0 +1,34 @@ +inherit obmc-phosphor-systemd +inherit useradd + +USERADD_PACKAGES = "${PN}" + +# add a user called httpd for the server to assume +USERADD_PARAM_${PN} = "-r -s /usr/sbin/nologin bmcweb" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENCE;md5=a6a4edad4aed50f39a66d098d74b265b" + +SRC_URI = "git://github.com/openbmc/bmcweb.git" + +PV = "1.0+git${SRCPV}" +SRCREV = "a38b0b206300c792979b900f506b85e535f5708a" + +S = "${WORKDIR}/git" + +DEPENDS = "openssl zlib boost libpam sdbusplus gtest nlohmann-json libtinyxml2 " + +FILES_${PN} += "${datadir}/** " + +inherit cmake + +EXTRA_OECMAKE = "-DBMCWEB_BUILD_UT=OFF -DYOCTO_DEPENDENCIES=ON" + +SYSTEMD_SERVICE_${PN} += "bmcweb.service bmcweb.socket" + +FULL_OPTIMIZATION = "-Os -pipe " + +do_install_append() { + rm -rf ${D}${includedir}/dbus + rm -rf ${D}${libdir}/cmake +} diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service new file mode 100644 index 0000000000..86a7279a50 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.service @@ -0,0 +1,13 @@ +[Unit] +Description=Start bmcweb server + +Wants=network.target +After=network.target + +[Service] +ExecStart={bindir}/bmcweb +Type=simple +WorkingDirectory=/home/root + +[Install] +WantedBy=network.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket new file mode 100644 index 0000000000..b1db27d475 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/bmcweb.socket @@ -0,0 +1,9 @@ +[Unit] +Description=BMC Webserver socket + +[Socket] +ListenStream=883 +ReusePort=true + +[Install] +WantedBy=sockets.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent.bb b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent.bb new file mode 100644 index 0000000000..0150571208 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent.bb @@ -0,0 +1,21 @@ +SUMMARY = "python-gevent startup script" +DESCRIPTION = "python-gevent startup script." +PR = "r1" + +inherit allarch +inherit setuptools +inherit obmc-phosphor-systemd + +require phosphor-rest.inc + +PROVIDES += "virtual/obmc-wsgihost" +RPROVIDES_${PN} += "virtual-obmc-wsgihost" + +RDEPENDS_${PN} += " \ + python-gevent \ + " +RRECOMMENDS_${PN} += "python-gevent-websocket" + +S = "${WORKDIR}/git/servers/gevent" + +SYSTEMD_SERVICE_${PN} += " ${PN}.service ${PN}.socket" diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service new file mode 100644 index 0000000000..2dfc4cc10f --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Phosphor Webserver +After=phosphor-gevent.socket +After=obmc-webserver-pre.target + +[Service] +Restart=always +ExecStart=/usr/bin/env phosphor-gevent $APPLICATION +SyslogIdentifier=phosphor-gevent +Environment="PYTHONUNBUFFERED=1" +EnvironmentFile={envfiledir}/obmc/wsgi_app diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket new file mode 100644 index 0000000000..1ee86da087 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Phosphor Webserver socket + +[Socket] +ListenStream=443 + +[Install] +WantedBy=sockets.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.bb b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.bb new file mode 100644 index 0000000000..f18e55caa8 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.bb @@ -0,0 +1,42 @@ +SUMMARY = "Phosphor DBUS to REST WSGI Application" +DESCRIPTION = "Phosphor DBUS to REST WSGI Application." +PR = "r1" + +inherit allarch +inherit obmc-phosphor-systemd +inherit setuptools +inherit obmc-phosphor-discovery-service + +require phosphor-rest.inc + +RRECOMMENDS_${PN} += " \ + virtual-obmc-wsgihost \ + python-gevent-websocket \ + " + +RDEPENDS_${PN} += " \ + python-xml \ + python-dbus \ + phosphor-mapper \ + python-bottle \ + python-spwd \ + pyphosphor-utils \ + pyphosphor-dbus \ + pyphosphor-wsgi-apps-ns \ + " +SRC_URI += "file://url_config.json \ + " + +FILES_${PN}_append = " ${datadir}/rest-dbus/url_config.json" + +S = "${WORKDIR}/git/module" +SYSTEMD_SERVICE_${PN} = "" +SYSTEMD_OVERRIDE_${PN} += "rest-dbus.conf:obmc-mapper.target.d/rest-dbus.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/wsgi_app" +REGISTERED_SERVICES_${PN} += "phosphor_rest:tcp:443" + +do_install_append(){ + install -d ${D}${datadir}/rest-dbus + install -m 0644 -D ${WORKDIR}/url_config.json \ + ${D}${datadir}/rest-dbus/url_config.json +} diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.inc b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.inc new file mode 100644 index 0000000000..46aeb8bb56 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest.inc @@ -0,0 +1,7 @@ +HOMEPAGE = "http://github.com/openbmc/phosphor-rest-server" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" + +SRC_URI += "git://github.com/openbmc/phosphor-rest-server" +SRCREV = "6691e7ca4e2adf52bac1fc3a82ed35adfce4349c" + diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/obmc/wsgi_app b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/obmc/wsgi_app new file mode 100644 index 0000000000..7bbffe74ef --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/obmc/wsgi_app @@ -0,0 +1 @@ +APPLICATION=rest_dbus diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/rest-dbus.conf b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/rest-dbus.conf new file mode 100644 index 0000000000..a92f0f1ecf --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/rest-dbus.conf @@ -0,0 +1,3 @@ +[Unit] +Wants=obmc-webserver-pre.target +Before=obmc-webserver-pre.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/url_config.json b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/url_config.json new file mode 100644 index 0000000000..d11b555b95 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/phosphor-rest/url_config.json @@ -0,0 +1,13 @@ +{ + "urls": [ + "/org/openbmc/*", + "/xyz/openbmc_project/*", + "/enumerate", + "/list", + "/login", + "/logout", + "/subscribe", + "/upload/image", + "/download/dump/*" + ] +} diff --git a/meta-phosphor/recipes-phosphor/interfaces/rest-dbus.bb b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus.bb new file mode 100644 index 0000000000..9d4217b7ad --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus.bb @@ -0,0 +1,25 @@ +SUMMARY = "Phosphor OpenBMC REST framework" +DESCRIPTION = "Phosphor OpenBMC REST to DBUS daemon." +HOMEPAGE = "http://github.com/openbmc/rest-dbus" +PR = "r1" + +inherit allarch +inherit obmc-phosphor-license +inherit obmc-phosphor-systemd +inherit setuptools + +RDEPENDS_${PN} += " \ + python-netserver \ + python-json \ + python-dbus \ + python-xml \ + pyphosphor-dbus \ + " + +SYSTEMD_SERVICE_${PN} += "rest-dbus.service rest-dbus.socket" + +SRC_URI += "git://github.com/openbmc/rest-dbus.git" + +SRCREV = "3084b80c489c10b03207c8fb97d4437fd760f30d" + +S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service new file mode 100644 index 0000000000..9afd0c45d5 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.service @@ -0,0 +1,8 @@ +[Unit] +Description=Phosphor DBUS Browser + +[Service] +Restart=always +ExecStart=/usr/bin/env rest-dbus +SyslogIdentifier=rest-dbus +Environment="PYTHONUNBUFFERED=1" diff --git a/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket new file mode 100644 index 0000000000..7ab1959256 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/rest-dbus/rest-dbus.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Phosphor DBUS Browser socket + +[Socket] +ListenStream=3000 + +[Install] +WantedBy=sockets.target diff --git a/meta-phosphor/recipes-phosphor/interfaces/slpd-lite.bb b/meta-phosphor/recipes-phosphor/interfaces/slpd-lite.bb new file mode 100644 index 0000000000..608796b360 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/slpd-lite.bb @@ -0,0 +1,19 @@ +SUMMARY = "Lightweight SLP Server" +DESCRIPTION = "Lightweight Unicast-only SLP Server" +HOMEPAGE = "http://github.com/openbmc/slpd-lite" +PR = "r1" + +inherit autotools pkgconfig +inherit obmc-phosphor-license +inherit obmc-phosphor-systemd + +SYSTEMD_SERVICE_${PN} += "slpd-lite.service" + +DEPENDS += "systemd" +DEPENDS += "autoconf-archive-native" + +SRC_URI += "git://github.com/openbmc/slpd-lite" + +SRCREV = "1f12e3805a69e8f7e5dada4b40e5c0860938a227" + +S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service b/meta-phosphor/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service new file mode 100644 index 0000000000..5d587093f3 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/interfaces/slpd-lite/slpd-lite.service @@ -0,0 +1,12 @@ +[Unit] +Description=Lightweight SLP Server + +After=network.target + +[Service] +ExecStart=/usr/bin/env slpd +SyslogIdentifier=slpd +Restart=always + +[Install] +WantedBy={SYSTEMD_DEFAULT_TARGET} |