aboutsummaryrefslogtreecommitdiff
path: root/bbot/bbot-agent@.service
blob: c9e109352c32527a5a6c87a3f2f83e81aca19c57 (plain)
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
# Notes:
#
# The template parameter is the instance number. Use `%I` in Description or
# similar and `%i` everywhere else (`%I` is rewritten by Build OS monitor to
# include the toolchain name).
#
[Unit]
Description=bbot agent %I
After=multi-user.target

[Service]
Type=simple

Environment=VERBOSE=3

Environment=CPU=1
Environment=RAM=1048576
Environment=BRIDGE=br1

Environment=AUTH_KEY=

Environment=BOOTSTRAP_TIMEOUT=3600
Environment=BOOTSTRAP_RETRIES=2

Environment=BUILD_TIMEOUT=3600
Environment=BUILD_RETRIES=2

Environment=CONNECT_TIMEOUT=60
Environment=REQUEST_TIMEOUT=300
Environment=REQUEST_RETRIES=4

Environment=TOOLCHAIN_NAME=default
Environment=TOOLCHAIN_NUM=1
Environment=TOOLCHAIN_VER=
Environment=TOOLCHAIN_ID=

Environment="CONTROLLER_URL="
Environment="CONTROLLER_TRUST="

# Note that we cannot use ${TOOLCHAIN_NAME} in the first word of ExecStart.
#
ExecStart=/build/bots/default/bin/bbot-agent \
  --systemd-daemon \
  --verbose ${VERBOSE} \
  --cpu ${CPU} \
  --ram ${RAM} \
  --bridge ${BRIDGE} \
  --auth-key ${AUTH_KEY} \
  --bootstrap-timeout ${BOOTSTRAP_TIMEOUT} \
  --bootstrap-retries ${BOOTSTRAP_RETRIES} \
  --build-timeout ${BUILD_TIMEOUT} \
  --build-retries ${BUILD_RETRIES} \
  --connect-timeout ${CONNECT_TIMEOUT} \
  --request-timeout ${REQUEST_TIMEOUT} \
  --request-retries ${REQUEST_RETRIES} \
  --toolchain-name ${TOOLCHAIN_NAME} \
  --toolchain-num ${TOOLCHAIN_NUM} \
  --toolchain-ver ${TOOLCHAIN_VER} \
  --toolchain-id ${TOOLCHAIN_ID} \
  --instance %i \
  $CONTROLLER_TRUST \
  $CONTROLLER_URL

Nice=0
User=build
Group=build
WorkingDirectory=~

[Install]
WantedBy=multi-user.target