Mercurial > bitten > bitten-test
annotate doc/install.txt @ 448:ccddf91740d1
Fix deletion of obsolete builds in build queue.
author | cmlenz |
---|---|
date | Thu, 23 Aug 2007 18:37:42 +0000 |
parents | cfbc9ee622d5 |
children | ad7c5f4b1cf0 |
rev | line source |
---|---|
412 | 1 .. -*- mode: rst; encoding: utf-8 -*- |
2 | |
3 ============ | |
4 Installation | |
5 ============ | |
6 | |
7 .. contents:: Contents | |
8 :depth: 2 | |
9 .. sectnum:: | |
10 | |
11 | |
12 Prerequisites | |
13 ============= | |
14 | |
15 Bitten is written in Python, so make sure that you have Python installed. | |
16 You'll need Python 2.3 or later. Also, make sure that setuptools_, version 0.6a2 | |
17 or later, is installed. | |
18 | |
19 .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools | |
20 | |
21 If that's taken care of, you just need to download and unpack the Bitten | |
22 distribution, and execute the command:: | |
23 | |
24 $ python setup.py install | |
25 | |
26 from the top of the directory where you unpacked (or checked out) the Bitten | |
27 code. Note that you may need administrator/root privileges for this step, as | |
28 it will by default attempt to install Bitten to the Python site-packages | |
29 directory on your system. | |
30 | |
31 It's also a good idea to run the unit tests at this point, to make sure that | |
32 the code works as expected on your platform:: | |
33 | |
34 $ python setup.py test | |
35 | |
36 | |
37 What's left to do now depends on whether you want to use the build master and | |
38 web interface, or just the build slave. In the latter case, you're already | |
39 done. You might need to install software that the build of your project | |
40 requires, but the Bitten build slave itself doesn't require anything extra. | |
41 | |
436
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
42 For the build master and web interface, you'll need to install Trac_ 0.10 or |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
43 later and the TracWebAdmin_ plugin. Please refer to the Trac documentation for |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
44 information on how it is installed. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
45 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
46 .. _trac: http://trac.edgewall.org/ |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
47 .. _tracwebadmin: http://trac.edgewall.org/wiki/WebAdmin |
412 | 48 |
49 | |
50 Build Master Configuration | |
51 ========================== | |
52 | |
53 Once both Bitten and Trac are installed and working, you'll have to introduce | |
54 Bitten to your Trac project environment. If you don't have a Trac project | |
55 set up yet, you'll need to do so in order to use Bitten. | |
56 | |
57 If you already have a Trac project environment, the Bitten plugin needs to be | |
58 explicitly enabled in the Trac configuration. This is done by adding it to the | |
436
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
59 ``[components]`` section in ``/path/to/projenv/conf/trac.ini``: |
412 | 60 |
61 .. code-block:: ini | |
62 | |
63 [components] | |
64 bitten.* = enabled | |
65 | |
66 The Trac web interface should now inform you with an error message that the | |
67 environment needs to be upgraded. To do this, run:: | |
68 | |
69 $ trac-admin /path/to/projenv upgrade | |
70 | |
71 This will create the database tables and directories that Bitten requires. | |
72 You probably also want to grant permissions to someone (such as yourself) | |
73 to manage build configurations, and allow anonymous users to view the | |
74 status and results of builds:: | |
75 | |
76 $ trac-admin /path/to/projenv permission add anonymous BUILD_EXEC | |
77 $ trac-admin /path/to/projenv permission add anonymous BUILD_VIEW | |
78 $ trac-admin /path/to/projenv permission add [yourname] BUILD_ADMIN | |
79 | |
80 You should now see an additional tab labeled "Build Status" in the Trac | |
81 navigation bar. This link will take you to the list of build configurations, | |
436
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
82 which at this point is of course empty. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
83 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
84 To add build configurations, you need to have the TracWebAdmin_ plugin |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
85 installed. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
86 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
87 .. warning:: The TracWebAdmin needs to be installed even if you're using Trac |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
88 0.11 or later, which basically provides a builtin web |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
89 administration interface. Make sure that you disable the plugin in |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
90 that case, though (``webadmin.* = disabled``). While somewhat |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
91 counterintuitive, this process allows the Bitten administration UI |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
92 to neatly integrate into the new web administration interface added |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
93 in Trac 0.11. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
94 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
95 If both TracWebAdmin_ and Bitten are installed, and you are logged in as a user |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
96 with the required permissions, you should see additional administration pages |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
97 inside the “Admin” area, under a group named “Builds”. These pages allow you to |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
98 set options of the build master, and manage build configurations. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
99 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
100 Add a new build configuration and fill out the form. Also, add at least one |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
101 target platform after saving the configuration. Last but not least, you'll have |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
102 to "activate" your new build configuration. |
412 | 103 |
104 | |
105 Running the Build Slave | |
106 ======================= | |
107 | |
108 The build slave can be run on any machine that can connect to the machine | |
109 on which the build master is running. The installation of Bitten should have put | |
110 a `bitten-slave` executable on your path. If the script is not on your path, | |
111 look for it in the `bin` or `scripts` subdirectory of your Python installation. | |
112 | |
113 To get a list of options for the build slave, execute it with the `--help` | |
114 option:: | |
115 | |
116 $ bitten-slave --help | |
117 | |
118 To run the build slave against a Bitten-enabled Trac site installed at | |
119 http://myproject.example.org/trac, you'd run:: | |
120 | |
121 $ bitten-slave http://myproject.example.org/trac/builds |