Closed Bug 1171704 Opened 10 years ago Closed 10 years ago

Move apache + wsgi control to ansible and venv

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bkero, Unassigned)

Details

Attachments

(3 files, 1 obsolete file)

We should be running hgweb from python2.7. Although python2.7 is installed, the system needs to be told to use it. This work moves control of the apache vhost file and wsgi.conf from Puppet to Ansible.
Bug 1171704: Add apache vhost file, copy into place, tell apache to use the virtualenv as pythonhome and use the virtualenv's mod_wsgi.so
Comment on attachment 8615592 [details] MozReview Request: Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27 Bug 1171704: Add apache vhost file, copy into place, tell apache to use the virtualenv as pythonhome and use the virtualenv's mod_wsgi.so
Attachment #8615592 - Flags: review?(gps)
Comment on attachment 8615592 [details] MozReview Request: Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27 https://reviewboard.mozilla.org/r/10299/#review9017 I'm not sure if we're ready to switch over to the 2.7 virtualenv quite yet. It might be safer to do a 1:1 port of Puppet to Ansible first, get that deployed, then focus on moving to run hgweb from the virtualenv. Whatever happens, we definitely need to test the virtualenv pieces manually before we roll that out, as our automated coverage for the actual environment on hgweb is somewhat limited ATM. ::: ansible/roles/hg-web/files/hg-vhost.conf:3 (Diff revision 1) > +# PUPPET MANAGED! Do not edit! > +# $Id$ > +# Lies! ::: ansible/roles/hg-web/files/hg-vhost.conf:20 (Diff revision 1) > + WSGIDaemonProcess hg.mozilla.org processes=48 threads=1 maximum-requests=20 deadlock-timeout=60 inactivity-timeout=300 user=hg group=hg display-name=hg.mozilla.org Process count needs to be derived from number of CPUs. Use whatever Puppet is using. ::: ansible/roles/hg-web/files/hg-vhost.conf:15 (Diff revision 1) > + RewriteRule ^/(.*)index.cgi/?(.*) http://hg.mozilla.org/$1$2 I think it's harmless to change this to https:// while we are here. There is already a bug open on 301'ing http://hg.mozilla.org/ to https://. ::: ansible/roles/hg-web/files/hg-vhost.conf:41 (Diff revision 1) > + <Location /users> > + Options +Indexes > + Order allow,deny > + Allow from all > + </Location> Please indent while you are here.
Attachment #8615592 - Flags: review?(gps)
Comment on attachment 8615592 [details] MozReview Request: Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27 Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27
Attachment #8615592 - Attachment description: MozReview Request: Bug 1171704: Add apache vhost file, copy into place, tell apache to use the virtualenv as pythonhome and use the virtualenv's mod_wsgi.so → MozReview Request: Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27
Attachment #8615592 - Flags: review?(gps)
Comment on attachment 8615592 [details] MozReview Request: Bug 1171704: ansible: hg-web: support wsgi usage of venv and py27 https://reviewboard.mozilla.org/r/10299/#review10021 This diff isn't well-formatted. I think you submitted the wrong commit?
Attachment #8615592 - Flags: review?(gps)
Attachment #8615592 - Attachment is obsolete: true
Bug 1171704: ansible/hgweb: switch hgweb wsgi to venv
Attachment #8627355 - Flags: review?(gps)
Comment on attachment 8627355 [details] MozReview Request: Bug 1171704: ansible/hgweb: switch hgweb wsgi to venv https://reviewboard.mozilla.org/r/12211/#review10701 LGTM. This reminds me that I'd like to write tons of tests for the hgmo environment. Right now test coverage for hgweb is lacking. But this would require a way to run Python 2.7 in those CentOS 6 Docker containers...
Attachment #8627355 - Flags: review?(gps) → review+
This work is done.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Bug 1171704: ansible/hgweb: switch hgweb wsgi to venv
Attachment #8671570 - Flags: review?(gps)
Upgrade Bugsy to v0.6.0 (Bug 1212856) r?gps Changelog: * Update flake8 config to only check the correct items. * Fix flake8 errors. * Move final requests to use central request and handler methods * Add more tests for resiliency against HTTP errors during API requests * Remove support for Python 2.6. I won't be actively working against it but won't be mindful of errors * Update error handling for the majority of cases so that it is handled centrally * Clean up imports of tests * Remove duplication in Exception handling * Move Errors to their own file and update imports for others. * Move JSON handling into request method * Use correct response HTTP code for Bugzilla error handling tests
Attachment #8671571 - Flags: review?(gps)
Attachment #8671570 - Flags: review?(gps)
Attachment #8671571 - Flags: review?(gps)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: