Merge lp:~jml/launchpad/codebrowse-port-config into lp:launchpad

Proposed by Jonathan Lange
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11748
Proposed branch: lp:~jml/launchpad/codebrowse-port-config
Merge into: lp:launchpad
Diff against target: 34 lines (+13/-2)
2 files modified
lib/canonical/config/schema-lazr.conf (+10/-0)
scripts/start-loggerhead.py (+3/-2)
To merge this branch: bzr merge lp:~jml/launchpad/codebrowse-port-config
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+38812@code.launchpad.net

Commit message

Codebrowse host and port are now configured with codebrowse.listen_host and codebrowse.port.

Description of the change

We now need to deploy codebrowse to machines that already have another codebrowse deployed. That means we need to use a different port, and to use a different port, we need to be able to configure the port.

This branch moves away from hard-coded literals in the start-loggerhead.py script to actual config variables. I've made the default in the schema match what the literals were before, so none of the current config files need to be changed.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/config/schema-lazr.conf'
2--- lib/canonical/config/schema-lazr.conf 2010-10-15 17:04:51 +0000
3+++ lib/canonical/config/schema-lazr.conf 2010-10-19 08:56:44 +0000
4@@ -278,6 +278,16 @@
5 # datatype: string
6 launchpad_root:
7
8+# The IP address to listen on.
9+#
10+# datatype: string
11+listen_host: 0.0.0.0
12+
13+# The port to listen on.
14+#
15+# datatype: int
16+port: 8080
17+
18 # A file path that contains a secret used for verifying cookies sent
19 # to codebrowse. This file should ideally contain 64 bytes of random
20 # data, and should be considered private -- if it is disclosed, we
21
22=== modified file 'scripts/start-loggerhead.py'
23--- scripts/start-loggerhead.py 2010-10-07 06:58:47 +0000
24+++ scripts/start-loggerhead.py 2010-10-19 08:56:44 +0000
25@@ -21,8 +21,9 @@
26 from canonical.config import config
27 import lp.codehosting
28
29-LISTEN_HOST = '0.0.0.0'
30-LISTEN_PORT = 8080
31+
32+LISTEN_HOST = config.codebrowse.listen_host
33+LISTEN_PORT = config.codebrowse.port
34 THREADPOOL_WORKERS = 10
35
36