adding resultsdb-stg01 host, resultsdb-stg group, resultsdb backend and frontend roles

This commit is contained in:
Tim Flink 2014-06-05 03:22:07 +00:00
parent 4f9806ff3c
commit 61152b0522
12 changed files with 252 additions and 0 deletions

View file

@ -0,0 +1,25 @@
- name: ensure packages required for resultsdb are installed
action: yum name={{ item }} state=latest
with_items:
- resultsdb
- mod_wsgi
- name: ensure database is created
delegate_to: "{{ resultsdb_db_host }}"
sudo_user: postgres
action: postgresql_db db={{ resultsdb_db_name }}
- name: ensure resultsdb user has access to database
delegate_to: "{{ resultsdb_db_host }}"
sudo_user: postgres
action: postgresql_user db={{ resultsdb_db_name }} user={{ resultsdb_db_user }} password={{ resultsdb_db_password }} role_attr_flags=NOSUPERUSER
- name: generate resultsdb config
template: src=settings.py.j2 dest=/etc/resultsdb/settings.py owner=root group=root mode=0644
notify:
- restart httpd
- name: generate resultsdb apache config
template: src=resultsdb.conf.j2 dest=/etc/httpd/conf.d/resultsdb.conf owner=root group=root mode=0644
notify:
- restart httpd

View file

@ -0,0 +1,30 @@
WSGIDaemonProcess resultsdb user=apache group=apache threads=5
WSGIScriptAlias {{ resultsdb_endpoint }} /usr/share/resultsdb/resultsdb.wsgi
WSGISocketPrefix run/wsgi
# this isn't the best way to force SSL but it works for now
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/resultsdb/admin/?(.*) https://%{SERVER_NAME}/$1 [R,L]
<Directory /usr/share/resultsdb>
WSGIProcessGroup resultsdb
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_auth_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
#Alias /resultsdb/static /var/www/resultsdb/resultsdb/static
#<Directory /var/www/resultsdb/resultsdb/static>
#Order allow,deny
#Allow from all
#</Directory>

View file

@ -0,0 +1,6 @@
SECRET_KEY = '{{ resultsdb_secret_key }}'
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://{{ resultsdb_db_user }}:{{ resultsdb_db_password }}@{{ resultsdb_db_host }}:{{ resultsdb_db_port }}/{{ resultsdb_db_name }}'
FILE_LOGGING = False
LOGFILR = '/var/log/resultsdb/resultsdb.log'
SYSLOG_LOGGING = False
STREAM_LOGGING = True