diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2018-07-16 23:01:49 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-07-24 19:22:48 +0300 |
commit | eee186a2a002fe2e91615c2291722f5c248b7c36 (patch) | |
tree | 613424d7b23bb2f4efc15f610c2ac9555ecac9aa | |
parent | 6dce5b62e6c0fb8e88b5e4272a3f426f377b811b (diff) | |
download | openbmc-eee186a2a002fe2e91615c2291722f5c248b7c36.tar.xz |
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>
5 files changed, 32 insertions, 1 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/nginx.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/nginx.conf index 74010f9db..89e575af5 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/nginx.conf +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/nginx.conf @@ -87,6 +87,10 @@ http { proxy_pass http://127.0.0.1:8081; } + location /redfish { + proxy_pass http://127.0.0.1:8082; + proxy_http_version 1.1; + } include /etc/nginx/sites-enabled/443_*.conf; } diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb.bbappend new file mode 100644 index 000000000..b41a1b010 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/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/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.service b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.service new file mode 100644 index 000000000..832eb0491 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/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/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/bmcweb/bmcweb/bmcweb.socket new file mode 100644 index 000000000..40e68975c --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/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 diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend index 7b61d8c09..0b0a9c9f2 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -1,2 +1,2 @@ RDEPENDS_${PN}-logging += "ibm-logging" -RDEPENDS_${PN}-extras += "nginx" +RDEPENDS_${PN}-extras += "nginx bmcweb" |