From d41a88c582c9d2df00514ba530ce7fa0c39f683a Mon Sep 17 00:00:00 2001 From: Mike Tigas Date: Fri, 6 Feb 2015 23:05:14 -0500 Subject: [PATCH] fix SSL errors! 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 & some other stuff, see: * http://stackoverflow.com/a/18579484 * kennethreitz/requests#1347 --- fabfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fabfile.py b/fabfile.py index c79e214..f2aeb0f 100644 --- a/fabfile.py +++ b/fabfile.py @@ -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') @@ -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])