Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync develop to master #610

Merged
merged 10 commits into from
Apr 30, 2024
4 changes: 4 additions & 0 deletions .github/workflows/sonar-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
branches:
- develop
- master
- "release/*"
pull_request:
types: [opened, synchronize, reopened]
name: Sonar Workflow
Expand All @@ -13,6 +14,9 @@ jobs:
image: ubuntu:jammy-20230126
steps:
- name: Install curl, zip, git, gcovr
# Installing gcovr for unit test code coverage
# Installing git for checkout action
# installing curl/zip for sonar-cpp action
run: |
apt update
export DEBIAN_FRONTEND=noninteractive
Expand Down
20 changes: 15 additions & 5 deletions configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php:7.6.0
image: usdotfhwaops/php:${V2XHUB_VERSION:-develop}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a syntax error. Do you mean just ${V2XHUB_VERSION}?
ditto for all occurrences in the PR.
And does this variable need to be in a .env file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is not a syntax error. This is how you specify docker-compose environment variables with a default value https://docs.docker.com/compose/environment-variables/env-file/#interpolation. This way we do not have to provide an .env file but if one is used it will overwrite the default values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we distinguish this v2xhub docker version from the v2xhub ( plugins ) software version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not.

container_name: php
network_mode: host
depends_on:
Expand All @@ -30,23 +30,33 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubamd:7.6.0
image: usdotfhwaops/v2xhubamd:${V2XHUB_VERSION:-develop}
container_name: v2xhub
network_mode: host
restart: always
depends_on:
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
- INFRASTRUCTURE_ID=rsu_<J2735 MAP MESSAGE INTERSECTION ID>
- INFRASTRUCTURE_NAME=<RSU_NAME>
- SIMULATION_MODE=${SIMULATION_MODE:-false}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we reading this variable from .env file? If yes, can we upload a sample.env file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default values alleviate a need for a sample env. With non provided it will use the default values. I could add documentation to instruct users on how to generate a .env file

Copy link
Contributor

@dan-du-car dan-du-car Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be beneficial if we could provide a sample.env, such as:

  • Default values are great ideas. However, if users need adjust the env variables to fit their specific needs, they can reuse this sample tempate and move it to .env and update the values. It is simpler and more straightforward than reading trough docs.
  • In the sample.env, we can also provide more descriptions about the definitions of these env variables, and how they are used in the system as needed.
  • I would prefer to use a centralized location for references of env variables.

Since this is not our standard practice, I am ok leaving as it.

- SIMULATION_IP=${SIMULATION_IP:-127.0.0.1}
- SIMULATION_REGISTRATION_PORT=6767
- LOCAL_IP=${LOCAL_IP:-127.0.0.1}
- TIME_SYNC_TOPIC=time_sync
- TIME_SYNC_PORT=7575
- SIM_V2X_PORT=5757
- SIM_INTERACTION_PORT=7576
- V2X_PORT=8686
- INFRASTRUCTURE_ID=${INFRASTRUCTURE_ID:-rsu_1234}
- INFRASTRUCTURE_NAME=${INFRASTRUCTURE_NAME:-East Intersection}
- SENSOR_JSON_FILE_PATH=${SENSOR_JSON_FILE_PATH:-/var/www/plugins/MAP/sensors.json}
secrets:
- mysql_password
volumes:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice:7.6.0
image: usdotfhwaops/port-drayage-webservice:${V2XHUB_VERSION:-develop}
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
6 changes: 3 additions & 3 deletions configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php_arm:7.6.0
image: usdotfhwaops/php_arm:${V2XHUB_VERSION:-develop}
container_name: php
network_mode: host
depends_on:
Expand All @@ -30,7 +30,7 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubarm:7.6.0
image: usdotfhwaops/v2xhubarm:${V2XHUB_VERSION:-develop}
container_name: v2xhub
network_mode: host
restart: always
Expand All @@ -44,7 +44,7 @@ services:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice_arm:7.6.0
image: usdotfhwaops/port-drayage-webservice_arm:${V2XHUB_VERSION:-develop}
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
Loading