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

modified: configuration/arm64/docker-compose.yml #585

Merged
merged 8 commits into from
May 1, 2024
17 changes: 10 additions & 7 deletions configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ services:
- mysql_root_password
volumes:
- ./mysql/localhost.sql:/docker-entrypoint-initdb.d/localhost.sql
- ./mysql/port_drayage.sql:/docker-entrypoint-initdb.d/port_drayage.sql
## uncomment line to enable port drayage database
# - ./mysql/port_drayage.sql:/docker-entrypoint-initdb.d/port_drayage.sql
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the idea here that we do not want to default to having port drayage functionality on?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paulbourelly999 Yeah. It's not used by anybody at the moment. It'll be better to have it commented out unless somebody will use it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Leave a comment indicating how to get port drayage functionality back and/or to come up with a more elegant solution to not including port drayage by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comments with instructions

Copy link
Contributor

Choose a reason for hiding this comment

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

All, I think we need to leave the port_drayage as is. The expectation is that whatever was deployed in the past should be backwards compatible or scenarios would continue to work as is, unless we notify the client we're removing this feature or retiring it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed back

- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php_arm:latest
container_name: php
network_mode: host
depends_on:
restart: always
depends_on:
- db
- v2xhub
stdin_open: true
Expand All @@ -34,7 +36,7 @@ services:
container_name: v2xhub
network_mode: host
restart: always
depends_on:
depends_on:
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
Expand All @@ -43,10 +45,11 @@ services:
volumes:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice_arm:latest
container_name: port_drayage_webservice
network_mode: host
## uncomment section to enable port drayage service
# port_drayage_webservice:
# image: usdotfhwaops/port-drayage-webservice_arm:latest
# container_name: port_drayage_webservice
# network_mode: host
secrets:
mysql_password:
file: ./secrets/mysql_password.txt
Expand Down
29 changes: 15 additions & 14 deletions configuration/arm64/initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ sudo apt update -y && sudo apt upgrade -y
sudo apt-get install chromium-browser -y #Chrome required for CARMA platform/V2X Hub UI(?)
sudo apt install curl -y #Curl for downloading files over internet
Copy link
Contributor

Choose a reason for hiding this comment

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

Add curl back. See comments above.


#install docker
curl -L https://raw.githubusercontent.com/usdot-fhwa-stol/carma-platform/develop/engineering_tools/install-docker.sh | bash
paulbourelly999 marked this conversation as resolved.
Show resolved Hide resolved

#make passwords for mysql
mkdir -p secrets && cd secrets

Expand All @@ -38,17 +35,21 @@ fi

#ARM initialization
cd $directory
sudo apt-get -y remove docker docker-engine docker.io containerd runc
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
OS=$(lsb_release -i | awk 'FS=":" {print $3;}' | awk '{print tolower($0)}')
arch=$(dpkg --print-architecture)
curl -fsSL https://download.docker.com/linux/$OS/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=$arch] https://download.docker.com/linux/$OS $(lsb_release -cs) stable"
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo apt -y install python3-pip
sudo pip3 install docker-compose
sudo apt update -y && sudo apt upgrade -y
sudo docker-compose up -d
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
Copy link
Contributor Author

@jwillmartin jwillmartin Mar 25, 2024

Choose a reason for hiding this comment

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

Was getting warnings about gpg key deprecation. Updated and tested using Docker's official Debian installation steps

# Add Docker's official GPG key:
sudo apt-get -y install ca-certificates
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker compose up -d

#create v2xhub user
cd $mysqlDir
Expand Down
2 changes: 1 addition & 1 deletion configuration/arm64/mysql/add_v2xhub_user.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ arch=$(dpkg --print-architecture)
if [ $arch = "amd64" ]; then
REQUIRED_PKG="mysql-client"
else
REQUIRED_PKG="mariadb-client-10.5"
REQUIRED_PKG="mariadb-client"
paulbourelly999 marked this conversation as resolved.
Show resolved Hide resolved
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed")
echo Checking for $REQUIRED_PKG: $PKG_OK
Expand Down
Loading