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

Proposed by James Westby on 2012-05-03
Status: Merged
Approved by: James Westby on 2012-05-03
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
To merge this branch: bzr merge lp:~james-w/pkgme-service/nondev-config
Reviewer Review Type Date Requested Status
Jonathan Lange (community) 2012-05-03 Approve on 2012-05-03
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.
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 on 2012-05-03

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

90. By James Westby on 2012-05-03

Fix the PYTHONPATH for the pkgme-devportal rename.

Preview Diff

1=== modified file 'README'
2--- README 2012-01-24 23:21:32 +0000
3+++ README 2012-05-03 21:16:19 +0000
4@@ -6,7 +6,7 @@
5 Setting up for production
6 =========================
7
8-First copy django_project/production_credentials.cfg.example to
9-django_project/production_credentials.cfg and then edit the file to
10+First copy django_project/nondev_credentials.cfg.example to
11+django_project/nondev_credentials.cfg and then edit the file to
12 specify appropriate values.
13
14
15=== modified file 'dev_config/manifests/pkgme_service.pp'
16--- dev_config/manifests/pkgme_service.pp 2012-02-27 12:28:05 +0000
17+++ dev_config/manifests/pkgme_service.pp 2012-05-03 21:16:19 +0000
18@@ -47,8 +47,8 @@
19 require => Exec["psql-create-database-$postgres_database"],
20 }
21
22-file { "$::basedir/django_project/production_credentials.cfg":
23- content => template("production_credentials.cfg.erb"),
24+file { "$::basedir/django_project/nondev_credentials.cfg":
25+ content => template("nondev_credentials.cfg.erb"),
26 owner => $unix_user,
27 group => $unix_user,
28 mode => 640,
29@@ -99,7 +99,7 @@
30 path => ["/usr/bin"],
31 user => $unix_user,
32 require => [
33- File["$::basedir/django_project/production_credentials.cfg"],
34+ File["$::basedir/django_project/nondev_credentials.cfg"],
35 File["$::basedir/pkgme.log"],
36 File["$::basedir/django.log"],
37 ],
38@@ -119,7 +119,7 @@
39 file { "$::basedir/django_project/django.wsgi":
40 content => template("django.wsgi.erb"),
41 require => [
42- File["$::basedir/django_project/production_credentials.cfg"],
43+ File["$::basedir/django_project/nondev_credentials.cfg"],
44 ]
45 }
46
47
48=== modified file 'dev_config/templates/celeryd.default.erb'
49--- dev_config/templates/celeryd.default.erb 2012-01-18 23:45:14 +0000
50+++ dev_config/templates/celeryd.default.erb 2012-05-03 21:16:19 +0000
51@@ -13,4 +13,4 @@
52
53 CELERYD_GROUP="pkgme"
54
55-export PYTHONPATH=<%= basedir %>:<%= basedir %>/src:<%= basedir %>/sourcecode/pkgme:<%= basedir %>/sourcecode/pkgme-binary
56+export PYTHONPATH=<%= basedir %>:<%= basedir %>/src:<%= basedir %>/sourcecode/pkgme:<%= basedir %>/sourcecode/pkgme-devportal
57
58=== renamed file 'dev_config/templates/production_credentials.cfg.erb' => 'dev_config/templates/nondev_credentials.cfg.erb'
59--- dev_config/templates/production_credentials.cfg.erb 2012-02-28 16:23:17 +0000
60+++ dev_config/templates/nondev_credentials.cfg.erb 2012-05-03 21:16:19 +0000
61@@ -57,5 +57,4 @@
62 [oops_datedir_publisher]
63 type = datedir
64 error_dir = <%= basedir %>/oopses
65-instance_id = production
66 only_new = True
67
68=== renamed file 'django_project/production.cfg' => 'django_project/nondev.cfg'
69=== renamed file 'django_project/production_credentials.cfg.example' => 'django_project/nondev_credentials.cfg.example'
70=== modified file 'django_project/settings.py'
71--- django_project/settings.py 2012-02-28 15:31:53 +0000
72+++ django_project/settings.py 2012-05-03 21:16:19 +0000
73@@ -38,9 +38,12 @@
74 return True
75 return False
76
77-# Used to choose between production and dev settings.
78-if not add_if_present('production_credentials.cfg', also_add='production.cfg'):
79- add_if_present('dev.cfg')
80+# Used to choose between dev and non-dev settings.
81+if not add_if_present('nondev_credentials.cfg', also_add='nondev.cfg'):
82+ # TODO: remove the production_credentials.cfg fallback once it is no
83+ # longer in use on production. It's left here now to ease rollouts.
84+ if not add_if_present('production_credentials.cfg', also_add='nondev.cfg'):
85+ add_if_present('dev.cfg')
86
87 # Used to override settings in tests.
88 test_settings_path = os.environ.get('DJPKGME_TEST_SETTINGS_PATH', None)

Subscribers

People subscribed via source and target branches