Add phosphor-gevent recipe
And make it the default for Phosphor.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I531aa457bcc0fae4d4fff833fb1815a12af53edc
diff --git a/common/recipes-phosphor/interfaces/phosphor-gevent.bb b/common/recipes-phosphor/interfaces/phosphor-gevent.bb
new file mode 100644
index 0000000..91fea10
--- /dev/null
+++ b/common/recipes-phosphor/interfaces/phosphor-gevent.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Phosphor Rocket startup script"
+DESCRIPTION = "Phosphor Rocket startup script."
+HOMEPAGE = "http://github.com/openbmc/phosphor-rest-server"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit allarch
+inherit setuptools
+inherit obmc-phosphor-systemd
+
+PROVIDES += "virtual/obmc-wsgihost"
+RPROVIDES_${PN} += "virtual-obmc-wsgihost"
+
+RDEPENDS_${PN} += " \
+ python-gevent \
+ "
+SRC_URI += "git://github.com/openbmc/phosphor-rest-server"
+
+SRCREV = "7bc6d8d39daebe3529c4c31a8caa0288dfb0ecd5"
+
+S = "${WORKDIR}/git/servers/gevent"
+
+SYSTEMD_SERVICE_${PN} += "${PN}.service ${PN}.socket"
diff --git a/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service
new file mode 100644
index 0000000..e5dd707
--- /dev/null
+++ b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Phosphor Webserver
+PartOf=systemd-networkd.service
+After=phosphor-gevent.socket
+
+[Service]
+Restart=always
+ExecStart={sbindir}/phosphor-gevent $APPLICATION
+Environment="PYTHONUNBUFFERED=1"
+EnvironmentFile={envfiledir}/obmc/wsgi_app
diff --git a/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket
new file mode 100644
index 0000000..ed066e6
--- /dev/null
+++ b/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Phosphor Webserver socket
+PartOf=systemd-networkd.service
+
+[Socket]
+ListenStream=443
+
+[Install]
+WantedBy=sockets.target
diff --git a/common/recipes-phosphor/interfaces/phosphor-rest.bb b/common/recipes-phosphor/interfaces/phosphor-rest.bb
index b03b245..a44258f 100644
--- a/common/recipes-phosphor/interfaces/phosphor-rest.bb
+++ b/common/recipes-phosphor/interfaces/phosphor-rest.bb
@@ -23,7 +23,7 @@
"
SRC_URI += "git://github.com/openbmc/phosphor-rest-server"
-SRCREV = "2c6fc760919cc214413874d60489e3643b639692"
+SRCREV = "7bc6d8d39daebe3529c4c31a8caa0288dfb0ecd5"
S = "${WORKDIR}/git/module"
SYSTEMD_SERVICE_${PN} = ""
diff --git a/common/recipes-phosphor/interfaces/phosphor-rocket.bb b/common/recipes-phosphor/interfaces/phosphor-rocket.bb
index 0d93f23..9e95315 100644
--- a/common/recipes-phosphor/interfaces/phosphor-rocket.bb
+++ b/common/recipes-phosphor/interfaces/phosphor-rocket.bb
@@ -17,6 +17,6 @@
"
SRC_URI += "git://github.com/openbmc/phosphor-rest-server"
-SRCREV = "2c6fc760919cc214413874d60489e3643b639692"
+SRCREV = "7bc6d8d39daebe3529c4c31a8caa0288dfb0ecd5"
S = "${WORKDIR}/git/servers/rocket"
diff --git a/conf/distro/include/phosphor-defaults.inc b/conf/distro/include/phosphor-defaults.inc
index a99ad66..3cff3f6 100644
--- a/conf/distro/include/phosphor-defaults.inc
+++ b/conf/distro/include/phosphor-defaults.inc
@@ -7,3 +7,5 @@
OBMC_POWER_BUTTON_INSTANCES ?= "0"
OBMC_BMC_INSTANCES ?= "0"
OBMC_FAN_INSTANCES ?= ""
+
+PREFERRED_PROVIDER_virtual/obmc-wsgihost ?= "phosphor-gevent"