-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
310 lines (308 loc) · 9.04 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
---
version: '3.9'
services:
awx_1:
user: root
image: ghrc.io/ainamori/awx/awx/awx:dev
profiles:
- "master"
container_name: awx_1
hostname: awx_1
command: launch_awx.sh
environment:
OS: " Operating System: CentOS Stream 9"
SDB_HOST: 0.0.0.0
SDB_PORT: 7899
AWX_GROUP_QUEUES: tower
MAIN_NODE_TYPE: "${MAIN_NODE_TYPE:-hybrid}"
RECEPTORCTL_SOCKET: /var/run/awx-receptor/receptor.sock
CONTROL_PLANE_NODE_COUNT: 1
EXECUTION_NODE_COUNT: 0
AWX_LOGGING_MODE: stdout
DJANGO_SUPERUSER_PASSWORD: ${AWX_SUPERUSER_PASSWORD}
RUN_MIGRATIONS: 1
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "awx_2:${AWX_2_IP}"
- "receptor-hop_2:${RECEPTOR_HOP_2_IP}"
links:
- postgres
- redis_1
working_dir: "/awx_devel"
volumes:
- "./VERSION:/awx_devel/VERSION"
- "./config/supervisor.conf:/etc/supervisord.conf"
- "./config/database.py:/etc/tower/conf.d/database.py"
- "./config/websocket_secret.py:/etc/tower/conf.d/websocket_secret.py"
- "./config/local_settings.py:/etc/tower/conf.d/local_settings.py"
- "./config/SECRET_KEY:/etc/tower/SECRET_KEY"
- "./config/receptor/receptor-awx.conf:/etc/receptor/receptor.conf"
- "./config/receptor/receptor.lock:/etc/receptor/receptor.conf.lock"
# - "./config/certs:/etc/receptor/certs" # TODO: optionally generate certs
- "/sys/fs/cgroup:/sys/fs/cgroup"
- "./config/kube.config:/var/lib/awx/.kube/config"
- "redis_socket_1:/var/run/redis/:rw"
networks:
- awx
# ports:
# - "7899-7999:7899-7999" # sdb-listen
tty: true
privileged: true
redis_1:
image: redis
profiles:
- "master"
container_name: redis_1
environment:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
networks:
- awx
volumes:
- "./config/redis.conf:/usr/local/etc/redis/redis.conf"
- "redis_socket_1:/var/run/redis/:rw"
entrypoint: [ "redis-server" ]
command: [ "/usr/local/etc/redis/redis.conf" ]
privileged: true
# Primary AWX Development Container
awx_2:
user: root
image: ghrc.io/ainamori/awx/awx/awx:dev
profiles:
- "slave"
container_name: awx_2
hostname: awx_2
command: launch_awx.sh
environment:
OS: " Operating System: CentOS Stream 9"
SDB_HOST: 0.0.0.0
SDB_PORT: 7899
AWX_GROUP_QUEUES: tower
MAIN_NODE_TYPE: "${MAIN_NODE_TYPE:-hybrid}"
RECEPTORCTL_SOCKET: /var/run/awx-receptor/receptor.sock
CONTROL_PLANE_NODE_COUNT: 1
EXECUTION_NODE_COUNT: 0
AWX_LOGGING_MODE: stdout
DJANGO_SUPERUSER_PASSWORD: ${AWX_SUPERUSER_PASSWORD}
RUN_MIGRATIONS: 1
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "awx_1:${AWX_1_IP:-awx_1}"
- "receptor-hop_1:${RECEPTOR_HOP_1_IP}"
- "postgres:${POSTGRES_IP:-postgres}"
links:
- redis_2
working_dir: "/awx_devel"
volumes:
- "./VERSION:/awx_devel/VERSION"
- "./config/supervisor.conf:/etc/supervisord.conf"
- "./config/database.py:/etc/tower/conf.d/database.py"
- "./config/websocket_secret.py:/etc/tower/conf.d/websocket_secret.py"
- "./config/local_settings.py:/etc/tower/conf.d/local_settings.py"
- "./config/SECRET_KEY:/etc/tower/SECRET_KEY"
- "./config/receptor/receptor-awx.conf:/etc/receptor/receptor.conf"
- "./config/receptor/receptor.lock:/etc/receptor/receptor.conf.lock"
# - "./config/certs:/etc/receptor/certs" # TODO: optionally generate certs
- "/sys/fs/cgroup:/sys/fs/cgroup"
- "./config/kube.config:/var/lib/awx/.kube/config"
- "redis_socket_2:/var/run/redis/:rw"
tty: true
networks:
- awx
ports:
# - "7899-7999:7899-7999" # sdb-listen
- "8013:8013"
privileged: true
redis_2:
image: ghrc.io/ainamori/awx/awx/redis:dev
profiles:
- "slave"
container_name: redis_2
environment:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
networks:
- awx
volumes:
- "./config/redis.conf:/usr/local/etc/redis/redis.conf"
- "redis_socket_2:/var/run/redis/:rw"
entrypoint: [ "redis-server" ]
command: [ "/usr/local/etc/redis/redis.conf" ]
privileged: true
receptor-hop_1:
user: root
image: ghrc.io/ainamori/awx/awx/receptor:dev
profiles:
- "master"
container_name: receptor-hop_1
hostname: receptor-hop_1
command: 'receptor --config /etc/receptor/receptor.conf'
environment:
RECEPTORCTL_SOCKET: /var/run/awx-receptor/receptor.sock
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "awx_2:${AWX_2_IP}"
- "receptor-hop_2:${RECEPTOR_HOP_2_IP}"
links:
- awx_1
networks:
- awx
ports:
- "5555:5555"
volumes:
- "./config/receptor/receptor-hop_1.conf:/etc/receptor/receptor.conf"
privileged: true
receptor-hop_2:
user: root
image: ghrc.io/ainamori/awx/awx/receptor:dev
profiles:
- "slave"
container_name: receptor-hop_2
hostname: receptor-hop_2
command: "receptor --config /etc/receptor/receptor.conf"
environment:
RECEPTORCTL_SOCKET: /var/run/awx-receptor/receptor.sock
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "awx_1:${AWX_1_IP:-awx_1}"
- "receptor-hop_1:${RECEPTOR_HOP_1_IP}"
links:
- awx_2
networks:
- awx
ports:
- "5555:5555"
volumes:
- "./config/receptor/receptor-hop_2.conf:/etc/receptor/receptor.conf"
privileged: true
haproxy:
image: haproxy
profiles:
- "master"
user: root
environment:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "awx_2:${AWX_2_IP}"
- "receptor-hop_2:${RECEPTOR_HOP_2_IP}"
volumes:
- "./config/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:Z"
networks:
- awx
ports:
- "8013:8013"
# - "8043:8043"
- "1936:1936"
depends_on:
- "awx_1"
- "awx_ui_1"
privileged: true
# A useful container that simply passes through log messages to the console
# helpful for testing awx/tower logging
# logstash:
# build:
# context: ./docker-compose
# dockerfile: Dockerfile-logstash
postgres:
image: postgres:12
profiles:
- "master"
container_name: postgres_1
# additional logging settings for postgres can be found https://www.postgresql.org/docs/current/runtime-config-logging.html
command: postgres -c log_destination=stderr -c log_min_messages=info -c log_min_duration_statement=1000 -c max_connections=1024
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: awx
POSTGRES_DB: awx
POSTGRES_PASSWORD: pkpKRBtyokgJfXgRJSLA
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
networks:
- awx
ports:
- "5432:5432"
volumes:
- "awx_db:/var/lib/postgresql/data"
privileged: true
awx_ui_1:
user: root
image: ghrc.io/ainamori/awx/awx/ui:dev
profiles:
- "master"
container_name: awx_ui_1
hostname: awx_ui_1
command: "npm start"
links:
- awx_1
- postgres
- redis_1
working_dir: "/ui"
environment:
TARGET: ${AWX_TARGET}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
tty: true
networks:
- awx
ports:
- "3000:3001" # used by the UI dev env
privileged: true
receptor:
image: ghrc.io/ainamori/awx/awx/receptor:dev
profiles:
- "receptor"
user: root
container_name: receptor
hostname: ${HOSTNAME}
command: "receptor --config /etc/receptor/receptor.conf"
environment:
RECEPTORCTL_SOCKET: /var/run/awx-receptor/receptor.sock
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
extra_hosts:
- "receptor-hop_1:${RECEPTOR_HOP_1_IP}"
- "receptor-hop_2:${RECEPTOR_HOP_2_IP}"
networks:
- awx
volumes:
- "./config/receptor/receptor-worker.conf:/etc/receptor/receptor.conf"
- "/sys/fs/cgroup:/sys/fs/cgroup"
- "./config/receptor/work_public_key.pem:/etc/receptor/work_public_key.pem"
privileged: true
volumes:
awx_db:
name: awx_db
# external: true
redis_socket_1:
name: redis_socket_1
# external: true
redis_socket_2:
name: redis_socket_2
# external: true
networks:
awx: # external: true