Skip to content

Commit

Permalink
updated initialization script for amd64 and arm64.
Browse files Browse the repository at this point in the history
script now installs necessary dependencies, creates secret files, prompts user to input mysql passwords, and create v2xhub user
  • Loading branch information
gainesaw committed Jun 30, 2023
1 parent 4528b26 commit b410da2
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
38 changes: 38 additions & 0 deletions configuration/amd64/initialization.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
#!/bin/bash

# update and upgrade commands to update linux OS
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt update -y && sudo apt upgrade -y

#installing necessary and useful apps
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

#install docker
curl -L https://raw.githubusercontent.com/usdot-fhwa-stol/carma-platform/develop/engineering_tools/install-docker.sh | bash

#make passwords for mysql
mkdir secrets && cd secrets
sleep 1

#creates password files where user inputs password
read -p "enter password for the mysql_root_password: " sql_root_pass
echo "$sql_root_pass" > sql_root_pass.txt

read -p "enter password for mysql_password: " sql_pass
echo "$sql_pass" > sql_pass.txt

#remove endline characters from password files
tr -d '\n' <sql_root_pass.txt> mysql_root_password.txt && tr -d '\n' <sql_pass.txt> mysql_password.txt
rm sql_root_pass.txt && rm sql_pass.txt

#AMD64 initialzation
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
Expand All @@ -10,3 +38,13 @@ sudo apt -y install python3-pip
sudo pip3 install docker-compose
sudo docker-compose pull
sudo docker-compose up -d
sudo apt-get update -y && sudo apt update -y

#create v2xhub user
cd mysql
./add_v2xhub_user.bash

sudo apt-get update -y && sudo apt update -y

echo -e "\n open chromium-browser, go to https://127.0.0.1:19760, accept certs, and go to https://127.0.0.1 to login to V2x hub."
sleep 3
36 changes: 36 additions & 0 deletions configuration/arm64/initialization.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
#!/bin/bash
# update and upgrade commands to update linux OS
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt update -y && sudo apt upgrade -y

#installing necessary and useful apps
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

#install docker
curl -L https://raw.githubusercontent.com/usdot-fhwa-stol/carma-platform/develop/engineering_tools/install-docker.sh | bash

#make passwords for mysql
mkdir secrets && cd secrets
sleep 1

#creates password files where user inputs password
read -p "enter password for the mysql_root_password: " sql_root_pass
echo "$sql_root_pass" > sql_root_pass.txt

read -p "enter password for mysql_password: " sql_pass
echo "$sql_pass" > sql_pass.txt

#remove endline characters from password files
tr -d '\n' <sql_root_pass.txt> mysql_root_password.txt && tr -d '\n' <sql_pass.txt> mysql_password.txt
rm sql_root_pass.txt && rm sql_pass.txt

#ARM initialization
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
Expand All @@ -11,3 +38,12 @@ sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plu
sudo apt -y install python3-pip
sudo pip3 install docker-compose
sudo docker-compose up -d

#create v2xhub user
cd mysql
./add_v2xhub_user.bash

sudo apt-get update -y && sudo apt update -y

echo -e "\n open chromium-browser, go to https://127.0.0.1:19760, accept certs, and go to https://127.0.0.1 to login to V2x hub."
sleep 3

0 comments on commit b410da2

Please sign in to comment.