Merge lp:~james-w/pkgme-service/nondev-config into lp:pkgme-service

Proposed by James Westby
Status: Merged
Approved by: James Westby
Approved revision: 90
Merged at revision: 88
Proposed branch: lp:~james-w/pkgme-service/nondev-config
Merge into: lp:pkgme-service
Diff against target: 88 lines (+13/-11)
5 files modified
README (+2/-2)
dev_config/manifests/pkgme_service.pp (+4/-4)
dev_config/templates/celeryd.default.erb (+1/-1)
dev_config/templates/nondev_credentials.cfg.erb (+0/-1)
django_project/settings.py (+6/-3)
To merge this branch: bzr merge lp:~james-w/pkgme-service/nondev-config
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+104589@code.launchpad.net

Description of the change

Hi,

Steve found that calling the files for non-dev environments "production" was confusing,
as it's also the name of one specific deployment.

This changes the files to be "nondev" and updates references.

There's also a drive-by to remove the optional and discouraged "instance_id" argument
for the oops datedir repo in the dev config.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Great! Thanks!

Please add a (greppable) comment about the 'production-credentials' backwards compat thing and land.

review: Approve
89. By James Westby

Add a comment as a reminder to remove the compat code. Thanks jml.

90. By James Westby

Fix the PYTHONPATH for the pkgme-devportal rename.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2012-01-24 23:21:32 +0000
+++ README 2012-05-03 21:16:19 +0000
@@ -6,7 +6,7 @@
6Setting up for production6Setting up for production
7=========================7=========================
88
9First copy django_project/production_credentials.cfg.example to9First copy django_project/nondev_credentials.cfg.example to
10django_project/production_credentials.cfg and then edit the file to10django_project/nondev_credentials.cfg and then edit the file to
11specify appropriate values.11specify appropriate values.
1212
1313
=== modified file 'dev_config/manifests/pkgme_service.pp'
--- dev_config/manifests/pkgme_service.pp 2012-02-27 12:28:05 +0000
+++ dev_config/manifests/pkgme_service.pp 2012-05-03 21:16:19 +0000
@@ -47,8 +47,8 @@
47 require => Exec["psql-create-database-$postgres_database"],47 require => Exec["psql-create-database-$postgres_database"],
48}48}
4949
50file { "$::basedir/django_project/production_credentials.cfg":50file { "$::basedir/django_project/nondev_credentials.cfg":
51 content => template("production_credentials.cfg.erb"),51 content => template("nondev_credentials.cfg.erb"),
52 owner => $unix_user,52 owner => $unix_user,
53 group => $unix_user,53 group => $unix_user,
54 mode => 640,54 mode => 640,
@@ -99,7 +99,7 @@
99 path => ["/usr/bin"],99 path => ["/usr/bin"],
100 user => $unix_user,100 user => $unix_user,
101 require => [101 require => [
102 File["$::basedir/django_project/production_credentials.cfg"],102 File["$::basedir/django_project/nondev_credentials.cfg"],
103 File["$::basedir/pkgme.log"],103 File["$::basedir/pkgme.log"],
104 File["$::basedir/django.log"],104 File["$::basedir/django.log"],
105 ],105 ],
@@ -119,7 +119,7 @@
119file { "$::basedir/django_project/django.wsgi":119file { "$::basedir/django_project/django.wsgi":
120 content => template("django.wsgi.erb"),120 content => template("django.wsgi.erb"),
121 require => [121 require => [
122 File["$::basedir/django_project/production_credentials.cfg"],122 File["$::basedir/django_project/nondev_credentials.cfg"],
123 ]123 ]
124}124}
125125
126126
=== modified file 'dev_config/templates/celeryd.default.erb'
--- dev_config/templates/celeryd.default.erb 2012-01-18 23:45:14 +0000
+++ dev_config/templates/celeryd.default.erb 2012-05-03 21:16:19 +0000
@@ -13,4 +13,4 @@
1313
14CELERYD_GROUP="pkgme"14CELERYD_GROUP="pkgme"
1515
16export PYTHONPATH=<%= basedir %>:<%= basedir %>/src:<%= basedir %>/sourcecode/pkgme:<%= basedir %>/sourcecode/pkgme-binary16export PYTHONPATH=<%= basedir %>:<%= basedir %>/src:<%= basedir %>/sourcecode/pkgme:<%= basedir %>/sourcecode/pkgme-devportal
1717
=== renamed file 'dev_config/templates/production_credentials.cfg.erb' => 'dev_config/templates/nondev_credentials.cfg.erb'
--- dev_config/templates/production_credentials.cfg.erb 2012-02-28 16:23:17 +0000
+++ dev_config/templates/nondev_credentials.cfg.erb 2012-05-03 21:16:19 +0000
@@ -57,5 +57,4 @@
57[oops_datedir_publisher]57[oops_datedir_publisher]
58type = datedir58type = datedir
59error_dir = <%= basedir %>/oopses59error_dir = <%= basedir %>/oopses
60instance_id = production
61only_new = True60only_new = True
6261
=== renamed file 'django_project/production.cfg' => 'django_project/nondev.cfg'
=== renamed file 'django_project/production_credentials.cfg.example' => 'django_project/nondev_credentials.cfg.example'
=== modified file 'django_project/settings.py'
--- django_project/settings.py 2012-02-28 15:31:53 +0000
+++ django_project/settings.py 2012-05-03 21:16:19 +0000
@@ -38,9 +38,12 @@
38 return True38 return True
39 return False39 return False
4040
41# Used to choose between production and dev settings.41# Used to choose between dev and non-dev settings.
42if not add_if_present('production_credentials.cfg', also_add='production.cfg'):42if not add_if_present('nondev_credentials.cfg', also_add='nondev.cfg'):
43 add_if_present('dev.cfg')43 # TODO: remove the production_credentials.cfg fallback once it is no
44 # longer in use on production. It's left here now to ease rollouts.
45 if not add_if_present('production_credentials.cfg', also_add='nondev.cfg'):
46 add_if_present('dev.cfg')
4447
45# Used to override settings in tests.48# Used to override settings in tests.
46test_settings_path = os.environ.get('DJPKGME_TEST_SETTINGS_PATH', None)49test_settings_path = os.environ.get('DJPKGME_TEST_SETTINGS_PATH', None)

Subscribers

People subscribed via source and target branches