Skip to content

Commit

Permalink
fix SSL errors!
Browse files Browse the repository at this point in the history
per https://www.ssllabs.com/ssltest/analyze.html?d=congress.api.sunlightfoundation.com&hideResults=on , sunlight's servers are configured such that only TLS clients that support SNI (basically having multiple SSL domain names supported within one ip address) can access the API server.

unfortunately, most (all?) installs of python 2.7.8 and earlier don't support SNI. but support can be enabled by installing pyopenssl <https://github.com/pyca/pyopenssl> & some other stuff, see:

* http://stackoverflow.com/a/18579484
* kennethreitz/requests#1347
  • Loading branch information
mtigas committed Feb 7, 2015
1 parent 488c902 commit d41a88c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setup():
"""
require('hosts')
require('path')
sudo('aptitude install -y nginx python-setuptools postgresql-client libpq-dev python-dev uwsgi uwsgi-plugin-python')
sudo('aptitude install -y nginx python-setuptools postgresql-client libpq-dev python-dev uwsgi uwsgi-plugin-python libffi-dev')
sudo('easy_install -q pip')
sudo('pip install -q virtualenv')

Expand Down Expand Up @@ -82,7 +82,7 @@ def upload_tar_from_git():
def bootstrap_venv():
"Install the required packages from the requirements file using pip"
require('release', provided_by=[deploy, setup])
run('cd %(path)s/releases/%(release)s; virtualenv .; ./bin/pip install -UIq pip setuptools; ./bin/pip install -UI psycopg2; ./bin/pip install -UI -r requirements.txt' % env)
run('cd %(path)s/releases/%(release)s; virtualenv .; ./bin/pip install -UIq pip setuptools; ./bin/pip install -UI psycopg2 pyopenssl ndg-httpsclient pyasn1; ./bin/pip install -UI -r requirements.txt' % env)
def symlink_current_release():
"Symlink our current release"
require('release', provided_by=[deploy, setup])
Expand Down

0 comments on commit d41a88c

Please sign in to comment.