[Buildbot-commits] buildbot/docs buildbot.texinfo,1.32,1.33

Brian Warner warner at users.sourceforge.net
Fri Jan 13 08:34:31 UTC 2006


Update of /cvsroot/buildbot/buildbot/docs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379/docs

Modified Files:
	buildbot.texinfo 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454
Creator:  Brian Warner <warner at lothar.com>

all port= args now accept a strports string: slaveport, Waterfall, etc

	* buildbot/master.py (Manhole.__init__): let port= be a strports
	specification string, but handle a regular int for backwards
	compatibility. This allows "tcp:12345:interface=127.0.0.1" to be
	used in master.cfg to limit connections to just the local host.
	(BuildMaster.loadConfig): same for c['slavePortnum']
	* buildbot/scheduler.py (Try_Userpass.__init__): same
	* buildbot/status/client.py (PBListener.__init__): same
	* buildbot/status/html.py (Waterfall.__init__): same, for both
	http_port and distrib_port. Include backwards-compatibility checks
	so distrib_port can be a filename string and still mean unix:/foo
	* docs/buildbot.texinfo (Setting the slaveport): document it
	(Debug options): same
	(HTML Waterfall): same
	(PBListener): same
	(try): same
	* buildbot/test/test_config.py (ConfigTest): test it

	* buildbot/master.py (BuildMaster.loadConfig): wait for the
	slaveport's disownServiceParent deferred to fire before opening
	the new one. Fixes an annoying bug in the unit tests.


Index: buildbot.texinfo
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- buildbot.texinfo	27 Nov 2005 03:58:48 -0000	1.32
+++ buildbot.texinfo	13 Jan 2006 08:34:28 -0000	1.33
@@ -1855,6 +1855,21 @@
 c['slavePortnum'] = 10000
 @end example
 
+ at code{c['slavePortnum']} is a @emph{strports} specification string,
+defined in the @code{twisted.application.strports} module (try
+ at command{pydoc twisted.application.strports} to get documentation on
+the format). This means that you can have the buildmaster listen on a
+localhost-only port by doing:
+
+ at example
+c['slavePortnum'] = "tcp:10000:interface=127.0.0.1"
+ at end example
+
+This might be useful if you only run buildslaves on the same machine,
+and they are all configured to contact the buildmaster at
+ at code{localhost:10000}.
+
+
 @node Buildslave Specifiers, Defining Builders, Setting the slaveport, Configuration
 @section Buildslave Specifiers
 
@@ -2019,11 +2034,21 @@
 account (including the ability to modify and delete files), so it
 should not be enabled with a weak or easily guessable password.
 
+The @code{Manhole} instance can be configured to listen on a specific
+port. You may wish to have this listening port bind to the loopback
+interface (sometimes known as ``lo0'', ``localhost'', or 127.0.0.1) to
+restrict access to clients which are running on the same host.
+
 @example
 from buildbot.master import Manhole
-c['manhole'] = Manhole(9999, "admin", "password")
+c['manhole'] = Manhole("tcp:9999:interface=127.0.0.1", "admin", "password")
 @end example
 
+To have the @code{Manhole} listen on all interfaces, use
+ at code{"tcp:9999"}. This port specification uses
+ at code{twisted.application.strports}, so you can make it listen on SSL
+or even UNIX-domain sockets if you want.
+
 
 @node Getting Source Code Changes, Build Process, Configuration, Top
 @chapter Getting Source Code Changes
@@ -3548,12 +3573,20 @@
 This display provides detailed information about all steps of all
 recent builds, and provides hyperlinks to look at individual build
 logs and source changes. If the @code{http_port} argument is provided,
-it represents the TCP port number on which the web server should
-listen. If instead @code{distrib_port} is provided, a twisted.web
-distributed server will be started either on a TCP port (if
- at code{distrib_port} is an int) or more likely on a UNIX socket (if
- at code{distrib_port} is a string). The HTML page can have a favicon and
-custom CSS: see the docstring for details.
+it provides a strports specification for the port that the web server
+should listen on. This can be a simple port number, or a string like
+ at code{tcp:8080:interface=127.0.0.1} (to limit connections to the
+loopback interface, and therefore to clients running on the same
+host)@footnote{It may even be possible to provide SSL access by using
+a specification like
+ at code{"ssl:12345:privateKey=mykey.pen:certKey=cert.pem"}, but this is
+completely untested}.
+
+If instead (or in addition) you provide the @code{distrib_port}
+argument, a twisted.web distributed server will be started either on a
+TCP port (if @code{distrib_port} is like @code{"tcp:12345"}) or more
+likely on a UNIX socket (if @code{distrib_port} is like
+ at code{"unix:/path/to/socket"}).
 
 The @code{distrib_port} option means that, on a host with a
 suitably-configured twisted-web server, you do not need to consume a
@@ -3563,11 +3596,14 @@
 listening on a UNIX socket at @code{~username/.twisted-web-pb}. On
 such a system, it is convenient to create a dedicated @code{buildbot}
 user, then set @code{distrib_port} to
- at code{os.path.expanduser("~/.twistd-web-pb")}. This configuration will
-make the HTML status page available at @code{http://host/~buildbot/} .
-Suitable URL remapping can make it appear at
- at code{http://host/buildbot/}, and the right virtual host setup can
-even place it at @code{http://buildbot.host/} .
+ at code{"unix:"+os.path.expanduser("~/.twistd-web-pb")}. This
+configuration will make the HTML status page available at
+ at code{http://host/~buildbot/} . Suitable URL remapping can make it
+appear at @code{http://host/buildbot/}, and the right virtual host
+setup can even place it at @code{http://buildbot.host/} .
+
+In addition, the HTML page can have a favicon and custom CSS: see the
+docstring for details.
 
 @node IRC Bot, PBListener, HTML Waterfall, Status Delivery
 @subsection IRC Bot
@@ -3645,7 +3681,8 @@
 
 This sets up a PB listener on the given TCP port, to which a PB-based
 status client can connect and retrieve status information.
- at code{buildbot statusgui} is an example of such a status client.
+ at code{buildbot statusgui} is an example of such a status client. The
+ at code{port} argument can also be a strports specification string.
 
 @node Command-line tool, Resources, Status Delivery, Top
 @chapter Command-line tool
@@ -3900,6 +3937,10 @@
 c['schedulers'] = [s]
 @end example
 
+Like most places in the buildbot, the @code{port} argument takes a
+strports specification. See @code{twisted.application.strports} for
+details.
+
 
 @heading locating the master
 





More information about the Commits mailing list