The build slave recipe
**********************

The ``collective.buildbot:slave`` recipe produces a configuration
file that sets up a build slave process. Once the build slave is
configured you can run it by executing the controller script under the
buildout's bin directory. The controller script will be named after
the section name, so if you had a ``[buildslave]`` section in your
buildout.cfg you would get a ``bin/buildslave`` script.

Since the name of the section using this recipe will also become the
name of the build slave it is important to choose the name that
corresponds to the buildmaster configuration.

Supported options
=================

The recipe supports the following options:

``host``
    Hostname of the build master.
    
``port``
    Port that the build master is listening. This should match the
    ``port`` option in the section using the
    ``collective.buildbot:master`` recipe in your buildmaster
    buildout.

``password``
    Build slave password. This should match the password in the
    ``slave-names`` section in the buildmaster buildout.

``eggs``
    Used to install extra eggs in slave environment.

``environment`` 
    Can define the name of a section, containing environment variable
    that will be defined in the slave environment.

``umask``
    Override the default 0077 umask which is used in the build directory.

Example usage
=============

We'll start by creating a buildout that uses the recipe::

    >>> write('buildout.cfg',
    ... """
    ... [buildout]
    ... parts = 
    ...	   buildslave
    ... 
    ... [buildslave]
    ... recipe = collective.buildbot:slave
    ... host = localhost
    ... port = 8888
    ... password = password
    ... environment = slaveenv
    ... umask = 0002
    ...
    ... [slaveenv]
    ... PATH = /bin:/usr/bin:/usr/local/bin:/usr/local/firefox
    ... """)

Running the buildout gives us::

    >>> print system(buildout)
    Installing buildslave.
    ...
    Generated script /sample-buildout/parts/buildslave/buildbot.tac.
    Generated script '/sample-buildout/bin/buildslave'.
    <BLANKLINE>

As shown above, the buildout generated the required scripts. You can
control build slave process by running::

  $ ./bin/buildslave [start | stop | restart]
