aboutsummaryrefslogtreecommitdiff
path: root/bbot/bbot-agent@.service
blob: 253cc610a54f0ae9ad8b95bfa8446195472fa155 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 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_BUILD=4194304
Environment=RAM_AUXIL=0
Environment=BRIDGE=br1

Environment=AUTH_KEY=

Environment=INTERACTIVE=false

Environment=BOOTSTRAP_TIMEOUT=3600
Environment=BOOTSTRAP_AUXILIARY=900
Environment=BOOTSTRAP_RETRIES=2

Environment=BUILD_TIMEOUT=5400
Environment=BUILD_RETRIES=2

Environment=INTERACTIVE_TIMEOUT=10800

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=INSTANCE_MAX=0

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} \
  --build-ram ${RAM_BUILD} \
  --auxiliary-ram ${RAM_AUXIL} \
  --bridge ${BRIDGE} \
  --auth-key ${AUTH_KEY} \
  --interactive ${INTERACTIVE} \
  --bootstrap-timeout ${BOOTSTRAP_TIMEOUT} \
  --bootstrap-auxiliary ${BOOTSTRAP_AUXILIARY} \
  --bootstrap-retries ${BOOTSTRAP_RETRIES} \
  --build-timeout ${BUILD_TIMEOUT} \
  --build-retries ${BUILD_RETRIES} \
  --intactive-timeout ${INTERACTIVE_TIMEOUT} \
  --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-max ${INSTANCE_MAX} \
  --instance %i \
  $CONTROLLER_TRUST \
  $CONTROLLER_URL

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

[Install]
WantedBy=multi-user.target