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

Use new category of computers group better different installation steps. #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 105 additions & 99 deletions scripts/os_configure/install_software_22.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

# install_software_22.bash [computer_type:{office, robot, default:basic}]

script_own_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
SCRIPT_PATH=$script_own_dir
source "${SCRIPT_PATH}"/../../setup.bash
# script_own_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
# SCRIPT_PATH=$script_own_dir
# source "${SCRIPT_PATH}"/../../setup.bash

if [ -z "$supported_computer_types" ]; then
readonly supported_computer_types=("basic" "office" "robot")
readonly supported_computer_types=("development" "office" "robot")
fi

computer_type=$1
Expand All @@ -29,14 +29,14 @@ computer_type=$1
if ! [[ " ${supported_computer_types[*]} " =~ " ${computer_type} " ]]; then
notify_user "The computer type ${computer_type} you have given is not supported."
echo -e "${TERMINAL_COLOR_USER_INPUT_DECISION} Chose one of the following:"
echo -e "${TERMINAL_COLOR_USER_INPUT_DECISION} basic -Standard pc. Basic utilities like development utilities (git, vscode, ...) and some additional tools."
echo -e "${TERMINAL_COLOR_USER_INPUT_DECISION} development -Standard pc. Basic utilities like development utilities (git, vscode, ...) and some additional tools."
echo -e "${TERMINAL_COLOR_USER_INPUT_DECISION} office -Used for office pcs. Basic utilities, additional tools and office related stuff."
echo -e "${TERMINAL_COLOR_USER_INPUT_DECISION} robot -Used for robot platforms. Basic utilities like development utilities (git, vscode, ...)."
select computer_type in basic office robot;
do
case "$computer_type" in
basic)
computer_type="basic"
computer_type="development"
break
;;
office)
Expand Down Expand Up @@ -73,83 +73,11 @@ sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update

### BASIC TOOLS ###
sudo apt -y install neovim ssh git qgit trash-cli htop unrar yakuake screen finger ksshaskpass kompare filelight tldr thefuck ranger tree pre-commit

# Useful libraries
sudo apt -y install libxml2-dev libvlc-dev libmuparser-dev libudev-dev

### DEVELOPMENT TOOLS ###
# gh - Github CLI (it seems that gh needs to be install via apt to get access to .ssh keys)
sudo apt -y install gh
gh completion -s bash | tee "$HOME"/.local/share/bash-completion/completions/gh.bash > /dev/null

# visual studio code
sudo snap install --classic code
# install all plugins for visual studio code
vs_code_plugin_file=$RosTeamWS_FRAMEWORK_OS_CONFIGURE_PATH/vs-code_plugins.txt
while read extension; do
# ignore empty lines or lines starting with "#"
[[ $extension =~ ^#.* ]] || [ -z "$extension" ] && continue
code --install-extension "${extension}"
done < "${vs_code_plugin_file}"

# Docker
sudo apt-get update
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo groupadd docker
sudo usermod -aG docker "$(whoami)"
sudo apt -y install neovim ssh git qgit trash-cli htop unrar screen finger ksshaskpass kompare filelight ranger tree pre-commit

# VirtualBox
sudo apt -y install virtualbox dkms virtualbox-guest-utils virtualbox-ext-pack

## ROS
# ROS2 Packages
for ROS2_VERSION in "${ROS2_VERSIONS[@]}"
do
bash $SCRIPT_PATH/install_software_ros2.bash $ROS2_VERSION
done

sudo rosdep init
rosdep update

# ! They need to come after ros installation !
# Python tools
sudo apt -y install python3-pip \
python3-colcon-common-extensions \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-rosdep2 \
python3-setuptools \
python3-vcstool \
python3-pip \
python3-virtualenv \
python3-virtualenvwrapper \
python3-notebook \
pip3 install --upgrade pip

# setup bash
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bashrc" >> "$HOME/.bashrc"
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bash_aliases" >> "$HOME/.bash_aliases"
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bash_commands" >> "$HOME/.bash_commands"

# setup git
commit_template_path="$HOME/.config/git"
template_name="commit-template.txt"
Expand All @@ -175,26 +103,38 @@ sudo apt -y autoremove

########################## END BASIC SETUP ##########################

if [[ "${computer_type}" != "robot" ]]
### DEVELOPMENT TOOLS ###
if [[ "${computer_type}" == "development" ]]
then
sudo apt -y install recordmydesktop rdesktop gimp meshlab inkscape pdfposter unrar
fi
# Useful libraries
sudo apt -y install libxml2-dev libvlc-dev libmuparser-dev libudev-dev

# gh - Github CLI (it seems that gh needs to be install via apt to get access to .ssh keys)
sudo apt -y install gh
gh completion -s bash | tee "$HOME"/.local/share/bash-completion/completions/gh.bash > /dev/null

# visual studio code
sudo snap install --classic code
# install all plugins for visual studio code
vs_code_plugin_file=$RosTeamWS_FRAMEWORK_OS_CONFIGURE_PATH/vs-code_plugins.txt
while read extension; do
# ignore empty lines or lines starting with "#"
[[ $extension =~ ^#.* ]] || [ -z "$extension" ] && continue
code --install-extension "${extension}"
done < "${vs_code_plugin_file}"

# Docker
sudo apt-get update
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo groupadd docker
sudo usermod -aG docker "$(whoami)"

if [[ "${computer_type}" == "office" ]]
then

### CRYPTOPGRAPHY AND PASSWORD MANAGEMENT ###
# Cryptography
sudo apt -y install kleopatra scdaemon
# Passwordmanager
sudo apt -y install pass

### NETWORKING ###
# Network manager
sudo apt -y install network-manager-openvpn network-manager-vpnc network-manager-ssh network-manager-openconnect

# Remote desktop
sudo apt -y install krdc

## Network monitoring and debugging
# Wireshark
Expand All @@ -218,16 +158,82 @@ then
sudo apt -y install python3-babeltrace python3-lttng python3-lttngust
sudo usermod -aG tracing "$(whoami)"

## ROS
# ROS2 Packages
for ROS2_VERSION in "${ROS2_VERSIONS[@]}"
do
bash $SCRIPT_PATH/install_software_ros2.bash $ROS2_VERSION
done

sudo rosdep init
rosdep update

# ! They need to come after ros installation !
# Python tools
sudo apt -y install python3-pip \
python3-colcon-common-extensions \
python3-flake8 \
python3-flake8-blind-except \
python3-flake8-builtins \
python3-flake8-class-newline \
python3-flake8-comprehensions \
python3-flake8-deprecated \
python3-flake8-docstrings \
python3-flake8-import-order \
python3-flake8-quotes \
python3-pytest \
python3-pytest-cov \
python3-pytest-repeat \
python3-pytest-rerunfailures \
python3-rosdep \
python3-rosdep2 \
python3-setuptools \
python3-vcstool \
python3-pip \
python3-virtualenv \
python3-virtualenvwrapper \
python3-notebook \
pip3 install --upgrade pip

# setup bash
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bashrc" >> "$HOME/.bashrc"
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bash_aliases" >> "$HOME/.bash_aliases"
cat "$OS_CONFIGURE_TEMPLATES/extend_to_bash_commands" >> "$HOME/.bash_commands"
fi

if [[ "${computer_type}" != "robot" ]]
then
sudo apt -y install recordmydesktop rdesktop gimp meshlab inkscape pdfposter unrar
fi

if [[ "${computer_type}" == "office" ]]
then

### CRYPTOPGRAPHY AND PASSWORD MANAGEMENT ###
# Cryptography
sudo apt -y install kleopatra scdaemon
# Passwordmanager
sudo apt -y install pass

### NETWORKING ###
# Network manager
sudo apt -y install network-manager-openvpn network-manager-vpnc network-manager-ssh network-manager-openconnect

# Remote desktop
sudo apt -y install krdc

### MANAGE PERSONAL INFORMATION
# KDE-PIM
sudo apt -y install kontact korganizer kmail kjots kaddressbook kdepim*
# sudo apt -y install kontact korganizer kmail kjots kaddressbook kdepim*

### OFFICE TOOLS ###
# Notes-taking
sudo add-apt-repository ppa:pbek/qownnotes
sudo apt update
sudo apt -y install qownnotes

snap install hey-mail

### LANGUAGES ###
# Language packs
sudo apt -y install language-pack-de language-pack-de-base language-pack-kde-de aspell-de hunspell-de-de hyphen-de wogerman
Expand All @@ -239,4 +245,4 @@ sudo apt update
sudo apt -y dist-upgrade
sudo apt -y autoremove
# log is created somehow
trash "${RosTeamWS_FRAMEWORK_OS_CONFIGURE_PATH}/log/"
# trash "${RosTeamWS_FRAMEWORK_OS_CONFIGURE_PATH}/log/"
Loading