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
=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf 2010-10-15 17:04:51 +0000
+++ lib/canonical/config/schema-lazr.conf 2010-10-19 08:56:44 +0000
@@ -278,6 +278,16 @@
278# datatype: string278# datatype: string
279launchpad_root:279launchpad_root:
280280
281# The IP address to listen on.
282#
283# datatype: string
284listen_host: 0.0.0.0
285
286# The port to listen on.
287#
288# datatype: int
289port: 8080
290
281# A file path that contains a secret used for verifying cookies sent291# A file path that contains a secret used for verifying cookies sent
282# to codebrowse. This file should ideally contain 64 bytes of random292# to codebrowse. This file should ideally contain 64 bytes of random
283# data, and should be considered private -- if it is disclosed, we293# data, and should be considered private -- if it is disclosed, we
284294
=== modified file 'scripts/start-loggerhead.py'
--- scripts/start-loggerhead.py 2010-10-07 06:58:47 +0000
+++ scripts/start-loggerhead.py 2010-10-19 08:56:44 +0000
@@ -21,8 +21,9 @@
21from canonical.config import config21from canonical.config import config
22import lp.codehosting22import lp.codehosting
2323
24LISTEN_HOST = '0.0.0.0'24
25LISTEN_PORT = 808025LISTEN_HOST = config.codebrowse.listen_host
26LISTEN_PORT = config.codebrowse.port
26THREADPOOL_WORKERS = 1027THREADPOOL_WORKERS = 10
2728
2829