forked from usdot-jpo-ode/jpo-cvmanager
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsample.env
410 lines (319 loc) · 13.3 KB
/
sample.env
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
######## ---------------------- DOCKER COMPOSE PROFILES ---------------------- ########
# Compose Profiles - see [README](README.md#docker-profiles) and sections below for more information
# There are a number of profiles available to start up groups of services.
# Additionally, each individual service in this project can be started by specifying its service name as a profile.
# The currently available profile groups are listed below.
# basic, webapp, intersection, intersection_no_api, conflictmonitor, addons, obu_ota
COMPOSE_PROFILES=basic,webapp,intersection
######## -------- General Variables - Apply to All Profiles
DOCKER_HOST_IP=
WEBAPP_HOST_IP=${DOCKER_HOST_IP}
# Note if using KEYCLOAK_DOMAIN for the docker-compose-webapp-deployment.yml file you will need to include http:// or https://
KEYCLOAK_DOMAIN=cvmanager.auth.com
KC_HOST_IP=${DOCKER_HOST_IP}
WEBAPP_DOMAIN=cvmanager.local.com
# Logging Levels - "DEBUG", "INFO", "WARNING", "ERROR"
API_LOGGING_LEVEL="INFO"
FIRMWARE_MANAGER_LOGGING_LEVEL="INFO"
GEO_LOGGING_LEVEL="INFO"
ISS_LOGGING_LEVEL="INFO"
RSU_STATUS_LOGGING_LEVEL="INFO"
COUNTS_LOGGING_LEVEL="INFO"
OBU_OTA_LOGGING_LEVEL="INFO"
KC_LOGGING_LEVEL="INFO" # Also includes "ALL", "FATAL", "OFF", "TRACE" and "WARN"
# Feature Flags
ENABLE_RSU_FEATURES='true' # 'false' to disable
ENABLE_INTERSECTION_FEATURES='true' # 'false' to disable
ENABLE_WZDX_FEATURES='true' # 'false' to disable
ENABLE_MOOVE_AI_FEATURES='true' # 'false' to disable
######## -------- "basic" Docker Profile Services
# Run critical cvmanager services
# Requires: None
# Compose file: docker-compose.yml
# Services:
# - cvmanager_api
# - Python backend api for webapp
# - cvmanager_postgres
# - Postgres database for cvmanager data and backing database for keycloak instance
# - cvmanager_keycloak
# - Keycloak instance for user authentication and authorization of webapp and api requests
#### ---- cvmanager_keycloak
# Keycloak authentication credentials
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin
# Keycloak Parameters - to generate secret key use a password generator such as: https://www.avast.com/en-us/random-password-generator#pc and set the length to 32
KEYCLOAK_REALM=cvmanager
KEYCLOAK_GUI_CLIENT_ID=cvmanager-gui
KEYCLOAK_API_CLIENT_ID=cvmanager-api
KEYCLOAK_API_CLIENT_SECRET_KEY=w8zpoArUwIVN6TSDY5WQgX9TlVAgH9OF
KEYCLOAK_LOGIN_THEME_NAME=sample_theme
# GCP OAuth2.0 client ID for SSO authentication in keycloak - if not specified the google SSO will not be functional
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
#### ---- cvmanager_postgres
# PostgreSQL Database connection information
# this value may need to follow with the webapp host if debugging the applications
PG_DB_HOST=${DOCKER_HOST_IP}:5432
PG_DB_NAME=postgres
PG_DB_USER=postgres
# If the PG_DB_PASS variable has special characters, make sure to wrap it in single quotes
PG_DB_PASS=postgres
#### ---- cvmanager_api
# Allowed CORS domain for accessing the CV Manager API from (set to the web application hostname)
# Make sure to include http:// or https://
# If using docker then this value should be set to: http://${WEBAPP_HOST_IP}:3000
# If running the webapp using npm then set it to: http://localhost:3000
# Leave as * to allow all domains access
CORS_DOMAIN=*
# Set these variables if using either "MONGODB" or "BIGQUERY" for COUNT_DESTINATION_DB of jpo_count_metric
# COUNTS_MSG_TYPES: Comma separated list of message types.
# COUNTS_MSG_TYPES must be set for the counts menu to correctly populate when building an image for deployment
COUNTS_MSG_TYPES='BSM,SSM,SPAT,SRM,MAP'
MONGO_PROCESSED_BSM_COLLECTION_NAME='ProcessedBsm'
MONGO_PROCESSED_PSM_COLLECTION_NAME='ProcessedPsm'
SSM_DB_NAME=
SRM_DB_NAME=
# Specifies the maximum number of V2X messages returned from the geo_query_geo_data_mongo method before filtering occurs
MAX_GEO_QUERY_RECORDS=
# If running firmware manager addon
FIRMWARE_MANAGER_ENDPOINT=http://${DOCKER_HOST_IP}:8089
# If connecting to PGDB over websocket:
INSTANCE_CONNECTION_NAME=
# Python timezone for the CV Manager (You can list pytz timezones with the command 'pytz.all_timezones')
TIMEZONE="US/Mountain"
# WZDx API key and endpoint for pulling WZDx data into the CV Manager
WZDX_API_KEY=
WZDX_ENDPOINT=data.cotrip.org
# Contact Support Menu Email Configuration
CSM_EMAIL_TO_SEND_FROM=
CSM_EMAIL_APP_USERNAME=
CSM_EMAIL_APP_PASSWORD=
CSM_EMAILS_TO_SEND_TO=
CSM_TARGET_SMTP_SERVER_ADDRESS=
CSM_TARGET_SMTP_SERVER_PORT=587
CSM_TLS_ENABLED=true
CSM_AUTH_ENABLED=true
# Moove AI feature environment variables
GOOGLE_ACCESS_KEY_NAME=sample_gcp_service_account.json
GCP_PROJECT_ID=
MOOVE_AI_SEGMENT_AGG_STATS_TABLE=
MOOVE_AI_SEGMENT_EVENT_STATS_TABLE=
######## -------- "webapp" Docker Profile Services
# Run webapp service for cvmanager
# Requires: basic
# Compose file: docker-compose.yml
# cvmanager_webapp
# - React frontend for cvmanager
# Mapbox token for map rendering in the webapp
MAPBOX_TOKEN=
# DOT_NAME must be set for the DOT name to correctly populate when building an image for deployment
DOT_NAME="CDOT"
# Initial map viewport
MAPBOX_INIT_LATITUDE="39.7392"
MAPBOX_INIT_LONGITUDE="-104.9903"
MAPBOX_INIT_ZOOM="10"
VIEWER_MSG_TYPES='BSM'
CVIZ_API_SERVER_URL=http://${DOCKER_HOST_IP}:8089
CVIZ_API_WS_URL=ws://${DOCKER_HOST_IP}:8089
# Webapp themes: light, dark, cdotDark
# base theme is used by default, dark theme is used if browser is set to dark mode
WEBAPP_THEME_LIGHT="light" # if not set, defaults to 'light'
WEBAPP_THEME_DARK="dark" # if not set, defaults to 'dark'
# Webapp logo to use, imported into docker image as volume. Set the full path to the image, for light and dark mode
WEBAPP_LOGO_PNG_ROOT_FILE_PATH_LIGHT=./webapp/cdot_icon.png
WEBAPP_LOGO_PNG_ROOT_FILE_PATH_DARK=./webapp/cdot_icon.png
######## -------- "intersection" Docker Profile Services
# Run connected intersection services
# Requires: basic
# Compose file: docker-compose-intersection.yml
# Services:
# - kafka
# - Message broker for communication between conflictmonitor intersection services
# - kafka_init
# - Initialize kafka topics, then die
# - intersection_api
# - Java backend api for intersection/conflictmonitor services
# - mongodb_container
# - MongoDB database for intersection/conflictmonitor data
#### ---- intersection_api
# GitHub Token (Required for Intersection API) - See services/intersection-api/README.md#github-token for steps to generate
MAVEN_GITHUB_TOKEN=
MAVEN_GITHUB_ORG=usdot-jpo-ode
#Specify MongoDB connection parameters
DB_HOST_IP=${DOCKER_HOST_IP}
DB_HOST_PORT=27017
KAFKA_BOOTSTRAP_SERVERS=${DOCKER_HOST_IP}:9092
KAFKA_BROKER_PORT=9092
CM_MONGO_AUTH_DB=ConflictMonitor
CM_SERVER_URL=http://${DOCKER_HOST_IP}:8082
KAFKA_BROKER_IP=${DOCKER_HOST_IP}
# Startup delay of intersection_api, to wait for kafka topics to be created by kafka_init
CM_STARTUP_DELAY_SECONDS=90
# Enable or Disable Features of the Intersection API, for rest endpoints, notification emailer task, and report generation task
INTERSECTION_API_ENABLE_API=true
INTERSECTION_API_ENABLE_EMAILER=true
INTERSECTION_API_ENABLE_REPORTS=true
# Email Configuration
INTERSECTION_EMAIL_BROKER="" # sendgrid, postmark, anything else will use generic SMTP mail server
# if EMAIL_BROKER is not set (SMTP):
INTERSECTION_SENDER_EMAIL=
INTERSECTION_SMTP_SERVER_IP=
INTERSECTION_SMTP_SERVER_PORT=1025
# if EMAIL_BROKER="sendgrid":
SENDGRID_USERNAME=
SENDGRID_PASSWORD=
# if EMAIL_BROKER="postmark":
POSTMARK_SERVER_TOKEN=
#### ---- mongodb_container
# The username and passwords to use for accessing mongoDB.
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=root
CM_MONGO_CONNECTOR_USERNAME=connector
CM_MONGO_CONNECTOR_PASSWORD=connector
CM_MONGO_API_USERNAME=api
CM_MONGO_API_PASSWORD=api
CM_MONGO_USER_USERNAME=user
CM_MONGO_USER_PASSWORD=user
CM_DATABASE_NAME=ConflictMonitor
CM_DATABASE_STORAGE_COLLECTION_NAME=MongoStorage
CM_DATABASE_SIZE_GB=50
CM_DATABASE_SIZE_TARGET_PERCENT=0.8
CM_DATABASE_DELETE_THRESHOLD_PERCENT=0.9
CM_DATABASE_MAX_TTL_RETENTION_SECONDS=518400000 # 60 days
CM_DATABASE_MIN_TTL_RETENTION_SECONDS=604800000 # 7 days
CM_DATABASE_COMPACTION_TRIGGER_PERCENT=0.5
MONGO_DB_URI="mongodb://${CM_MONGO_API_USERNAME}:${CM_MONGO_API_PASSWORD}@${DB_HOST_IP}:${DB_HOST_PORT}/?directConnection=true&authSource=${CM_MONGO_AUTH_DB}"
MONGO_DB_NAME=${CM_DATABASE_NAME}
INSERT_SAMPLE_DATA=true
######## -------- "intersection_no_api" Docker Profile Services
# Run connected intersection services without intersection_api
# Requires: basic
# Compose file: docker-compose-intersection.yml
# Services:
# - kafka
# - Message broker for communication between conflictmonitor intersection services
# - kafka_init
# - Initialize kafka topics, then die
# - mongodb_container
# - MongoDB database for intersection/conflictmonitor data
# No additional variables - see intersection variables
######## -------- "conflictmonitor" Docker Profile Services
# Run connected conflictmonitor services
# Requires: basic, intersection | intersection_no_api
# Compose file: docker-compose-conflictmonitor.yml
# Services:
# - conflictmonitor
# - Java-based kafka streaming service, generates events, assessments, and notifications from intersection data
# - ode
# - Java-based kafka streaming service, processes raw J2735 messages
# - geojsonconverter
# - Java-based kafka streaming service, generates enhanced geojson-based messages
# - connect
# - Kafka connect service, backs up data on kafka topics to MongoDB
#### ---- conflictmonitor
RESTART_POLICY="on-failure:3"
#### ---- connect
KAFKA_CONNECT_IP=${DOCKER_HOST_IP}
######## -------- "addons" Docker Profile Services
# Run all cvmanager helper microservices
# Requires: None
# Compose file: docker-compose-addons.yml
# Services: jpo_count_metric, rsu_status_check, jpo_iss_health_check, firmware_manager_upgrade_scheduler, firmware_manager_upgrade_runner
# - jpo_count_metric
# - Generates counts emails for various data types ("BSM", "TIM", "Map", "SPaT", "SRM", "SSM"). Can store in MongoDB or BigQuery
# - rsu_status_check
# - Checks status of RSUs and stores in Postgres
# - jpo_iss_health_check
# - Retrieves ISS health into and stores in Postgres
# - firmware_manager_upgrade_scheduler
# - Compares RSU firmware versions with Postgres and schedules firmware_manager_upgrade_runner
# - firmware_manager_upgrade_runner
# - Completes RSU firmware upgrades
#### ---- jpo_count_metric
# Count Metric Addon:
ENABLE_EMAILER='True'
# If ENABLE_EMAILER is 'True', set the following environment variables
DEPLOYMENT_TITLE='JPO-ODE'
# SMTP REQUIRED VARIABLES
SMTP_SERVER_IP=''
SMTP_USERNAME=''
SMTP_PASSWORD=''
SMTP_EMAIL=''
# If ENABLE_EMAILER is 'False', set the following environment variables
COUNT_MESSAGE_TYPES='bsm'
ODE_KAFKA_BROKERS=${DOCKER_HOST_IP}:9092
# EITHER "MONGODB" or "BIGQUERY"
COUNT_DESTINATION_DB='MONGODB'
# MONGODB REQUIRED VARIABLES
INPUT_COUNTS_MONGO_COLLECTION_NAME=''
OUTPUT_COUNTS_MONGO_COLLECTION_NAME=''
KAFKA_BIGQUERY_TABLENAME=
#### ---- rsu_status_check
# Services that can be toggled on or off
# 'True' or 'False' are the only legal values
# Toggles monitoring of RSU online status
RSU_PING=True
# Fetches ping data from Zabbix - alternatively the service will ping the RSUs on its own
# Only used when RSU_PING is 'True'
ZABBIX=False
# Fetches SNMP configuration data for all RSUs
RSU_SNMP_FETCH=True
# Zabbix endpoint and API authentication
# Only used when ZABBIX is 'True'
ZABBIX_ENDPOINT=
ZABBIX_USER=
ZABBIX_PASSWORD=
# Customize the period at which the purger will determine a ping log is too old and will be deleted
# Number of hours
STALE_PERIOD=24
#### ---- jpo_iss_health_check
# Key Storage
## Type of key storage, options: gcp, postgres
STORAGE_TYPE=postgres
# ISS Account Authentication
ISS_API_KEY=
ISS_API_KEY_NAME=
ISS_PROJECT_ID=
ISS_SCMS_TOKEN_REST_ENDPOINT=
ISS_SCMS_VEHICLE_REST_ENDPOINT=
## Postgres Storage (Required if STORAGE_TYPE=postgres)
### Table name to store keys
ISS_KEY_TABLE_NAME=
#### ---- firmware_manager_upgrade_runner
BLOB_STORAGE_PROVIDER=DOCKER
BLOB_STORAGE_BUCKET=
# If "BIGQUERY", set the location of the GCP service account key attached as a volume
GOOGLE_APPLICATION_CREDENTIALS='./resources/google/sample_gcp_service_account.json'
## Docker volume mount point for BLOB storage (if using Docker)
HOST_BLOB_STORAGE_DIRECTORY=./local_blob_storage
## Maximum retry limit for performing firmware upgrades
FW_UPGRADE_MAX_RETRY_LIMIT=3
#### ---- firmware_manager_upgrade_scheduler
FIRMWARE_MANAGER_UPGRADE_RUNNER_ENDPOINT=http://${DOCKER_HOST_IP}:8090
######## -------- "obu_ota" Docker Profile Services
# Run OBU over-the-air update microservices
# Requires: None
# Compose file: docker-compose-obu-ota-server.yml
# Services: jpo_ota_backend, jpo_ota_nginx
# - jpo_ota_backend
# - Over-the-air update microservice for OBUs
# - jpo_ota_nginx
# - NGINX proxy for OBU OTA backend
#### ---- jpo_ota_backend
# Route-able hostname for the server
OBU_OTA_SERVER_HOST={DOCKER_HOST_IP}
# For users using GCP cloud storage
OBU_OTA_BLOB_STORAGE_BUCKET=
OBU_OTA_BLOB_STORAGE_PATH=
# Nginx basic auth username and password
OTA_USERNAME="admin"
OTA_PASSWORD="admin"
# Max number of successful firmware upgrades to keep in the database per device SN
MAX_COUNT=10
# Nginx encryption options: "plain", "ssl"
# Note that this just changes the config file attached as a volume to the Nginx container
NGINX_ENCRYPTION="plain"
#### ---- jpo_ota_nginx
# SSL file name in path /docker/nginx/ssl/
SERVER_CERT_FILE="ota_server.crt"
SERVER_KEY_FILE="ota_server.key"