Buildbot makes heavy use of Twisted Python's support for services - software modules that can be started and stopped dynamically. Buildbot adds the ability to reconfigure such services, too - see Reconfiguration. Twisted arranges services into trees; the following section describes the service tree on a running master.
The hierarchy begins with the master, a buildbot.master.BuildMaster instance. Most other services contain a reference to this object in their master attribute, and in general the appropriate way to access other objects or services is to begin with self.master and navigate from there.
The master has a number of useful attributes:
- A buildbot.process.metrics.MetricLogObserver instance that handles tracking and reporting on master metrics.
- A buildbot.process.caches.CacheManager instance that provides access to object caches.
- A buildbot.pbmanager.PBManager instance that handles incoming PB connections, potentially on multiple ports, and dispatching those connections to appropriate components based on the supplied username.
- A buildbot.buildslave.manager.BuildslaveManager instance that provides wrapper around multiple master-slave protocols(e.g. PB) to unify calls for them from higher level code
- A buildbot.changes.manager.ChangeManager instance that manages the active change sources, as well as the stream of changes received from those sources. All active change sources are child services of this instance.
A buildbot.process.botmaster.BotMaster instance that manages all of the slaves and builders as child services.
The botmaster acts as the parent service for a buildbot.process.botmaster.BuildRequestDistributor instance (at master.botmaster.brd) as well as all active slaves (buildbot.buildslave.AbstractBuildSlave instances) and builders (buildbot.process.builder.Builder instances).
- A buildbot.schedulers.manager.SchedulerManager instance that manages the active schedulers. All active schedulers are child services of this instance.
- A buildbot.process.users.manager.UserManagerManager instance that manages access to users. All active user managers are child services of this instance.
- A buildbot.db.connector.DBConnector instance that manages access to the buildbot database. See Database for more information.
- A buildbot.process.debug.DebugServices instance that manages debugging-related access -- the manhole, in particular.
- A buildbot.status.master.Status instance that provides access to all status data. This instance is also the service parent for all status listeners.
- This is the ID for this master, from the masters table. It is used in the database and messages to uniquely identify this master.