- Why does this repository exist?
- Installation & Setup
- Usage
- Playbooks
- Viewing Ansible variables
- Notes
- Included roles & what they do
- TODO
So whenever someone old or new needs to reinstall their setup, or configure their machine, they don't have to individually install each component and take ages to get up and running.
First make sure you have python3, pip3 and ansible installed
sudo apt install python3-minimal python3-pip
pip3 install --upgrade pip
python3 -m pip install ansible ansible-lintThen add the Ansible PPA so we can get the latest version of Ansible>=2.9, this enables some features that do not come with Ansible 2.5 that comes with Ubuntu 18.04
sudo apt-add-repository ppa:ansible/ansible
sudo apt update && sudo apt install ansible- Select playbook of choice, see playbooks
- Edit
./vars/settings.ymlfor different versions specifying versions. - Place your user password into
ansible/secrets/secrets.yml(by default secrets.yml isn't created) using the following:
---
my_password: "asdfg" #for example- Run specific playbook i.e.
full_playbook.ymlthat includes different libraries that you want, see Running Playbooks
- full.playbook (to showcase all available roles)
- base.yml (use for a fresh install)
- sensor_drivers.yml (use for installing sensor drivers)
This is ideal since you only need to type your password once. Change full_playbook.yml to your desired environment yml file, e.g. development.yml, production_apm.yml or production_aqc.yml, as full_playbook.yml exists to show all options available.
cd ansible/
ansible-playbook -v full_playbook.yml --extra-vars "@secrets/secrets.yml" \
--extra-vars "ansible_sudo_pass={{ my_password }}"Run any playbook in verbose mode using the following:
cd ansible/
# --ask-become-pass or -K flag
# this playbook is meant to show you how to format your own playbooks, it contains all roles within this repo
# ansible-playbook -v --ask-become-pass full_playbook.yml
# other examples
ansible-playbook -vvv -K full_playbook.ymlTo view all Ansible related variables, also known as Ansible facts, for a specific host run:
ansible -m setup hostname
# e.g. for localhost
ansible -m setup localhost
# save to txt file
ansible -m setup localhost > ansible_facts_saved.txt- Ansible tasks and roles are procedural.
- Think of a playbook as a recipe, and roles are flavours to that recipe. Using this you can create production/development playbooks, and even use playbooks within playbooks.
- All downloaded files will be downloaded to
~/install_dir - when running
sudo make installadd the--debug=basicargument so the status is printed at the end when running ansible playbooks in verbose mode i.e.ansible-playbook -v some_playbook.yml, since you probably can't read all the lines. - use
wgetinstead of builtin ansibleget_urlmodule, as wget has automatic retries,get_urlis will break unless you specify the retries/timeouts. - Currently, files being downloaded from the URL set in the variable aid_aws_url are ...
- Baumer SDK (baumer_deb_file)
- CUDA Toolkit (cuda_deb_file)
- cuDNN Runtime Library (cudnn_runtime_deb_file)
- cuDNN Development Library (cudnn_devel_deb_file)
- TensorRT (tensorrt_deb_file)
- Handlers e.g. apt_update, by default, are only triggered at the end of any
tasks/main.ymlfile. In order to trigger handlers immediately, use meta tasks inrole_name/tasks/main.ymle.g.- meta: flush_handlersin order to trigger them. - Define role dependencies in any role using the
metafolder, see the g2o role for example.
-
baumer:
- download baumer deb file from AWS if not present
- install baumer SDK via .deb
-
cmake:
-
cuda:
- basically follow all the steps here
- add CUDA and cuDNN related paths to ~/.bashrc
- NOTE: this installs the corresponding NVIDIA Driver for the specified CUDA version
-
cudnn:
- basically follow all the steps here
- fix broken symbolic links
-
docker:
- removes previous versions of docker
- installs docker
- installs NVIDIA Container Toolkit
- installs docker-compose
-
common:
- install some common APT packages
- Remove unattended-upgrades, update-notifier APT packages
- add nano settings in /etc/nanorc (adding settings in ~/.nanorc does not apply to sudo commands)
- add bash history timestamps, format DD/MM/YY HH:MM, for different formats see here
- add extra udev rules to elevate ttyUSB* and ttyS* permissions
- Create ~/install_dir to prevent clutter
-
eigen:
- install Eigen related APT packages
- download & unarchive eigen tar.bz2 from gitlab into ~/install_dir
- create build folder, make -j, and sudo make install --debug=basic
-
flycap:
- unzip flycap___.tar.gz to ~/install_dir
- install Flycap SDK including unlisted dependencies that cause
./install_flycapture.shto break - install pexpect, allowing for automatic responses to prompts using regexp
- change linux buffer sizes in /etc/sysctl.conf
-
g2o:
- install g2o from source
-
git:
-
jetson:
- ...
-
julia:
- download julia___.tar.gz to ~/install_dir
- unzip to /opt/
- create julia symbolic link
- copy ONEinitialsetup.jl script to ~/install_dir and run
-
kvaser:
- add autonomousstuff APT repo
- install kvaser related APT packages
- install ROS esr and srr messages, and ROS kvaser interface
-
linuxcan:
- download linuxcan.tar.gz to ~/install_dir
- make -j && sudo make install --debug=basic
-
ms_teams:
- install Microsoft Teams
-
peakcan:
- download peak-linux-driver___.tar.gz to ~/install_dir
- unzip && make -j all && sudo make install (peakcan driver)
- install pcan-view
-
pip:
- install pip2 then pip3
- upgrade pip2 and pip3 (this allows for latest pip features e.g. 2020-resolver to be used by default from pip>=21.0)
- set default pip to pip3
-
pytorch:
- basically follow all the steps here VERY JANK atm
-
robosense:
- install robosense related APT
- create symlink to enable RSView on Ubuntu
-
ros:
- basically follow all the steps here
- install ROS desktop full, and additional ROS APT packages
- install python-catkin-tools
-
sshd:
- reinstall openssh-client that comes with Ubuntu
- start sshd service if not started
-
tensorrt:
- download tensorrt from AWS if not present
- install TensorRT via .deb, as well as Python and C++ development packages
- install pycuda2020.1 to /opt/
-
terminal_velocity:
- install fzf from https://github.com/junegunn/fzf.git into ~/bin(see keybindings)
- install silversearcher-ag (so you don't need to
cat file | grep textjust doag text file_you_want_to_search) - install universal-ctags
- install ripgrep (search multiple files for text in cwd)
- install z
- install batcat (a better
catwith git integration) - install tldr (a substitute to manpages)
-
vscode:
- install Visual Studio Code (stable)
- install VSCode extensions if setting is enabled in
settings.yml, see recommended VSCode Tools
-
zoom:
- install Zoom
- cuda
- cudnn
- eigen
- julia
- tensorrt
- pycuda
- peakcan driver
- peakcan API
-
jetson -> complete role
-
xrdp #For remote access
-
ifenslave
-
git LFS
-
xsens driver
-
vcstool
-
peakcan (pcan) API
-
diagnostics i.e. download different code samples, and libraries to check that stuff is working
-
use ansible molecule for testing