Set up Trac 1.0.1 for testing.
This commit is contained in:
parent
d9b35a72fc
commit
54e6599a1b
3 changed files with 57 additions and 0 deletions
10
files/gitlab/trac-vhost.conf
Normal file
10
files/gitlab/trac-vhost.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName trac-dev.cloud.fedoraproject.org
|
||||
WSGIScriptAlias / /srv/www/trac/trac.wsgi
|
||||
|
||||
<Directory /srv/www/trac/trac.wsgi>
|
||||
WSGIProcessGroup %{GLOBAL}
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Directory>
|
||||
</VirtualHost>
|
15
files/gitlab/trac.wsgi
Normal file
15
files/gitlab/trac.wsgi
Normal file
|
@ -0,0 +1,15 @@
|
|||
import __main__
|
||||
if hasattr(__main__, '__requires__'):
|
||||
if isinstance(__main__.__requires__, basestring):
|
||||
__main__.__requires__ = [__main__.__requires__]
|
||||
else:
|
||||
__main__.__requires__ = []
|
||||
__main__.__requires__.append('Trac')
|
||||
|
||||
import os
|
||||
|
||||
os.environ['TRAC_ENV_PARENT_DIR'] = '/srv/www/trac/projects'
|
||||
os.environ['PYTHON_EGG_CACHE'] = '/var/cache/trac'
|
||||
|
||||
import trac.web.main
|
||||
application = trac.web.main.dispatch_request
|
|
@ -281,3 +281,35 @@
|
|||
|
||||
- name: Start PHD daemons
|
||||
action: command chdir=/srv/www/facebook/phabricator ./bin/phd start
|
||||
|
||||
- name: Set up Trac 1.0.1
|
||||
user: root
|
||||
hosts: gitlab-dev.cloud.fedoraproject.org
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
|
||||
- name: Install dependencies
|
||||
yum: state=present name=$item
|
||||
with_items:
|
||||
- git
|
||||
- subversion
|
||||
- httpd
|
||||
- python-setuptools
|
||||
- python-genshi
|
||||
- python-pip
|
||||
- mod_wsgi
|
||||
|
||||
- name: Grab latest Trac via pip.
|
||||
pip: name=trac
|
||||
|
||||
- name: Directory structure
|
||||
file: state=directory path=/srv/www/trac
|
||||
|
||||
- name: Trac WSGI File
|
||||
template: src=$files/gitlab/trac.wsgi dest=/srv/www/trac/trac.wsgi
|
||||
|
||||
- name: Apache config
|
||||
template: src=$files/trac-vhost.conf dest=/etc/httpd/conf.d/trac.conf
|
||||
|
||||
- name: Apache restart
|
||||
command: service httpd restart
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue