-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose-host.yml
300 lines (291 loc) · 9.43 KB
/
docker-compose-host.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
# Basic MOV.AI Flow™ cluster configuration with Redis and Redis local databases.
#
# WARNING:
# This configuration is for local development. Do not use it in a production deployment.
#
# This configuration supports basic configuration using environment variables or an .env file
# The following variables are supported:
#
# MOVAI_REGISTRY - Docker images registry
# Default: pubregistry.aws.cloud.mov.ai
# MOVAI_UID - User ID in MOVAI containers
# Default: 1000
# MOVAI_DEVICE_NAME - Docker containers identifier
# Default: Flow
# MOVAI_ENV - Docker containers environment (develop/qa/release)
# Default: qa
#
# Those configurations are useful mostly in case of standalone testing/running MOV.AI Flow™ in test/try-out mode
#
# STUDIO_USER_USERNAME - Username for the administrator account (if requested).
# Default: movai
# STUDIO_USER_PASSWORD - Password for the administrator account (if requested).
# Default: movai
#
# STUDIO_SIMU_GUI - Default Simulation GUI: WorldLauncher
#
# STUDIO_SIMU_PLUGIN_PACKAGES - List of movai ignition plugin packages to be installed.
# Default: movai-ign-plugin-world-launcher
#
# STUDIO_DB_PACKAGES - List of packages initializing the DB.
# Default: movai-baseline
#
# STUDIO_APP_PACKAGES - List of packages initializing the web apps.
# Default: movai-launcher movai-ide
#
# STUDIO_SPAWNER_PACKAGES - List of packages initializing the spawner.
# Default: ros-noetic-movai-ce-demos
#
# SPAWNER_PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting ROS spawner.
# Default: ''
#
# Feel free to modify this file to suit your needs.
---
version: "3.9"
x-movai-common:
&movai-common
environment:
&movai-common-env
MOVAI_ENV: ${MOVAI_ENV:-qa}
MOVAI_STDOUT_VERBOSITY_LEVEL: 10 # DEBUG
MOVAI_LOGFILE_VERBOSITY_LEVEL: 30 # WARNING
MOVAI_GENERAL_VERBOSITY_LEVEL: 10 # DEBUG
MOVAI_HEALTHNODE_VERBOSITY_LEVEL: 0
MOVAI_USERSPACE: /opt/mov.ai/user
MOVAI_MANAGER_URI: http://localhost:$STUDIO_HTTP_PORT
DEVICE_NAME: ${MOVAI_DEVICE_NAME:-flow}
FLEET_NAME: ${FLEET_NAME:?missing FLEET_NAME ENV var}
FLEET_TOKEN: ${FLEET_TOKEN:?missing FLEET_TOKEN ENV var}
REDIS_LOCAL_PORT: $REDIS_LOCAL_PORT
REDIS_LOCAL_HOST: localhost
REDIS_MASTER_PORT: $REDIS_MASTER_PORT
REDIS_MASTER_HOST: localhost
ROS_MASTER_URI: http://localhost:11311/
PUBLIC_IP: ${PUBLIC_IP:-127.0.0.1}
LOG_HTTP_HOST: http://localhost:$STUDIO_HTTP_PORT
IGNITION_MOVAI: "true"
IGN_PARTITION: ${IGN_PARTITION:?missing IGN_PARTITION ENV var}
IGNITION_VERSION: fortress
APT_AUTOINSTALL: "once"
APT_KEYS_URL_LIST: "https://artifacts.aws.cloud.mov.ai/repository/movai-applications/gpg"
APT_REPOS_LIST: "deb [arch=all] https://artifacts.aws.cloud.mov.ai/repository/ppa-public main main"
volumes:
- ./userspace:/opt/mov.ai/user
- ./shared:/opt/mov.ai/shared
- ./logs:/opt/mov.ai/logs
# user: "${MOVAI_UID:-1000}:0"
depends_on:
&movai-common-depend
redis-local:
condition: service_healthy
redis-master:
condition: service_healthy
extra_hosts:
&movai-common-extra-hosts
backend: 127.0.0.1
spawner: 127.0.0.1
redis-master: 127.0.0.1
redis-local: 127.0.0.1
redis-slave: 127.0.0.1
ros-master: 127.0.0.1
services:
redis-master:
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/redis2:v1.0.11
container_name: redis-master-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
network_mode: host
healthcheck:
test: ["CMD", "echo", ">", "/dev/tcp/localhost/${REDIS_MASTER_PORT}"]
start_period: 3s
interval: 10s
timeout: 2s
retries: 3
volumes:
- redis-master-flow-volume:/data
environment:
<<: *movai-common-env
APT_INSTALL_LIST: $STUDIO_DB_PACKAGES
REDIS_PORT: $REDIS_MASTER_PORT
restart: unless-stopped
extra_hosts:
<<: *movai-common-extra-hosts
redis-local:
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/redis2:v1.0.11
container_name: redis-local-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
network_mode: host
healthcheck:
test: ["CMD", "echo", ">", "/dev/tcp/localhost/${REDIS_LOCAL_PORT}"]
start_period: 3s
interval: 10s
timeout: 2s
retries: 3
volumes:
- redis-local-flow-volume:/data
restart: unless-stopped
environment:
- REDIS_PORT=$REDIS_LOCAL_PORT
extra_hosts:
<<: *movai-common-extra-hosts
backend:
<<: *movai-common
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/backend-noetic:1.0.0.23
container_name: backend-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
network_mode: host
depends_on:
<<: *movai-common-depend
environment:
<<: *movai-common-env
APT_INSTALL_LIST: "$STUDIO_APP_PACKAGES"
HTTP_PORT: ${STUDIO_HTTP_PORT}
DEFAULT_USERNAME: movai
DEFAULT_PASSWORD: movai
JWT_SECRET_KEY: ${JWT_SECRET_KEY:?missing JWT_SECRET_KEY ENV var}
healthcheck:
test: ["CMD", "echo", ">", "/dev/tcp/localhost/${STUDIO_HTTP_PORT}"]
start_period: 5s
interval: 10s
timeout: 2s
retries: 3
restart: unless-stopped
extra_hosts:
<<: *movai-common-extra-hosts
ros-master:
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/ros-master-noetic:v1.0.2
privileged: true
network_mode: host
depends_on:
backend:
condition: service_healthy
container_name: ros-master-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
healthcheck:
test: ["CMD-SHELL", ". /opt/ros/noetic/setup.sh && /opt/ros/noetic/bin/rostopic list | grep -w '/rosout' >> /dev/null"]
start_period: 3s
interval: 10s
timeout: 2s
retries: 3
restart: unless-stopped
extra_hosts:
<<: *movai-common-extra-hosts
spawner:
<<: *movai-common
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/spawner-ign-noetic:v3.0.10
privileged: true
network_mode: host
depends_on:
<<: *movai-common-depend
backend:
condition: service_healthy
healthcheck:
test: pgrep -f "/usr/bin/python3 -m flow_initiator"
start_period: 10s
interval: 10s
timeout: 3s
retries: 1
container_name: spawner-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
volumes:
- /dev:/dev
- /sys/devices:/sys/devices
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
- /run/movai:/var/run/movai
- ./userspace:/opt/mov.ai/user
- ./shared:/opt/mov.ai/shared
- ./logs:/opt/mov.ai/logs
environment:
<<: *movai-common-env
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APP_NAME: spawner
APT_INSTALL_LIST: $STUDIO_SPAWNER_PACKAGES
ROS_IP: $ROS_IP
restart: unless-stopped
extra_hosts:
<<: *movai-common-extra-hosts
simulator:
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/ignition-gazebo:v1.0.4
container_name: simulator-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
profiles: ["simulator"]
environment:
<<: *movai-common-env
DISPLAY: "$DISPLAY"
QT_X11_NO_MITSHM: "1"
XAUTHORITY: "$XAUTH"
IGN_GAZEBO_SYSTEM_PLUGIN_PATH: /movai_ign_plugins/system:/models_database/plugins/system
IGN_GUI_PLUGIN_PATH: /movai_ign_plugins/gui:/models_database/plugins/gui
IGN_GAZEBO_RESOURCE_PATH: /models_database/my_models
APT_INSTALL_LIST: $STUDIO_SIMU_PLUGIN_PACKAGES
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- $XAUTH:$XAUTH
- ./models_database:/models_database
- ./models_database/fuel:/root/.ignition/fuel
network_mode: host
privileged: true
tty: true
healthcheck:
test: pgrep -f "ign gui -s $STUDIO_SIMU_GUI"
start_period: 3s
interval: 30s
timeout: 3s
retries: 10
command: ign gui -s $STUDIO_SIMU_GUI
extra_hosts:
<<: *movai-common-extra-hosts
ros-tools:
image: ${MOVAI_REGISTRY:-pubregistry.aws.cloud.mov.ai}/ce/ros-tools-ce:v1.0.4
container_name: ros-tools-$MOVAI_DEVICE_NAME
logging:
driver: "journald"
options:
mode: "non-blocking"
max-buffer-size: "4m"
profiles: ["tools"]
environment:
<<: *movai-common-env
DISPLAY: "$DISPLAY"
QT_X11_NO_MITSHM: "1"
XAUTHORITY: "$XAUTH"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- $XAUTH:$XAUTH
- ./rviz/:/headless/.rviz/:rw
network_mode: host
privileged: true
tty: true
entrypoint: /bin/bash
command:
- -ic
- |
exec /usr/bin/rviz
extra_hosts:
<<: *movai-common-extra-hosts
volumes:
redis-master-flow-volume:
redis-local-flow-volume: