update gerrit list
[openafs-wiki.git] / devel / buildbotmasternotes.mdwn
1 OpenAFS Buildbot Master Configuration
2 =====================================
3
4 The OpenAFS buildbot master configuration is maintained in the
5 openafs-contrib area of [github][4].
6
7 Buildbot master installation
8 ----------------------------
9
10 The following instructions describe how to use `pip` to install the buildbot
11 master in a Python virtual environment.  With sudo/root access, install Python3
12 and the development packages for it.
13
14 Ensure TCP ports 9989 and 8010 are open. Create a `buildbot` user on the
15 system.  The remaining steps to not require sudo access and should be run as
16 the `buildbot` user.
17
18 Optionally create a project level directory, for example:
19
20     $ mkdir openafs-buildbot
21     $ cd openafs-buildbot
22
23 Create a Python virtual environment:
24
25     $ python3 -m venv venv
26
27 Activate the virtual environment for the installation:
28
29     $ source venv/bin/activate
30
31 Install buildbot and it's dependencies:
32
33     $ pip install --upgrade pip
34     $ pip install 'buildbot[bundle]'
35
36 Create the buildbot master instance:
37
38     $ buildbot create-master master
39
40 The virtual environment can now be deactivated:
41
42     $ deactivate
43
44 Master configuration
45 --------------------
46
47 Download the buildbot master configuration:
48
49     $ git clone https://github.com/openafs-contrib/afsbotcfg.git
50     $ cd afsbotcfg
51
52 Create the `Makefile` and deploy the buildbot `master.cfg` and
53 sample `settings.ini` file:
54
55     $ python configure.py
56     $ make install
57
58 Make a link to the makefile in the top level directory:
59
60     $ cd ..
61     $ ln -s afsbotcfg/Makefile
62
63 Master settings
64 ---------------
65
66 Edit the `settings.ini` file in the `master` directory. This file stores
67 information we do not track with git, such as the buildbot worker passwords.
68 The `settings.ini` file is an INI-style file with the following sections:
69
70 * local - settings specific to the local environment
71 * admins - the list of user emails and passwords for authenticated access
72 * email - emails for notifications
73 * workers - the list of worker names and passwords
74
75 Example:
76
77     $ cat master/settings.ini
78     [local]
79     buildbotURL = http://buildbot.openafs.org:8010/
80     
81     [admins]
82     tycobb@yoyodyne.com = password
83     
84     [workers]
85     example-worker-1 = secret1
86     example-worker-2 = secret2
87
88 Gerrit account
89 --------------
90
91 The buildbot master needs an account on the [OpenAFS Gerrit][3] to listen for
92 Gerrit events and to report verified changes on successful builds.  The name of
93 the account is `buildbot`. Place the ssh keys for the buildbot's Gerrit account
94 in the `.ssh` directory under the home directory of the local account running
95 the buildbot master. The key file name should match the ones defined in the
96 `master.cfg` file.
97
98 Starting the master
99 -------------------
100
101 Check the buildbot master configuration with the command:
102
103     $ make check
104
105 Start the buildbot master with the command:
106
107     $ make start
108
109 Stop the buildbot master with the command:
110
111     $ make stop
112
113 [1]: https://buildbot.openafs.org/
114 [2]: https://openafs.org
115 [3]: https://gerrit.openafs.org/
116 [4]: https://github.com/openafs-contrib/afsbotcfg/