-
Notifications
You must be signed in to change notification settings - Fork 67
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
updated initialization script for amd64 and arm64. #546
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b410da2
updated initialization script for amd64 and arm64.
gainesaw fe2edd0
Update initialization.sh
gainesaw 64d88ba
Update initialization.sh
gainesaw 92fcae3
Update initialization.sh (amd64)
gainesaw 90c4951
Update initialization.sh (arm64)
gainesaw a85ee1f
Update initialization.sh amd64
gainesaw 5f771fe
Update initialization.sh arm64
gainesaw b409748
Update initialization.sh
gainesaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
#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 | ||
cd .. | ||
sudo apt-get -y remove docker docker-engine docker.io containerd runc | ||
sudo apt-get update | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably remove all redundant update calls unless we are adding a apt repository somewhere. We only really new one. |
||
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common | ||
|
@@ -11,3 +38,10 @@ 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 | ||
|
||
chromium-browser "https://127.0.0.1" > /dev/null 2>&1 & | ||
chromium-browser "https://127.0.0.1:19760" > /dev/null 2>&1 & |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. The last change I would suggest is making a single call for
apt-get update
Unless we are adding repositories somewhere in this script, multiple calls should not be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the duplicate apt-get updates in the lines, I left one update/upgrade line in the beginning and one at the end because I've ran into issues with the OS not being updated in the beginning, it being unable to install everything, and not running it before
docker-compose up -d
had the php and mysql fail to launch