Switch bodhi on openshift from gunicorn to httpd
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
2839525202
commit
af327709d3
3 changed files with 76 additions and 4 deletions
|
@ -35,6 +35,78 @@ data:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
.stg.fedoraproject.org = STG.FEDORAPROJECT.ORG
|
.stg.fedoraproject.org = STG.FEDORAPROJECT.ORG
|
||||||
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
|
||||||
|
|
||||||
|
<Directory "/usr/share/doc/bodhi-docs/html/">
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
<Directory "/usr/lib/python2.7/site-packages/bodhi/server/static/">
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Location />
|
||||||
|
Require all granted
|
||||||
|
</Location>
|
||||||
|
<Location /docs/>
|
||||||
|
Header set Cache-Control public
|
||||||
|
ExpiresDefault "access plus 1 month"
|
||||||
|
Header unset ETag
|
||||||
|
</Location>
|
||||||
|
<Location /static/>
|
||||||
|
Header set Cache-Control public
|
||||||
|
ExpiresDefault "access plus 1 month"
|
||||||
|
Header unset ETag
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
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: |-
|
production.ini: |-
|
||||||
{%- macro production_ini() %} {% include "production.ini.j2" %}{%- endmacro -%}
|
{%- macro production_ini() %} {% include "production.ini.j2" %}{%- endmacro -%}
|
||||||
{{ production_ini() | indent() }}
|
{{ production_ini() | indent() }}
|
||||||
|
|
|
@ -43,8 +43,8 @@ items:
|
||||||
- name: keytab-volume
|
- name: keytab-volume
|
||||||
mountPath: /etc/keytabs
|
mountPath: /etc/keytabs
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: cache-volume
|
- name: httpdir-volume
|
||||||
mountPath: /var/cache/bodhi
|
mountPath: /httpdir
|
||||||
- name: fedmsg-config-volume
|
- name: fedmsg-config-volume
|
||||||
mountPath: /etc/bodhi-fedmsg.d
|
mountPath: /etc/bodhi-fedmsg.d
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -73,7 +73,7 @@ items:
|
||||||
- name: keytab-volume
|
- name: keytab-volume
|
||||||
secret:
|
secret:
|
||||||
secretName: bodhi-keytab
|
secretName: bodhi-keytab
|
||||||
- name: cache-volume
|
- name: httpdir-volume
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: fedmsg-config-volume
|
- name: fedmsg-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
|
|
|
@ -35,7 +35,7 @@ items:
|
||||||
RUN ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
|
RUN ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi{{ env_suffix }}.fedoraproject.org.keytab
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENV USER=openshift
|
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
|
type: Dockerfile
|
||||||
strategy:
|
strategy:
|
||||||
type: Docker
|
type: Docker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue