diff --git a/roles/bodhi2/base/templates/configmap.yml b/roles/bodhi2/base/templates/configmap.yml index 6549768f4b..5200053894 100644 --- a/roles/bodhi2/base/templates/configmap.yml +++ b/roles/bodhi2/base/templates/configmap.yml @@ -35,6 +35,78 @@ data: {% endif %} .stg.fedoraproject.org = STG.FEDORAPROJECT.ORG stg.fedoraproject.org = STG.FEDORAPROJECT.ORG + start.sh: |- + mkdir /httpdir/run + ln -s /etc/httpd/modules /httpdir/modules + truncate --size=0 /httpdir/accesslog /httpdir/errorlog + httpd -f /etc/bodhi/httpd.conf -DFOREGROUND -DNO_DETACH + httpd.conf: |- + Listen 0.0.0.0:8080 + ServerRoot "/httpdir" + PidFile "/httpdir/httpd.pid" + + LoadModule authn_file_module modules/mod_authn_file.so + LoadModule authn_anon_module modules/mod_authn_anon.so + LoadModule authz_user_module modules/mod_authz_user.so + LoadModule authz_host_module modules/mod_authz_host.so + LoadModule include_module modules/mod_include.so + LoadModule log_config_module modules/mod_log_config.so + LoadModule env_module modules/mod_env.so + LoadModule ext_filter_module modules/mod_ext_filter.so + LoadModule expires_module modules/mod_expires.so + LoadModule headers_module modules/mod_headers.so + LoadModule mime_module modules/mod_mime.so + LoadModule status_module modules/mod_status.so + LoadModule negotiation_module modules/mod_negotiation.so + LoadModule dir_module modules/mod_dir.so + LoadModule alias_module modules/mod_alias.so + LoadModule rewrite_module modules/mod_rewrite.so + LoadModule version_module modules/mod_version.so + LoadModule wsgi_module modules/mod_wsgi.so + LoadModule authn_core_module modules/mod_authn_core.so + LoadModule authz_core_module modules/mod_authz_core.so + LoadModule unixd_module modules/mod_unixd.so + LoadModule mpm_prefork_module modules/mod_mpm_prefork.so + + + AllowOverride None + Require all granted + + + AllowOverride None + Require all granted + + + + Require all granted + + + Header set Cache-Control public + ExpiresDefault "access plus 1 month" + Header unset ETag + + + Header set Cache-Control public + ExpiresDefault "access plus 1 month" + Header unset ETag + + + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + CustomLog /httpdir/accesslog combined + ErrorLog /httpdir/errorlog + LogLevel info + TypesConfig /etc/mime.types + AddDefaultCharset UTF-8 + CoreDumpDirectory /tmp + + Alias /docs /usr/share/doc/bodhi-docs/html/ + Alias /static /usr/lib/python2.7/site-packages/bodhi/server/static/ + WSGIDaemonProcess bodhi user=bodhi group=bodhi display-name=bodhi processes=2 threads=2 maximum-requests=1000 + WSGISocketPrefix run/wsgi + WSGIRestrictStdout Off + WSGIRestrictSignal Off + WSGIPythonOptimize 1 + WSGIScriptAlias / /usr/share/bodhi/bodhi.wsgi production.ini: |- {%- macro production_ini() %} {% include "production.ini.j2" %}{%- endmacro -%} {{ production_ini() | indent() }} diff --git a/roles/openshift-apps/bodhi/files/deploymentconfig.yml b/roles/openshift-apps/bodhi/files/deploymentconfig.yml index ccc55ec0e0..c7b580364a 100644 --- a/roles/openshift-apps/bodhi/files/deploymentconfig.yml +++ b/roles/openshift-apps/bodhi/files/deploymentconfig.yml @@ -43,8 +43,8 @@ items: - name: keytab-volume mountPath: /etc/keytabs readOnly: true - - name: cache-volume - mountPath: /var/cache/bodhi + - name: httpdir-volume + mountPath: /httpdir - name: fedmsg-config-volume mountPath: /etc/bodhi-fedmsg.d readOnly: true @@ -73,7 +73,7 @@ items: - name: keytab-volume secret: secretName: bodhi-keytab - - name: cache-volume + - name: httpdir-volume emptyDir: {} - name: fedmsg-config-volume configMap: diff --git a/roles/openshift-apps/bodhi/templates/buildconfig.yml b/roles/openshift-apps/bodhi/templates/buildconfig.yml index 9d107312d8..da8646a56e 100644 --- a/roles/openshift-apps/bodhi/templates/buildconfig.yml +++ b/roles/openshift-apps/bodhi/templates/buildconfig.yml @@ -35,7 +35,7 @@ items: RUN ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab EXPOSE 8080 ENV USER=openshift - ENTRYPOINT gunicorn --bind 0.0.0.0:8080 --access-logfile=- --workers=10 --max-requests=10000 bodhiwsgi + ENTRYPOINT bash /etc/bodhi/start.sh type: Dockerfile strategy: type: Docker