Use apache instead of mbs-frontend

This commit is contained in:
Jakub Kadlčík 2017-01-24 15:44:42 +01:00 committed by Miroslav Suchý
parent 2937f0dd71
commit ebe8c8ee0b
4 changed files with 29 additions and 13 deletions

View file

@ -10,16 +10,8 @@ Alias /robots.txt /var/www/html/robots.txt
# Needs to be above WSGIScriptAlias / # Needs to be above WSGIScriptAlias /
# @TODO With this configuration it needs to be accessed via [1] instead of [2] # http://stackoverflow.com/a/9690110
# [1] http://127.0.0.1:8080/module-build-service/module-build-service/1/module-builds/ IncludeOptional /etc/httpd/conf/vhost[s]/mbs/mbs.conf
# [2] http://127.0.0.1:8080/module-build-service/1/module-builds/
WSGIDaemonProcess module-build-service user=mbs group=mbs threads=15 display-name=module-build-service
WSGIScriptAlias /module-build-service /usr/share/copr/coprs_frontend/mbs
<Location /module-build-service>
WSGIProcessGroup module-build-service
</Location>
WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other
WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api

View file

@ -0,0 +1,18 @@
# Needs to be above WSGIScriptAlias /
# @TODO With this configuration it needs to be accessed via [1] instead of [2]
# [1] http://127.0.0.1:8080/module-build-service/module-build-service/1/module-builds/
# [2] http://127.0.0.1:8080/module-build-service/1/module-builds/
WSGIDaemonProcess module-build-service user=mbs group=mbs threads=15 display-name=module-build-service
WSGIScriptAlias /module-build-service /opt/module-build-service/mbs.wsgi
<Location /module-build-service>
WSGIProcessGroup module-build-service
</Location>
<Directory /opt/module-build-service>
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
RewriteEngine On
RewriteRule ^/module/(.*)$ /module-build-service/module-build-service/$1 [PT]

View file

@ -1,2 +1,4 @@
- include: "{{ handlers }}/restart_services.yml"
- name: daemon reload - name: daemon reload
command: systemctl daemon-reload command: systemctl daemon-reload

View file

@ -128,9 +128,13 @@
- name: Copy mbs.wsgi file - name: Copy mbs.wsgi file
copy: src=mbs.wsgi dest=/opt/module-build-service/mbs.wsgi copy: src=mbs.wsgi dest=/opt/module-build-service/mbs.wsgi
# @FIXME Use apache instead - name: Create vhosts directory
- name: Run mbs-frontend file: path=/etc/httpd/conf/vhosts/mbs state=directory
shell: nohup mbs-frontend < /dev/null >& /tmp/mbs-frontend.out &
- name: Copy httpd/mbs.conf to vhosts directory
copy: src=httpd/mbs.conf dest=/etc/httpd/conf/vhosts/mbs/mbs.conf
notify: reload httpd
# Only for testing purposes # Only for testing purposes