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/files/gen-cert.sh b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh
new file mode 100644
index 0000000..480266f
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+PEM="/etc/ssl/certs/nginx/cert.pem"
+
+if [ ! -f $PEM ]; then
+    openssl req -x509 -sha256 -newkey rsa:2048 -keyout $PEM -out $PEM \
+    -days 3650 -subj "/O=openbmc-project.xyz/CN=localhost" \
+    -nodes
+fi