Skip to content

Commit

Permalink
Merge pull request #347 from usdot-fhwa-OPS/release_7.2
Browse files Browse the repository at this point in the history
Release 7.2
  • Loading branch information
snallamothu authored Apr 12, 2022
2 parents 0b32a79 + d590808 commit 53e91f4
Show file tree
Hide file tree
Showing 57 changed files with 1,365 additions and 284 deletions.
80 changes: 25 additions & 55 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,40 +118,46 @@ jobs:
fi
docker_build_push :
machine:
image: ubuntu-1604:202004-01
image: ubuntu-2004:202201-02
steps:
- checkout
- run:
name: Docker Build
# Build v2xhub and php docker branch images
command: |
docker build -f docker/php.yml -t usdotfhwaops/php:${CIRCLE_BRANCH,,} .
docker build -f docker/Dockerfile-php -t usdotfhwaops/php:${CIRCLE_BRANCH,,} .
docker build -t usdotfhwaops/v2xhubamd:${CIRCLE_BRANCH,,} .
- run:
cd ./tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,} .
- run:
name: Docker Push
# Push v2xhub and php docker images to usdotfhwaops dockerhub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/v2xhubamd:${CIRCLE_BRANCH,,}
docker push usdotfhwaops/php:${CIRCLE_BRANCH,,}
docker push usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,}
docker_build_push_develop :
machine:
image: ubuntu-1604:202004-01
image: ubuntu-2004:202201-02
steps:
- checkout
- run:
name: Docker Build
# Build v2xhub and php docker images develop images
command: |
docker build -f docker/php.yml -t usdotfhwaops/php:latest .
docker build -t usdotfhwaops/v2xhubamd:latest .
docker build -f docker/Dockerfile-php -t usdotfhwaops/php:latest .
docker build -t usdotfhwaops/v2xhubamd:latest .
cd ./tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:latest .
- run:
name: Docker Push
# Push v2xhub and php docker images to usdotfhwaops dockerhub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/v2xhubamd:latest
docker push usdotfhwaops/php:latest
docker push usdotfhwaops/port-drayage-webservice:latest
arm_build_push :
machine:
Expand All @@ -164,13 +170,19 @@ jobs:
# Run MYSQL image and build v2xhub docker image
command: |
docker build -f docker/Dockerfile-depl -t usdotfhwaops/v2xhubarm:${CIRCLE_BRANCH,,} .
docker build -f docker/Dockerfile-php -t usdotfhwaops/php_arm:${CIRCLE_BRANCH,,} .
cd ./tools/port-drayage-webservice/
docker build -f Dockerfile-arm -t usdotfhwaops/port-drayage-webservice_arm:${CIRCLE_BRANCH,,} .
- run:
name: Docker Push
# Push v2xhub docker image to usdotfhwaops dockerhub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/v2xhubarm:${CIRCLE_BRANCH,,}
docker push usdotfhwaops/port-drayage-webservice_arm:${CIRCLE_BRANCH,,}
docker push usdotfhwaops/php_arm:${CIRCLE_BRANCH,,}
arm_build_push_develop :
machine:
image: ubuntu-2004:202101-01
Expand All @@ -182,53 +194,19 @@ jobs:
# Run MYSQL image and build v2xhub docker image develop image
command: |
docker build -f docker/Dockerfile-depl -t usdotfhwaops/v2xhubarm:latest .
docker build -f docker/Dockerfile-php -t usdotfhwaops/php_arm:latest .
cd ./tools/port-drayage-webservice/
docker build -f Dockerfile-arm -t usdotfhwaops/port-drayage-webservice_arm:latest .
- run:
name: Docker Push
# Push v2xhub docker image to usdotfhwaops dockerhub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/v2xhubarm:latest
port_drayage_webservice_build_develop :
docker:
- image: cimg/openjdk:11.0.12
steps:
- setup_remote_docker
- checkout
- run:
name: Maven Build JAR
# Build Port Drayage Web Service
command: |
cd tools/port-drayage-webservice/
mvn clean install
- run:
name: Build Docker Image and Push
# Build and push Port Drayage Web Service Docker images
command: |
cd tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:latest .
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/port-drayage-webservice:latest
port_drayage_webservice_build :
docker:
- image: cimg/openjdk:11.0.12
steps:
- setup_remote_docker
- checkout
- run:
name: Maven Build JAR
# Build Port Drayage Web Service
command: |
cd tools/port-drayage-webservice/
mvn clean install
- run:
name: Build Docker Image and Push
# Build and push Port Drayage Web Service Docker images
command: |
cd tools/port-drayage-webservice/
docker build -t usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,} .
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
docker push usdotfhwaops/port-drayage-webservice:${CIRCLE_BRANCH,,}
docker push usdotfhwaops/port-drayage-webservice_arm:latest
docker push usdotfhwaops/php_arm:latest
workflows:
version: 2
build:
Expand All @@ -255,13 +233,5 @@ workflows:
- sonar-scanner_develop:
requires:
- docker_build_push_develop
- port_drayage_webservice_build_develop:
filters:
branches:
only: develop
- port_drayage_webservice_build:
filters:
branches:
ignore: develop



4 changes: 2 additions & 2 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ PedestrianPlugin.sonar.cfamily.gcov.reportsPath =coverage
PreemptionPlugin.sonar.cfamily.gcov.reportsPath =coverage
#RtcmPlugin.sonar.cfamily.gcov.reportsPath =coverage
#SPaTLoggerPlugin.sonar.cfamily.gcov.reportsPath =coverage
#SpatPlugin.sonar.cfamily.gcov.reportsPath =coverage
SpatPlugin.sonar.cfamily.gcov.reportsPath =coverage
#TimPlugin.sonar.cfamily.gcov.reportsPath =coverage
#CARMACloudPlugin.sonar.cfamily.gcov.reportsPath =coverage
#MobilityOperationPlugin.sonar.cfamily.gcov.reportsPath =coverage
Expand All @@ -155,7 +155,7 @@ PedestrianPlugin.sonar.tests=test
PreemptionPlugin.sonar.tests=test
#RtcmPlugin.sonar.tests=test
#SPaTLoggerPlugin.sonar.tests=test
#SpatPlugin.sonar.tests=test
SpatPlugin.sonar.tests=test
#TimPlugin.sonar.tests=test
#CARMACloudPlugin.sonar.tests=test
#MobilityOperationPlugin.sonar.tests=test
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM ubuntu:bionic-20190807
FROM ubuntu:focal-20220113

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y sudo cmake gcc-7 g++-7 libboost1.65-dev libboost-thread1.65-dev libboost-regex1.65-dev libboost-log1.65-dev libboost-program-options1.65-dev libboost1.65-all-dev libxerces-c-dev libcurl4-openssl-dev libsnmp-dev libmysqlclient-dev libjsoncpp-dev uuid-dev libusb-dev libusb-1.0-0-dev libftdi-dev swig liboctave-dev gpsd libgps-dev portaudio19-dev libsndfile1-dev libglib2.0-dev libglibmm-2.4-dev libpcre3-dev libsigc++-2.0-dev libxml++2.6-dev libxml2-dev liblzma-dev dpkg-dev libmysqlcppconn-dev libev-dev libuv-dev git vim zip build-essential libssl-dev qtbase5-dev qtbase5-dev-tools curl libqhttpengine-dev libgtest-dev libcpprest-dev librdkafka-dev
RUN apt-get update && apt-get install -y sudo cmake gcc-7 g++-7 libboost1.71-all-dev libxerces-c-dev libcurl4-openssl-dev libsnmp-dev libmysqlclient-dev libjsoncpp-dev uuid-dev libusb-dev libusb-1.0-0-dev libftdi-dev swig liboctave-dev gpsd libgps-dev portaudio19-dev libsndfile1-dev libglib2.0-dev libglibmm-2.4-dev libpcre3-dev libsigc++-2.0-dev libxml++2.6-dev libxml2-dev liblzma-dev dpkg-dev libmysqlcppconn-dev libev-dev libuv1-dev git vim zip build-essential libssl-dev qtbase5-dev qtbase5-dev-tools curl libqhttpengine-dev libgtest-dev libcpprest-dev librdkafka-dev

WORKDIR cd /usr/src/googletest/googletest
RUN mkdir ~/build
WORKDIR /usr/src/googletest/googletest/build
RUN cmake ..
RUN make
RUN cp libgtest* /usr/lib/
RUN cd lib && cp libgtest* /usr/lib/
WORKDIR cd /usr/src/googletest/googletest
RUN rm -rf build
RUN mkdir /usr/local/lib/googletest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/bin/bash
# Fail when any command fails
#set -e

# Ensure mysql-client is installed
sudo apt-get update
sudo apt-get install mysql-client
REQUIRED_PKG="mysql-client"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed")
echo Checking for $REQUIRED_PKG: $PKG_OK
if [ "" = "$PKG_OK" ]; then
echo "No $REQUIRED_PKG found. Installing $REQUIRED_PKG."
sudo apt-get update
sudo apt-get --yes install $REQUIRED_PKG
fi

# Adds V2X-Hub user to mysql db
read -p "Please enter a username: " USER
Expand All @@ -12,16 +19,17 @@ read -s -p "Please enter a password: " PASS

PASS_LENGTH=`echo $PASS | wc -c`

if [ $PASS_LENGTH -ge 8 ] && echo $PASS | grep -q [a-z] && echo $PASS | grep -q [A-Z] && echo $PASS | grep -q [0-9] && echo $PASS | grep -q [\$\!\.\+_-\*@\#\^%\?~]; then
echo "Confirm password: "
read -s CONF_PASS
if [ $PASS_LENGTH -ge 8 ] && echo $PASS | grep -q [a-z] && echo $PASS | grep -q [A-Z] && echo $PASS | grep -q [0-9] && ( echo $PASS | grep -q [\$\!\.\+_\*@\#\^%\?~] || echo $PASS | grep -q [-] ); then
echo
read -s -p "Confirm password: " CONF_PASS
while [ $CONF_PASS != $PASS ]; do
echo "Passwords do not match. Please re-enter password: "
read -s CONF_PASS
echo
read -s -p "Passwords do not match. Please re-enter password: " CONF_PASS
done
echo "VALID PASSWORD"
echo "Enter MYSQL ROOT PASSWORD: "
mysql -uroot -p --silent -h127.0.0.1 -e "INSERT INTO IVP.user (IVP.user.username, IVP.user.password, IVP.user.accessLevel) VALUES('$USER', '$PASS', 3)"
echo "V2X Hub user successfully added"
else
echo "INVALID PASSWORD"
echo "Password must be 8-12 charcters, and contain at least one of each of the following: uppercase letter, lowercase letter, number, and symbol"
Expand Down
4 changes: 2 additions & 2 deletions configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- ./mysql/port_drayage.sql:/docker-entrypoint-initdb.d/port_drayage.sql

php:
image: usdotfhwaops/php:latest
image: usdotfhwaops/php_arm:latest
container_name: php
network_mode: host
depends_on:
Expand All @@ -43,7 +43,7 @@ services:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice:latest
image: usdotfhwaops/port-drayage-webservice_arm:latest
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
2 changes: 1 addition & 1 deletion configuration/arm64/initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo apt -y install python3-pip
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/bin/bash
# Fail when any command fails
#set -e

# Ensure mysql-client is installed
sudo apt-get update
sudo apt-get install mysql-client
REQUIRED_PKG="mysql-client"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed")
echo Checking for $REQUIRED_PKG: $PKG_OK
if [ "" = "$PKG_OK" ]; then
echo "No $REQUIRED_PKG found. Installing $REQUIRED_PKG."
sudo apt-get update
sudo apt-get --yes install $REQUIRED_PKG
fi

# Adds V2X-Hub user to mysql db
read -p "Please enter a username: " USER
Expand All @@ -12,16 +19,17 @@ read -s -p "Please enter a password: " PASS

PASS_LENGTH=`echo $PASS | wc -c`

if [ $PASS_LENGTH -ge 8 ] && echo $PASS | grep -q [a-z] && echo $PASS | grep -q [A-Z] && echo $PASS | grep -q [0-9] && echo $PASS | grep -q [\$\!\.\+_-\*@\#\^%\?~]; then
echo "Confirm password: "
read -s CONF_PASS
if [ $PASS_LENGTH -ge 8 ] && echo $PASS | grep -q [a-z] && echo $PASS | grep -q [A-Z] && echo $PASS | grep -q [0-9] && ( echo $PASS | grep -q [\$\!\.\+_\*@\#\^%\?~] || echo $PASS | grep -q [-] ); then
echo
read -s -p "Confirm password: " CONF_PASS
while [ $CONF_PASS != $PASS ]; do
echo "Passwords do not match. Please re-enter password: "
read -s CONF_PASS
echo
read -s -p "Passwords do not match. Please re-enter password: " CONF_PASS
done
echo "VALID PASSWORD"
echo "Enter MYSQL ROOT PASSWORD: "
mysql -uroot -p --silent -h127.0.0.1 -e "INSERT INTO IVP.user (IVP.user.username, IVP.user.password, IVP.user.accessLevel) VALUES('$USER', '$PASS', 3)"
echo "V2X Hub user successfully added"
else
echo "INVALID PASSWORD"
echo "Password must be 8-12 charcters, and contain at least one of each of the following: uppercase letter, lowercase letter, number, and symbol"
Expand Down
9 changes: 5 additions & 4 deletions docker/Dockerfile-depl
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM ubuntu:bionic-20190807 AS install_dependencies
FROM ubuntu:focal-20220113 AS install_dependencies

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y cmake git build-essential libgtest-dev libssl-dev qtbase5-dev \
zip libmysqlcppconn-dev libboost1.65-all-dev libmysqlclient-dev uuid-dev libxerces-c-dev qtbase5-dev \
libcurl4-openssl-dev libgps-dev libsnmp-dev librdkafka-dev libjsoncpp-dev libev-dev libuv-dev libcpprest-dev
zip libmysqlcppconn-dev libboost1.71-all-dev libmysqlclient-dev uuid-dev libxerces-c-dev qtbase5-dev \
libcurl4-openssl-dev libgps-dev libsnmp-dev librdkafka-dev libjsoncpp-dev libev-dev libuv1-dev libcpprest-dev
# Build and install GTest
WORKDIR cd /usr/src/googletest/googletest
RUN mkdir ~/build
WORKDIR /usr/src/googletest/googletest/build
RUN cmake ..
RUN make
RUN cp libgtest* /usr/lib/
RUN cd lib && cp libgtest* /usr/lib/
WORKDIR cd /usr/src/googletest/googletest
RUN rm -rf build
RUN mkdir /usr/local/lib/googletest
Expand Down
2 changes: 1 addition & 1 deletion docker/php.yml → docker/Dockerfile-php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM php:7.2.2-apache
FROM php:apache
COPY web/ /var/www/html/
17 changes: 17 additions & 0 deletions docs/Release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
V2X-Hub Release Notes
----------------------------
Version 7.2, released April 12th, 2022
--------------------------------------------------------

**Summary:**
V2X Hub release 7.2 includes added functionality for the CARMACloud Plugin to support:
- Issue 348:Receiving vehicle TCM acknowledgement messages and displaying appropriate positive/negative/no acknowledgement messages on V2X-Hub web UI.
- Issue 348:Fowarding TCM acknowledgement message (negative/no) to CARMACloud.

Enhancements in this release:
- Issue 328: Upgrade base image for V2X-Hub to ubuntu 20
- Issue 349: Added example BSM plugin to show how to use PluginClient's BroadcastMessage message to broadcast BSM
- Issue 350: Added MobilityRequest and MobilityResponse ASN1 encoding and decoding

Bug fixes in this release:
- Issue 337: fixed add user script
- Issue 310: fixed possible Spat memory leak
- Issue 322: Fixed php and port_drayage_web_service ARM image builds

Version 7.1, released Feb 3rd, 2022
--------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions examples/tmx-exampleapps/SampleBSMPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PROJECT ( SampleBSMPlugin VERSION 5.0 LANGUAGES CXX )

BuildTmxPlugin ( )

TARGET_LINK_LIBRARIES (${PROJECT_NAME} tmxutils jsoncpp)
22 changes: 22 additions & 0 deletions examples/tmx-exampleapps/SampleBSMPlugin/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name":"SampleBSMPlugin",
"description":"Sample BSMplugin for making websocket connection with Sample BSM.",
"version": "@PROJECT_VERSION@",
"exeLocation":"/bin/SampleBSMPlugin",
"coreIpAddr":"127.0.0.1",
"corePort":24601,
"messageTypes":[
{
"type":"J2735",
"subtype":"CARMA",
"description":"CARMA message suite"
}
],
"configuration":[
{
"key":"Instance",
"default":"0",
"description":"The instance of this plugin."
}
]
}
Loading

0 comments on commit 53e91f4

Please sign in to comment.