Skip to content

Commit a4cb454

Browse files
authored
Merge pull request #5 from CDOT-CV/usdot-sync
Syncing fork with USDOT
2 parents 5de1dde + 9393457 commit a4cb454

File tree

9 files changed

+51
-44
lines changed

9 files changed

+51
-44
lines changed

.github/workflows/docker.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ jobs:
2121
MAVEN_GITHUB_TOKEN=${{ secrets.MAVEN_GITHUB_TOKEN }}
2222
MAVEN_GITHUB_ORG=${{ github.repository_owner }}
2323
secrets: |
24-
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
24+
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
25+
cache-from: type=gha
26+
cache-to: type=gha,mode=max

.github/workflows/dockerhub.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ jobs:
3636
MAVEN_GITHUB_TOKEN=${{ secrets.MAVEN_GITHUB_TOKEN }}
3737
MAVEN_GITHUB_ORG=${{ github.repository_owner }}
3838
secrets: |
39-
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
39+
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
40+
cache-from: type=gha
41+
cache-to: type=gha,mode=max

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ The JPO ITS utilities repository serves as a central location for deploying open
2121
- [Configuration](#configuration)
2222
- [Configure Kafka Connector Creation](#configure-kafka-connector-creation)
2323
- [Quick Run](#quick-run-2)
24-
- [5. Deduplicator](#5-jpo-Deduplicator)
25-
- [Deduplication Configuration](#deduplication-config)
26-
- [Github Token Generation](#generate-a-github-token)
24+
- [5. jpo-deduplicator](#5-jpo-deduplicator)
25+
- [Deduplication Config](#deduplication-config)
26+
- [Generate a Github Token](#generate-a-github-token)
2727
- [Quick Run](#quick-run-3)
28+
- [Security Notice](#security-notice)
2829

2930

3031
<a name="base-configuration"></a>
@@ -254,3 +255,12 @@ For local development the following steps are also required
254255
4. You should now see only one copy of the map message sent.
255256

256257
[Back to top](#toc)
258+
259+
## Security Notice
260+
261+
While default passwords are provided for development convenience, it is **strongly recommended** to:
262+
263+
1. Change all passwords before deploying to any environment
264+
2. Never use default passwords in production
265+
3. Use secure password generation and management practices
266+
4. Consider using Docker secrets or environment management tools for production deployments

docker-compose-deduplicator.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,21 @@ services:
77
context: jpo-deduplicator
88
dockerfile: Dockerfile
99
args:
10-
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN:?error}
11-
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG:?error}
10+
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN}
11+
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG}
1212
image: jpo-deduplicator:latest
1313
restart: ${RESTART_POLICY}
1414
environment:
1515
DOCKER_HOST_IP: ${DOCKER_HOST_IP}
16-
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:?error}
17-
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:?error}
16+
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS}
17+
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
1818
enableProcessedMapDeduplication: ${ENABLE_PROCESSED_MAP_DEDUPLICATION}
1919
enableProcessedMapWktDeduplication: ${ENABLE_PROCESSED_MAP_WKT_DEDUPLICATION}
2020
enableOdeMapDeduplication: ${ENABLE_ODE_MAP_DEDUPLICATION}
2121
enableOdeTimDeduplication: ${ENABLE_ODE_TIM_DEDUPLICATION}
2222
enableOdeRawEncodedTimDeduplication: ${ENABLE_ODE_RAW_ENCODED_TIM_DEDUPLICATION}
2323
enableProcessedSpatDeduplication: ${ENABLE_PROCESSED_SPAT_DEDUPLICATION}
2424
enableOdeBsmDeduplication: ${ENABLE_ODE_BSM_DEDUPLICATION}
25-
26-
27-
2825
healthcheck:
2926
test: ["CMD", "java", "-version"]
3027
interval: 10s

jikkou/kafka-topics-values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ apps:
8282
- topic.OdeRawEncodedPSMJson
8383
- topic.OdePsmTxPojo
8484
- topic.OdePsmJson
85+
- topic.OdeTimRxJson
8586
tableTopics: {}
8687
customTopics: {}
8788
geojsonconverter:
@@ -155,6 +156,7 @@ apps:
155156
- topic.CmSignalStateConflictNotificationAggregation
156157
- topic.CmSpatTimeChangeDetailsNotificationAggregation
157158
- topic.CmEventStateProgressionNotificationAggregation
159+
- topic.CmEventStateProgressionNotification
158160
customTopics: {}
159161
deduplicator:
160162
name: jpo-deduplicator

jpo-deduplicator/Dockerfile

+2-11
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,8 @@ ARG MAVEN_GITHUB_ORG
88
ENV MAVEN_GITHUB_TOKEN=$MAVEN_GITHUB_TOKEN
99
ENV MAVEN_GITHUB_ORG=$MAVEN_GITHUB_ORG
1010

11-
# COPY ./jpo-conflictmonitor/pom.xml ./jpo-conflictmonitor/
12-
# COPY ./settings.xml ./jpo-conflictmonitor/
13-
14-
# # Copy and Build Conflict Monitor
15-
# # Download dependencies alone to cache them first
16-
# WORKDIR /home/jpo-conflictmonitor
17-
# RUN mvn -s settings.xml dependency:resolve
18-
19-
# # Copy the source code and build the conflict monitor
20-
# COPY ./jpo-conflictmonitor/src ./src
21-
# RUN mvn -s settings.xml install -DskipTests -Ppackage-jar
11+
RUN test -n "$MAVEN_GITHUB_TOKEN" || (echo "Error: MAVEN_GITHUB_TOKEN cannot be empty" && exit 1)
12+
RUN test -n "$MAVEN_GITHUB_ORG" || (echo "Error: MAVEN_GITHUB_ORG cannot be empty" && exit 1)
2213

2314
# Copy and Build Deduplicator
2415
WORKDIR /home

jpo-deduplicator/jpo-deduplicator/settings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<repositories>
1717
<repository>
1818
<id>github</id>
19-
<name>GitHub JPO Repositories</name>
19+
<name>GitHub JPO Conflict Monitor</name>
2020
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/*</url>
2121
<snapshots>
2222
<enabled>false</enabled>

mongo/create_indexes.js

+18-15
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ const conflictMonitorCollections = [
113113
{ name: "CmMapMessageCountProgressionEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
114114
{ name: "CmBsmMessageCountProgressionEvents", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
115115

116-
{ name: "SpatMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
117-
{ name: "MapMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
118-
{ name: "IntersectionReferenceAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
119-
{ name: "SignalGroupAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
120-
{ name: "SignalStateConflictAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
121-
{ name: "TimeChangeDetailsAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
122-
{ name: "EventStateProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
123-
{ name: "BsmMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
124-
{ name: "MapMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
125-
{ name: "SpatMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
116+
{ name: "CmSpatMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
117+
{ name: "CmMapMinimumDataAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
118+
{ name: "CmIntersectionReferenceAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
119+
{ name: "CmSignalGroupAlignmentAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
120+
{ name: "CmSignalStateConflictAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
121+
{ name: "CmTimeChangeDetailsAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
122+
{ name: "CmEventStateProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
123+
{ name: "CmBsmMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
124+
{ name: "CmMapMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
125+
{ name: "CmSpatMessageCountProgressionAggregation", ttlField: "eventGeneratedAt", timeField: "eventGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
126126

127127

128128
// Conflict Monitor Assessments
@@ -142,11 +142,14 @@ const conflictMonitorCollections = [
142142
{ name: "CmStopLineStopNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
143143
{ name: "CmNotification", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
144144

145-
{ name: "EventStateProgressionNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
146-
{ name: "IntersectionReferenceAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
147-
{ name: "SignalGroupAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
148-
{ name: "SignalStateConflictNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
149-
{ name: "TimeChangeDetailsNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds }
145+
{ name: "CmEventStateProgressionNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
146+
{ name: "CmIntersectionReferenceAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
147+
{ name: "CmSignalGroupAlignmentNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
148+
{ name: "CmSignalStateConflictNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
149+
{ name: "CmTimeChangeDetailsNotificationAggregation", ttlField: "notificationGeneratedAt", timeField: "notificationGeneratedAt", intersectionField: "intersectionID", expireTime: expireSeconds },
150+
151+
// Reports
152+
{ name: "CmReport", timeField: "reportGeneratedAt", intersectionField: "intersectionID"},
150153

151154
];
152155

sample.env

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ MONGO_DB_NAME=CV
6262

6363
# Generate a random string for the MongoDB keyfile using the following command:
6464
# $ openssl rand -base64 32
65-
MONGO_DB_KEYFILE_STRING=
65+
MONGO_DB_KEYFILE_STRING=replace_me
6666

6767
MONGO_ADMIN_DB_USER=admin
68-
MONGO_ADMIN_DB_PASS=
68+
MONGO_ADMIN_DB_PASS=replace_me
6969

7070
MONGO_READ_WRITE_USER=ode
71-
MONGO_READ_WRITE_PASS=
71+
MONGO_READ_WRITE_PASS=replace_me
7272

7373
MONGO_READ_USER=user
74-
MONGO_READ_PASS=
74+
MONGO_READ_PASS=replace_me
7575

7676
MONGO_EXPORTER_USERNAME=export
77-
MONGO_EXPORTER_PASSWORD=
77+
MONGO_EXPORTER_PASSWORD=replace_me
7878

7979
MONGO_EXPRESS_USER=${MONGO_ADMIN_DB_USER}
8080
MONGO_EXPRESS_PASS=${MONGO_ADMIN_DB_PASS}

0 commit comments

Comments
 (0)