Add bmcweb to meta-ibm layer for redfish support
Put behind nginx and only activate when /redfish is
queried via https.
Testing: Verified that with this change in bmcweb:
https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/11518/
that redfish commands can successfully be sent via nginx
on the witherspoon qemu model.
Change-Id: I97509dc3484deffd06c3d60db710eb3b17dfccb5
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/recipes-phosphor/bmcweb/bmcweb.bbappend b/recipes-phosphor/bmcweb/bmcweb.bbappend
new file mode 100644
index 0000000..b41a1b0
--- /dev/null
+++ b/recipes-phosphor/bmcweb/bmcweb.bbappend
@@ -0,0 +1,10 @@
+SUMMARY = "Modifications to support Nginx"
+
+# Behind NGINX so disable SSL in bmcweb
+EXTRA_OECMAKE += "-DBMCWEB_INSECURE_DISABLE_SSL=ON"
+
+# Only need redfish support
+EXTRA_OECMAKE += "-DBMCWEB_ENABLE_KVM=OFF -DBMCWEB_ENABLE_DBUS_REST=OFF -DBMCWEB_ENABLE_PHOSPHOR_WEBUI=OFF"
+
+# override service and socket file to use nginx
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/recipes-phosphor/bmcweb/bmcweb/bmcweb.service b/recipes-phosphor/bmcweb/bmcweb/bmcweb.service
new file mode 100644
index 0000000..832eb04
--- /dev/null
+++ b/recipes-phosphor/bmcweb/bmcweb/bmcweb.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=BMC Redfish Server (bmcweb)
+After=network.target
+After=obmc-webserver-pre.target
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/env bmcweb
+SyslogIdentifier=bmcweb
diff --git a/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket b/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket
new file mode 100644
index 0000000..40e6897
--- /dev/null
+++ b/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Phosphor redfish socket (bmcweb)
+
+[Socket]
+ListenStream=127.0.0.1:8082
+
+[Install]
+WantedBy=sockets.target