Merge lp:~james-w/python-oops-tools/prod-deploy into lp:python-oops-tools

Proposed by James Westby
Status: Merged
Approved by: James Westby
Approved revision: 54
Merged at revision: 53
Proposed branch: lp:~james-w/python-oops-tools/prod-deploy
Merge into: lp:python-oops-tools
Diff against target: 101 lines (+22/-4)
5 files modified
buildout-templates/src/oopstools/settings.py.in (+14/-1)
production.cfg.example (+2/-1)
setup.py (+2/-0)
src/oopstools/urls.py (+3/-2)
versions.cfg (+1/-0)
To merge this branch: bzr merge lp:~james-w/python-oops-tools/prod-deploy
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve
Review via email: mp+138571@code.launchpad.net

Commit message

Add django_openid_auth.

Our production deployment hacks things such that django_openid_auth is used.
This adds it for real.

In addition it adds the common pattern of allowing a local_settings.py
that overrides values in settings.py so that prod can configure things like
the SSO server and the team mappings.

Description of the change

Hi,

This is a step towards cleaning up the prod deploy.

Currently prod runs non-trunk code as it changes a couple of files
to add openid support.

This branch adds the basic support for openid, and allows for configuration
in prod without having to change versioned files. The commit message
has more rationale about the individual changes.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) :
review: Approve
Revision history for this message
Launchpad PQM Bot (launchpad-pqm) wrote :

The attempt to merge lp:~james-w/python-oops-tools/prod-deploy into lp:python-oops-tools failed.Below is the output from the failed tests.

find . -type f -name '*.py[co]' -exec rm -f {} \;
rm -f bin/buildout
rm -f src/oopstools/settings.py
bzr clean-tree --unknown --force
bzr up download-cache
python bootstrap.py \
  --setup-source=download-cache/ez_setup.py \
  --download-base=download-cache/dist --eggs=eggs
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/buildout'.
bin/buildout configuration:db-port=5433
Develop: '/home/pqm/pqm-workdir/oops-tools/.'
Couldn't find index page for 'django-openid-auth' (maybe misspelled?)
Getting distribution for 'django-openid-auth==0.4'.

W: line 4 [buildbot-staging]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 2 [pqm]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 3 [pqm-oops-tools]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 1 [precise]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
I: [pqm-oops-tools chroot] Running command: "cd /home/pqm/pqm-workdir/oops-tools && make check"
Nothing to delete.
Tree is up to date at revision 533 of branch http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk
While:
  Installing.
  Getting section filetemplates.
  Initializing part filetemplates.
  Getting distribution for 'django-openid-auth==0.4'.
Error: Couldn't find a distribution for 'django-openid-auth==0.4'.
make: *** [bin/buildout] Error 1

Revision history for this message
James Westby (james-w) wrote :

Oh yeah, I can't land this until we fix the filename of django-openid-auth in the download-cache.

Thanks,

James

Revision history for this message
Launchpad PQM Bot (launchpad-pqm) wrote :
Download full text (87.6 KiB)

The attempt to merge lp:~james-w/python-oops-tools/prod-deploy into lp:python-oops-tools failed.Below is the output from the failed tests.

find . -type f -name '*.py[co]' -exec rm -f {} \;
rm -f bin/buildout
rm -f src/oopstools/settings.py
bzr clean-tree --unknown --force
bzr up download-cache
python bootstrap.py \
  --setup-source=download-cache/ez_setup.py \
  --download-base=download-cache/dist --eggs=eggs
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/buildout'.
bin/buildout configuration:db-port=5433
Develop: '/home/pqm/pqm-workdir/oops-tools/.'
Getting distribution for 'django-openid-auth==0.4'.
zip_safe flag not set; analyzing archive contents...
Got django-openid-auth 0.4.
Uninstalling filetemplates.
Updating scripts.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/load_sample_data'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/prune'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/analyse_error_reports'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/dir_finder'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/amqp2disk'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/update_db'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/report'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/graph_report'.
Generated interpreter '/home/pqm/pqm-workdir/oops-tools/bin/py'.
Installing filetemplates.
Updating django.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/django'.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/test'.
Updating docs.
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/docs'.
Updating tags.
bin/test
Creating test database for alias 'default'...
Destroying test database for alias 'default'...

W: line 4 [buildbot-staging]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 2 [pqm]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 3 [pqm-oops-tools]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 1 [precise]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
I: [pqm-oops-tools chroot] Running command: "cd /home/pqm/pqm-workdir/oops-tools && make check"
Nothing to delete.
R dist/django-openid-auth_0.4.tar.gz => dist/django-openid-auth-0.4.tar.gz
All changes applied successfully.
Updated to revision 534 of branch http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk
F......F.....FFF.....................EEEEE
======================================================================
ERROR: test_inactive_report (test_report.ReportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pqm/pqm-workdir/oops-tools/src/oopstools/oops/test/test_report.py", line 39, in test_inactive_report
    resp = self.client.get('/reports/%s/' % (report_name...

54. By James Westby

Add python-openid as django_openid_auth doesn't depend on it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'buildout-templates/src/oopstools/settings.py.in'
--- buildout-templates/src/oopstools/settings.py.in 2012-09-23 00:52:28 +0000
+++ buildout-templates/src/oopstools/settings.py.in 2012-12-06 22:14:36 +0000
@@ -111,8 +111,9 @@
111 'django.contrib.sessions',111 'django.contrib.sessions',
112 'django.contrib.sites',112 'django.contrib.sites',
113 'django.contrib.admin',113 'django.contrib.admin',
114 'django_openid_auth',
114 'oopstools.oops',115 'oopstools.oops',
115 'south'116 'south',
116)117)
117118
118OOPS_WEB_AMQP_HOST = '${configuration:oops-web-amqp-host}'119OOPS_WEB_AMQP_HOST = '${configuration:oops-web-amqp-host}'
@@ -121,3 +122,15 @@
121OOPS_WEB_AMQP_VHOST = '${configuration:oops-web-amqp-vhost}'122OOPS_WEB_AMQP_VHOST = '${configuration:oops-web-amqp-vhost}'
122OOPS_WEB_AMQP_EXCHANGE = '${configuration:oops-web-amqp-exchange}'123OOPS_WEB_AMQP_EXCHANGE = '${configuration:oops-web-amqp-exchange}'
123OOPS_WEB_AMQP_ROUTING = '${configuration:oops-web-amqp-routing}'124OOPS_WEB_AMQP_ROUTING = '${configuration:oops-web-amqp-routing}'
125
126AUTHENTICATION_BACKENDS = (
127 'django.contrib.auth.backends.ModelBackend',
128 'django_openid_auth.auth.OpenIDBackend',
129)
130LOGIN_URL = '/openid/login/'
131LOGIN_REDIRECT_URL = '/admin/'
132
133try:
134 from oopstools.local_settings import *
135except ImportError:
136 pass
124137
=== renamed file 'production.cfg' => 'production.cfg.example'
--- production.cfg 2011-10-13 20:18:51 +0000
+++ production.cfg.example 2012-12-06 22:14:36 +0000
@@ -1,4 +1,5 @@
1# Buildout configuration for the production deployment1# Example Buildout configuration for a production deployment.
2# Rename the file to production.cfg and fill in the details.
2[buildout]3[buildout]
3extends = buildout.cfg4extends = buildout.cfg
45
56
=== modified file 'setup.py'
--- setup.py 2012-09-19 03:44:41 +0000
+++ setup.py 2012-12-06 22:14:36 +0000
@@ -51,6 +51,7 @@
51 install_requires=[51 install_requires=[
52 'BeautifulSoup',52 'BeautifulSoup',
53 'django',53 'django',
54 'django_openid_auth',
54 'fixtures',55 'fixtures',
55 'launchpadlib',56 'launchpadlib',
56 'lazr.config',57 'lazr.config',
@@ -60,6 +61,7 @@
60 'oops-wsgi',61 'oops-wsgi',
61 'oops-timeline',62 'oops-timeline',
62 'psycopg2',63 'psycopg2',
64 'python-openid',
63 'pytz',65 'pytz',
64 'setuptools',66 'setuptools',
65 'South',67 'South',
6668
=== modified file 'src/oopstools/urls.py'
--- src/oopstools/urls.py 2011-10-13 20:18:51 +0000
+++ src/oopstools/urls.py 2012-12-06 22:14:36 +0000
@@ -13,7 +13,7 @@
13# You should have received a copy of the GNU Affero General Public License13# You should have received a copy of the GNU Affero General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.14# along with this program. If not, see <http://www.gnu.org/licenses/>.
1515
16from django.conf.urls.defaults import *16from django.conf.urls.defaults import patterns, include, url
17from django.conf import settings17from django.conf import settings
1818
19# Uncomment the next two lines to enable the admin:19# Uncomment the next two lines to enable the admin:
@@ -24,7 +24,7 @@
24 # Example:24 # Example:
25 # (r'^oopstools/', include('oopstools.foo.urls')),25 # (r'^oopstools/', include('oopstools.foo.urls')),
2626
27 # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 27 # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
28 # to INSTALLED_APPS to enable admin documentation:28 # to INSTALLED_APPS to enable admin documentation:
29 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),29 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
3030
@@ -39,4 +39,5 @@
39 (r'^oops[.py]*/meta$', 'oopstools.oops.views.meta'),39 (r'^oops[.py]*/meta$', 'oopstools.oops.views.meta'),
40 (r'^oops/static/(?P<path>.*)$', 'django.views.static.serve',40 (r'^oops/static/(?P<path>.*)$', 'django.views.static.serve',
41 {'document_root': settings.STATIC_DOC_ROOT}),41 {'document_root': settings.STATIC_DOC_ROOT}),
42 url(r'^auth/', include('django_openid_auth.urls')),
42)43)
4344
=== modified file 'versions.cfg'
--- versions.cfg 2012-12-06 21:01:15 +0000
+++ versions.cfg 2012-12-06 22:14:36 +0000
@@ -14,6 +14,7 @@
14Sphinx = 1.0.714Sphinx = 1.0.7
15sqlparse = 0.1.315sqlparse = 0.1.3
16django = 1.3.316django = 1.3.3
17django-openid-auth = 0.4
17djangorecipe = 1.318djangorecipe = 1.3
18distribute = 0.6.1219distribute = 0.6.12
19docutils = 0.620docutils = 0.6

Subscribers

People subscribed via source and target branches

to all changes: