-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
178 lines (176 loc) · 6.14 KB
/
docker-compose.yml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
x-runnertmpl: &runnertmpl
restart: unless-stopped
build: ./image
env_file:
- ./secrets.env
environment: &runnerenvtmpl
ORG_NAME: ccl-consulting
RUNNER_SCOPE: org
LABELS: linux,x64
RUNNER_NAME: runnerX
TMPDIR: '${PWD}/tmp/runnerX_tmp'
RUNNER_WORKDIR: /tmp/runner/work
security_opt:
- label:disable
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runnerX_tmp:${PWD}/tmp/runnerX_tmp:rw'
- './tmp/runnerX:/tmp/runner:rw'
# Expose to runners
# links:
# - earthlybuildkit
network_mode: host
extra_hosts:
- earthlybuildkit:127.0.0.1
# Grant access to KVM
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
services:
earthlybuildkit:
restart: unless-stopped
image: earthly/buildkitd:v0.8.13@sha256:bfe62d2839191629c9ee266233a276f4ea3d8d5b11e2433ff6917e5e310ef7fe
environment:
BUILDKIT_TCP_TRANSPORT_ENABLED: 'true'
BUILDKIT_TLS_ENABLED: 'false'
EARTHLY_RESET_TMP_DIR: 'true'
privileged: true
tty: true
volumes:
- './tmp/earthlybuildkit:/tmp/buildkit:rw'
ports:
- 8382:8372
runner0:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner0
TMPDIR: '${PWD}/tmp/runner0_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner0_tmp:${PWD}/tmp/runner0_tmp:rw'
- './tmp/runner0:/tmp/runner:rw'
runner1:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner1
TMPDIR: '${PWD}/tmp/runner1_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner1_tmp:${PWD}/tmp/runner1_tmp:rw'
- './tmp/runner1:/tmp/runner:rw'
runner2:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner2
TMPDIR: '${PWD}/tmp/runner2_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner2_tmp:${PWD}/tmp/runner2_tmp:rw'
- './tmp/runner2:/tmp/runner:rw'
runner3:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner3
TMPDIR: '${PWD}/tmp/runner3_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner3_tmp:${PWD}/tmp/runner3_tmp:rw'
- './tmp/runner3:/tmp/runner:rw'
runner4:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner4
TMPDIR: '${PWD}/tmp/runner4_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner4_tmp:${PWD}/tmp/runner4_tmp:rw'
- './tmp/runner4:/tmp/runner:rw'
runner5:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner5
TMPDIR: '${PWD}/tmp/runner5_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner5_tmp:${PWD}/tmp/runner5_tmp:rw'
- './tmp/runner5:/tmp/runner:rw'
runner6:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner6
TMPDIR: '${PWD}/tmp/runner6_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner6_tmp:${PWD}/tmp/runner6_tmp:rw'
- './tmp/runner6:/tmp/runner:rw'
runner7:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner7
TMPDIR: '${PWD}/tmp/runner7_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner7_tmp:${PWD}/tmp/runner7_tmp:rw'
- './tmp/runner7:/tmp/runner:rw'
runner8:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner8
TMPDIR: '${PWD}/tmp/runner8_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner8_tmp:${PWD}/tmp/runner8_tmp:rw'
- './tmp/runner8:/tmp/runner:rw'
runner9:
<<: *runnertmpl
environment:
<<: *runnerenvtmpl
RUNNER_NAME: runner9
TMPDIR: '${PWD}/tmp/runner9_tmp'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock:ro'
- '/var/run/libvirt/libvirt-sock-ro:/var/run/libvirt/libvirt-sock-ro:ro'
- '/home/virt_data:/home/virt_data:rw'
- './tmp/runner9_tmp:${PWD}/tmp/runner9_tmp:rw'
- './tmp/runner9:/tmp/runner:rw'