Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:usdot-jpo-ode/jpo-utils into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
John-Wiens committed Jan 9, 2025
2 parents 6e701ef + 6699a42 commit 3494fde
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 55 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ jobs:
MAVEN_GITHUB_TOKEN=${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_ORG=${{ github.repository_owner }}
secrets: |
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 3 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ jobs:
MAVEN_GITHUB_TOKEN=${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_ORG=${{ github.repository_owner }}
secrets: |
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
cache-from: type=gha
cache-to: type=gha,mode=max
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ The JPO ITS utilities repository serves as a central location for deploying open
- [Configuration](#configuration)
- [Configure Kafka Connector Creation](#configure-kafka-connector-creation)
- [Quick Run](#quick-run-2)
- [5. Deduplicator](#5-jpo-Deduplicator)
- [Deduplication Configuration](#deduplication-config)
- [Github Token Generation](#generate-a-github-token)
- [5. jpo-deduplicator](#5-jpo-deduplicator)
- [Deduplication Config](#deduplication-config)
- [Generate a Github Token](#generate-a-github-token)
- [Quick Run](#quick-run-3)
- [Security Notice](#security-notice)


<a name="base-configuration"></a>
Expand Down Expand Up @@ -256,3 +257,12 @@ For local development the following steps are also required
4. You should now see only one copy of the map message sent.

[Back to top](#toc)

## Security Notice

While default passwords are provided for development convenience, it is **strongly recommended** to:

1. Change all passwords before deploying to any environment
2. Never use default passwords in production
3. Use secure password generation and management practices
4. Consider using Docker secrets or environment management tools for production deployments
11 changes: 4 additions & 7 deletions docker-compose-deduplicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@ services:
context: jpo-deduplicator
dockerfile: Dockerfile
args:
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN:?error}
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG:?error}
MAVEN_GITHUB_TOKEN: ${MAVEN_GITHUB_TOKEN}
MAVEN_GITHUB_ORG: ${MAVEN_GITHUB_ORG}
image: jpo-deduplicator:latest
restart: ${RESTART_POLICY}
environment:
DOCKER_HOST_IP: ${DOCKER_HOST_IP}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:?error}
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:?error}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS}
spring.kafka.bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
enableProcessedMapDeduplication: ${ENABLE_PROCESSED_MAP_DEDUPLICATION}
enableProcessedMapWktDeduplication: ${ENABLE_PROCESSED_MAP_WKT_DEDUPLICATION}
enableOdeMapDeduplication: ${ENABLE_ODE_MAP_DEDUPLICATION}
enableOdeTimDeduplication: ${ENABLE_ODE_TIM_DEDUPLICATION}
enableOdeRawEncodedTimDeduplication: ${ENABLE_ODE_RAW_ENCODED_TIM_DEDUPLICATION}
enableProcessedSpatDeduplication: ${ENABLE_PROCESSED_SPAT_DEDUPLICATION}
enableOdeBsmDeduplication: ${ENABLE_ODE_BSM_DEDUPLICATION}



healthcheck:
test: ["CMD", "java", "-version"]
interval: 10s
Expand Down
2 changes: 2 additions & 0 deletions jikkou/kafka-topics-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ apps:
- topic.OdeRawEncodedPSMJson
- topic.OdePsmTxPojo
- topic.OdePsmJson
- topic.OdeTimRxJson
tableTopics: {}
customTopics: {}
geojsonconverter:
Expand Down Expand Up @@ -155,6 +156,7 @@ apps:
- topic.CmSignalStateConflictNotificationAggregation
- topic.CmSpatTimeChangeDetailsNotificationAggregation
- topic.CmEventStateProgressionNotificationAggregation
- topic.CmEventStateProgressionNotification
customTopics: {}
deduplicator:
name: jpo-deduplicator
Expand Down
13 changes: 2 additions & 11 deletions jpo-deduplicator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@ ARG MAVEN_GITHUB_ORG
ENV MAVEN_GITHUB_TOKEN=$MAVEN_GITHUB_TOKEN
ENV MAVEN_GITHUB_ORG=$MAVEN_GITHUB_ORG

# COPY ./jpo-conflictmonitor/pom.xml ./jpo-conflictmonitor/
# COPY ./settings.xml ./jpo-conflictmonitor/

# # Copy and Build Conflict Monitor
# # Download dependencies alone to cache them first
# WORKDIR /home/jpo-conflictmonitor
# RUN mvn -s settings.xml dependency:resolve

# # Copy the source code and build the conflict monitor
# COPY ./jpo-conflictmonitor/src ./src
# RUN mvn -s settings.xml install -DskipTests -Ppackage-jar
RUN test -n "$MAVEN_GITHUB_TOKEN" || (echo "Error: MAVEN_GITHUB_TOKEN cannot be empty" && exit 1)
RUN test -n "$MAVEN_GITHUB_ORG" || (echo "Error: MAVEN_GITHUB_ORG cannot be empty" && exit 1)

# Copy and Build Deduplicator
WORKDIR /home
Expand Down
28 changes: 1 addition & 27 deletions jpo-deduplicator/jpo-deduplicator/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
<username>jpo_deduplicator</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
<server>
<id>github_jpo_ode</id>
<username>jpo_deduplicator</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
<server>
<id>github_jpo_geojsonconverter</id>
<username>jpo_deduplicator</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
</servers>
<profiles>
<profile>
Expand All @@ -27,23 +17,7 @@
<repository>
<id>github</id>
<name>GitHub JPO Conflict Monitor</name>
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/jpo-conflictmonitor</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>github_jpo_ode</id>
<name>GitHub JPO ODE</name>
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/jpo-ode</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>github_jpo_geojsonconverter</id>
<name>GitHub JPO GeojsonConverter</name>
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/jpo-geojsonconverter</url>
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/*</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
Expand Down
10 changes: 5 additions & 5 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ MONGO_DB_NAME=CV

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

MONGO_ADMIN_DB_USER=admin
MONGO_ADMIN_DB_PASS=
MONGO_ADMIN_DB_PASS=replace_me

MONGO_READ_WRITE_USER=ode
MONGO_READ_WRITE_PASS=
MONGO_READ_WRITE_PASS=replace_me

MONGO_READ_USER=user
MONGO_READ_PASS=
MONGO_READ_PASS=replace_me

MONGO_EXPORTER_USERNAME=export
MONGO_EXPORTER_PASSWORD=
MONGO_EXPORTER_PASSWORD=replace_me

MONGO_EXPRESS_USER=${MONGO_ADMIN_DB_USER}
MONGO_EXPRESS_PASS=${MONGO_ADMIN_DB_PASS}
Expand Down

0 comments on commit 3494fde

Please sign in to comment.