File: buildbot-worker.7.scdoc

package info (click to toggle)
buildbot 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 20,524 kB
  • sloc: python: 169,990; sh: 1,204; makefile: 329; javascript: 119; xml: 16
file content (125 lines) | stat: -rw-r--r-- 2,995 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
buildbot-worker(7) "" "Services Administration"

# NAME

buildbot-worker - worker instances creation, upgrade and management

# DESCRIPTION

Buildbot worker instances are located under individual folders in
_/var/lib/buildbot/workers_. This manual explains how to manage them.

# CREATION

To create a new Buildbot worker instance named _$NAME_, use the following
commands:

```
buildbot-worker create-worker \\
	/var/lib/buildbot/workers/$NAME <master> <name> <passwd>
chown -R buildbot: /var/lib/buildbot/workers/$NAME
```

After which you may start the worker instance. Depending on the init system you
use, this is done differently.

## systemd

To start the instance:

```
systemctl start buildbot-worker@$NAME.service
```

To enable automatic start on boot:

```
systemctl enable buildbot-worker@$NAME.service
```

If you want to tune the way the instance is started (e.g., to change the user
that runs the process), you may use a systemd drop-in:

```
mkdir -p /etc/systemd/system/buildbot-worker@$NAME.service.d
editor /etc/systemd/system/buildbot-worker@$NAME.service.d/user.conf
```

With the following contents:

```
[Service]
User=my-user
Group=my-group
```

## sysvinit

First, you need to edit _/etc/default/buildbot-worker_ and configure your
instance. The syntax is pretty self explanatory, but here is an example:

```
# 1-enabled, 0-disabled
WORKER_ENABLED[1]=1
# short name printed on start/stop
WORKER_NAME[1]="$NAME"
# user to run worker as
WORKER_USER[1]="buildbot"
# basedir to worker (absolute path)
WORKER_BASEDIR[1]="/var/lib/buildbot/workers/$NAME"
# buildbot-worker options
WORKER_OPTIONS[1]=""
# prefix command, i.e. nice, linux32, dchroot
WORKER_PREFIXCMD[1]=""
```

After which, you may start the instance:

```
service buildbot-worker start $NAME
```

By default, it will automatically start on boot.

# UPGRADE

When installing new versions, each worker instance is automatically restarted.
No additional action is required.

## upgrade from 0.8.x

Since version 0.9.0 of Buildbot "slave"-based terminology is deprecated in
favor of "worker"-based terminology.

If you are upgrading from a 0.8.x version, all old buildbot-slave instances in
_/var/lib/buildbot/slaves_ must be manually migrated. The simplest way of doing
that is to create new workers re-using the same _<master>_, _<name>_ and
_<passwd>_ arguments. See the *CREATION* section of this manual for more
details.

Once migrated, you may safely delete the old "slave" directory:

```
rm -rf /var/lib/buildbot/slaves/$NAME
```

# FILES

_/var/lib/buildbot/workers/$NAME_
	Working directory for the _$NAME_ Buildbot worker instance.

_/etc/systemd/system/buildbot-worker@$NAME.service.d_
	Directory containing customization drop-ins for the _$NAME_ Buildbot
	worker instance service.

_/etc/default/buildbot-worker_
	The worker instances services definition for sysvinit users.

# SEE ALSO

*buildbot-worker*(1), *systemctl*(1), *systemd.unit*(5), *service*(8)


# AUTHOR

Robin Jarry <robin@jarry.cc>