1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
1 |
# Copyright Canonical Limited
|
2 |
# Author: Daniel Silverstone <daniel.silverstone@canonical.com>
|
|
3 |
||
4 |
# Buildd Slave implementation
|
|
1264
by Canonical.com Patch Queue Manager
Bob the builder! (initial buildd slave implementation) |
5 |
# XXX: dsilvers: 2005/01/21: Currently everything logged in the slave gets
|
6 |
# passed through to the twistd log too. this could get dangerous/big
|
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
7 |
|
8 |
from twisted.application import service, strports |
|
1264
by Canonical.com Patch Queue Manager
Bob the builder! (initial buildd slave implementation) |
9 |
from canonical.buildd import XMLRPCBuildDSlave, DebianBuildManager |
2240
by Canonical.com Patch Queue Manager
My librarian-cleanups branch, held up by baz confusion. r=BjornT |
10 |
from canonical.launchpad.daemons import tachandler |
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
11 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
12 |
from twisted.web import server, resource, static |
13 |
from ConfigParser import SafeConfigParser |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
14 |
|
15 |
import os |
|
16 |
||
1311
by Canonical.com Patch Queue Manager
Move buildd master to new scripts dir, and buildd slave to new daemons dir |
17 |
conffile = os.environ.get('BUILDD_SLAVE_CONFIG', 'buildd-slave-example.conf') |
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
18 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
19 |
conf = SafeConfigParser() |
20 |
conf.read(conffile) |
|
21 |
slave = XMLRPCBuildDSlave(conf) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
22 |
|
1264
by Canonical.com Patch Queue Manager
Bob the builder! (initial buildd slave implementation) |
23 |
slave.registerBuilder(DebianBuildManager,"debian") |
24 |
||
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
25 |
application = service.Application('BuildDSlave') |
26 |
builddslaveService = service.IServiceCollection(application) |
|
27 |
||
2240
by Canonical.com Patch Queue Manager
My librarian-cleanups branch, held up by baz confusion. r=BjornT |
28 |
# Service that announces when the daemon is ready
|
29 |
tachandler.ReadyService().setServiceParent(builddslaveService) |
|
30 |
||
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
31 |
root = resource.Resource() |
2606
by Canonical.com Patch Queue Manager
Build Daemon protocol rework. r=spiv |
32 |
root.putChild('rpc', slave) |
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
33 |
root.putChild('filecache', static.File(conf.get('slave', 'filecache'))) |
34 |
slavesite = server.Site(root) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
35 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
36 |
strports.service(slave.slave._config.get("slave","bindport"), |
37 |
slavesite).setServiceParent(builddslaveService) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
38 |
|
39 |
# You can interact with a running slave like this:
|
|
1311
by Canonical.com Patch Queue Manager
Move buildd master to new scripts dir, and buildd slave to new daemons dir |
40 |
# (assuming the slave is on localhost:8221)
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
41 |
#
|
42 |
# python
|
|
43 |
# import xmlrpclib
|
|
44 |
# s = xmlrpclib.Server("http://localhost:8221/")
|
|
45 |
# s.echo("Hello World")
|