Mercurial > bitten > bitten-test
annotate doc/install.txt @ 526:6435da25eaae
Add `prefix` parameter (see #134)
author | dfraser |
---|---|
date | Wed, 18 Mar 2009 06:55:44 +0000 |
parents | a89925df9d88 |
children | fe4293ddf51c |
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 | |
522
ad7c5f4b1cf0
Added note that you need Trac for the tests; see #265
dfraser
parents:
436
diff
changeset
|
32 the code works as expected on your platform (please note that Trac_ needs to |
ad7c5f4b1cf0
Added note that you need Trac for the tests; see #265
dfraser
parents:
436
diff
changeset
|
33 be installed for the tests to run; see below):: |
412 | 34 |
35 $ python setup.py test | |
36 | |
37 | |
38 What's left to do now depends on whether you want to use the build master and | |
39 web interface, or just the build slave. In the latter case, you're already | |
40 done. You might need to install software that the build of your project | |
41 requires, but the Bitten build slave itself doesn't require anything extra. | |
42 | |
523 | 43 For the build master and web interface, you'll need to install Trac_ 0.11 or |
436
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
44 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
|
45 information on how it is installed. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
46 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
47 .. _trac: http://trac.edgewall.org/ |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
48 .. _tracwebadmin: http://trac.edgewall.org/wiki/WebAdmin |
412 | 49 |
50 | |
51 Build Master Configuration | |
52 ========================== | |
53 | |
54 Once both Bitten and Trac are installed and working, you'll have to introduce | |
55 Bitten to your Trac project environment. If you don't have a Trac project | |
56 set up yet, you'll need to do so in order to use Bitten. | |
57 | |
58 If you already have a Trac project environment, the Bitten plugin needs to be | |
59 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
|
60 ``[components]`` section in ``/path/to/projenv/conf/trac.ini``: |
412 | 61 |
62 .. code-block:: ini | |
63 | |
64 [components] | |
65 bitten.* = enabled | |
66 | |
67 The Trac web interface should now inform you with an error message that the | |
68 environment needs to be upgraded. To do this, run:: | |
69 | |
70 $ trac-admin /path/to/projenv upgrade | |
71 | |
72 This will create the database tables and directories that Bitten requires. | |
73 You probably also want to grant permissions to someone (such as yourself) | |
74 to manage build configurations, and allow anonymous users to view the | |
75 status and results of builds:: | |
76 | |
77 $ trac-admin /path/to/projenv permission add anonymous BUILD_EXEC | |
78 $ trac-admin /path/to/projenv permission add anonymous BUILD_VIEW | |
79 $ trac-admin /path/to/projenv permission add [yourname] BUILD_ADMIN | |
80 | |
81 You should now see an additional tab labeled "Build Status" in the Trac | |
82 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
|
83 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
|
84 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
85 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
|
86 installed. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
87 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
88 .. 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
|
89 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
|
90 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
|
91 that case, though (``webadmin.* = disabled``). While somewhat |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
92 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
|
93 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
|
94 in Trac 0.11. |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
95 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
96 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
|
97 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
|
98 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
|
99 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
|
100 |
cfbc9ee622d5
Finish the move of build configuration management into the admin interface.
cmlenz
parents:
412
diff
changeset
|
101 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
|
102 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
|
103 to "activate" your new build configuration. |
412 | 104 |
105 | |
106 Running the Build Slave | |
107 ======================= | |
108 | |
109 The build slave can be run on any machine that can connect to the machine | |
110 on which the build master is running. The installation of Bitten should have put | |
111 a `bitten-slave` executable on your path. If the script is not on your path, | |
112 look for it in the `bin` or `scripts` subdirectory of your Python installation. | |
113 | |
114 To get a list of options for the build slave, execute it with the `--help` | |
115 option:: | |
116 | |
117 $ bitten-slave --help | |
118 | |
119 To run the build slave against a Bitten-enabled Trac site installed at | |
120 http://myproject.example.org/trac, you'd run:: | |
121 | |
122 $ bitten-slave http://myproject.example.org/trac/builds |