10134.1.21
by Aaron Bentley
Cleanup, add test script. |
1 |
# Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
|
8687.15.8
by Karl Fogel
Add the copyright header block to more files. |
2 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
3 |
||
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
4 |
# Author: Daniel Silverstone <daniel.silverstone@canonical.com>
|
5 |
||
6 |
# Buildd Slave implementation
|
|
1264
by Canonical.com Patch Queue Manager
Bob the builder! (initial buildd slave implementation) |
7 |
# XXX: dsilvers: 2005/01/21: Currently everything logged in the slave gets
|
8 |
# 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 |
9 |
|
10 |
from twisted.application import service, strports |
|
10134.2.1
by William Grant
Factor the binary package building stuff out of DebianBuildManager. |
11 |
from canonical.buildd import XMLRPCBuildDSlave |
12 |
from canonical.buildd.binarypackage import BinaryPackageBuildManager |
|
10134.3.1
by William Grant
Add and register skeleton SourcePackageRecipeBuildManager. |
13 |
from canonical.buildd.sourcepackagerecipe import ( |
14 |
SourcePackageRecipeBuildManager) |
|
10154.8.4
by Jeroen Vermeulen
Almost got it working, maybe. |
15 |
from canonical.buildd.translationtemplates import TranslationTemplatesBuildManager |
2240
by Canonical.com Patch Queue Manager
My librarian-cleanups branch, held up by baz confusion. r=BjornT |
16 |
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 |
17 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
18 |
from twisted.web import server, resource, static |
19 |
from ConfigParser import SafeConfigParser |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
20 |
|
21 |
import os |
|
22 |
||
1311
by Canonical.com Patch Queue Manager
Move buildd master to new scripts dir, and buildd slave to new daemons dir |
23 |
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 |
24 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
25 |
conf = SafeConfigParser() |
26 |
conf.read(conffile) |
|
27 |
slave = XMLRPCBuildDSlave(conf) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
28 |
|
10134.2.2
by William Grant
'debian' is now an alias for 'binarypackage', the new name for BinaryPackageBuildManager. |
29 |
# 'debian' is the old name. It remains here for compatibility.
|
30 |
slave.registerBuilder(BinaryPackageBuildManager, "debian") |
|
31 |
slave.registerBuilder(BinaryPackageBuildManager, "binarypackage") |
|
10134.3.1
by William Grant
Add and register skeleton SourcePackageRecipeBuildManager. |
32 |
slave.registerBuilder(SourcePackageRecipeBuildManager, "sourcepackagerecipe") |
10154.8.4
by Jeroen Vermeulen
Almost got it working, maybe. |
33 |
slave.registerBuilder(TranslationTemplatesBuildManager, 'translation-templates') |
1264
by Canonical.com Patch Queue Manager
Bob the builder! (initial buildd slave implementation) |
34 |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
35 |
application = service.Application('BuildDSlave') |
36 |
builddslaveService = service.IServiceCollection(application) |
|
37 |
||
2240
by Canonical.com Patch Queue Manager
My librarian-cleanups branch, held up by baz confusion. r=BjornT |
38 |
# Service that announces when the daemon is ready
|
39 |
tachandler.ReadyService().setServiceParent(builddslaveService) |
|
40 |
||
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
41 |
root = resource.Resource() |
2606
by Canonical.com Patch Queue Manager
Build Daemon protocol rework. r=spiv |
42 |
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 |
43 |
root.putChild('filecache', static.File(conf.get('slave', 'filecache'))) |
44 |
slavesite = server.Site(root) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
45 |
|
2556
by Canonical.com Patch Queue Manager
Add /filecache/ to build slave, rev protocol to 2, rev package to v9. r=stevea |
46 |
strports.service(slave.slave._config.get("slave","bindport"), |
47 |
slavesite).setServiceParent(builddslaveService) |
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
48 |
|
49 |
# 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 |
50 |
# (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 |
51 |
#
|
52 |
# python
|
|
53 |
# import xmlrpclib
|
|
10134.1.18
by Aaron Bentley
Get buildd able to start building |
54 |
# s = xmlrpclib.ServerProxy("http://localhost:8221/rpc")
|
1193
by Canonical.com Patch Queue Manager
Merge in the buildd stuff so I can start a 2005 archive |
55 |
# s.echo("Hello World")
|