Add Nginx as a external facing reverse proxy
Ultimate goal is to allow anyone to add one or more http services.
Doing this still allows other groups to not be required to use
them
https://lists.ozlabs.org/pipermail/openbmc/2017-September/009231.html
Also note, this commit launches nginx on 8081. Once advice on
how to get it to launch I'll be moving it to 443 and gevent to
8081.
Initially this will only be used in the meta-ibm layer.
Signed-off-by: Chris Austen <austenc@us.ibm.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I34b076898469f2fa9a0186ca3fb3abc77ae52fe7
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/nginx_%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/nginx_%.bbappend
new file mode 100644
index 0000000..8a58341
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/nginx_%.bbappend
@@ -0,0 +1,33 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+inherit systemd
+inherit obmc-phosphor-systemd
+
+SRC_URI += " \
+ file://nginx.conf \
+ file://nginx.service \
+ file://gen-cert.sh \
+ "
+
+EXTRA_OECONF =+ " --without-select_module"
+
+SSLCERTPATH = "/etc/ssl/certs/nginx/"
+
+
+do_install_append() {
+
+ install -m 644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx
+ install -m 0755 ${WORKDIR}/gen-cert.sh ${D}${sbindir}/gen-cert.sh
+
+ install -d ${D}${SSLCERTPATH}
+ chown -R www:www-data ${D}${SSLCERTPATH}
+
+
+ echo SSLCERTPATH
+ echo ${SSLCERTPATH}
+ sed -i 's,@CERTPATH@,${SSLCERTPATH},g' ${D}${sysconfdir}/nginx/nginx.conf
+}
+
+FILES_${PN} += " ${SSLCERTPATH} "
+
+SYSTEMD_SERVICE_${PN} += " nginx.service"