diff --git a/confluent_osdeploy/confluent-osdeploy.conf b/confluent_osdeploy/confluent-osdeploy.conf new file mode 100644 index 00000000..047751b8 --- /dev/null +++ b/confluent_osdeploy/confluent-osdeploy.conf @@ -0,0 +1,16 @@ +LoadModule proxy_http_module modules/mod_proxy_http.so +SetEnvIf Request_URI "^/confluent-api/nodes/.*/console/session$" dontlog +Alias /confluent-public /var/lib/confluent/public + + AllowOverride None + Require all granted + Options +Indexes +FollowSymLinks + + + + ProxyPass http://127.0.0.1:4005 retry=0 + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + +TraceEnable off diff --git a/confluent_osdeploy/confluent-osdeploy.conf.sles b/confluent_osdeploy/confluent-osdeploy.conf.sles new file mode 100644 index 00000000..61f4560f --- /dev/null +++ b/confluent_osdeploy/confluent-osdeploy.conf.sles @@ -0,0 +1,18 @@ +LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so +LoadModule proxy_http_module /usr/lib64/apache2-prefork/mod_proxy_http.so +LoadModule allowmethods_module /usr/lib64/apache2-prefork/mod_allowmethods.so +LoadModule headers_module /usr/lib64/apache2-prefork/mod_headers.so +SetEnvIf Request_URI "^/confluent-api/nodes/.*/console/session$" dontlog +Alias /confluent-public /var/lib/confluent/public + + AllowOverride None + Require all granted + Options +Indexes +FollowSymLinks + + + ProxyPass http://127.0.0.1:4005 retry=0 + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + +TraceEnable off diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index 7436c334..c8845595 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -7,7 +7,13 @@ License: Apache2 URL: http://hpc.lenovo.com/ Source0: confluent_osdeploy.tar.xz BuildArch: noarch -Requires: confluent_ipxe mtools + +%define is_rh 0%{?el6:1}%{?el7:1}%{?el8:1} +%if %is_rh +Requires: confluent_ipxe mtools httpd mod_ssl +%else +Requires: confluent_ipxe mtools apache2 +%endif BuildRoot: /tmp %description @@ -54,6 +60,20 @@ for os in rhvh4 el8 suse15 ubuntu20.04 esxi6 esxi7; do cp ${os}out/addons.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs cp -a $os/profiles/* %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles done +%if %is_rh +mkdir -p %{buildroot}/etc/httpd/conf.d +mv confluent-osdeploy.conf %{buildroot}/etc/httpd/conf.d/ +%else +mkdir -p %{buildroot}/etc/apache2/conf.d +mv confluent-osdeploy.conf.sles %{buildroot}/etc/apache2/conf.d/confluent-osdeploy.conf +%endif + %files /opt/confluent/lib/osdeploy +%if %is_rh +/etc/httpd/conf.d/confluent-osdeploy.conf +%else +/etc/apache2/conf.d/confluent-osdeploy.conf +%endif +