cleanup
This commit is contained in:
440
Systems/Admin-RandD/EngWorkstationBuildGuide.md
Normal file
440
Systems/Admin-RandD/EngWorkstationBuildGuide.md
Normal file
@@ -0,0 +1,440 @@
|
||||
# TSYS Group - IT Documentation - R&D - Workstation Build Guide
|
||||
|
||||
- [TSYS Group - IT Documentation - R&D - Workstation Build Guide](#tsys-group---it-documentation---rd---workstation-build-guide)
|
||||
- [Introduction](#introduction)
|
||||
- [Workstation details - RPI4 8Gb](#workstation-details---rpi4-8gb)
|
||||
- [Out of box tweaks and basic setup](#out-of-box-tweaks-and-basic-setup)
|
||||
- [Software Packages To Install](#software-packages-to-install)
|
||||
- [magic mouse 2 driver](#magic-mouse-2-driver)
|
||||
- [Nodejs](#nodejs)
|
||||
- [Rust](#rust)
|
||||
- [go](#go)
|
||||
- [mdbook](#mdbook)
|
||||
- [Recoll (local search)](#recoll-local-search)
|
||||
- [Bitwarden CLI](#bitwarden-cli)
|
||||
- [Krita](#krita)
|
||||
- [Backslide](#backslide)
|
||||
- [Docker](#docker)
|
||||
- [RedNotebook (install from source, it just runs in place)](#rednotebook-install-from-source-it-just-runs-in-place)
|
||||
- [OpenWebRx](#openwebrx)
|
||||
- [csv2md](#csv2md)
|
||||
- [helm](#helm)
|
||||
- [kubectl / k3s](#kubectl--k3s)
|
||||
- [docker](#docker-1)
|
||||
- [docker-compose](#docker-compose)
|
||||
- [metasploit](#metasploit)
|
||||
- [scap workbench](#scap-workbench)
|
||||
- [Bitscope](#bitscope)
|
||||
- [docker based dev environment/pipeline](#docker-based-dev-environmentpipeline)
|
||||
- [Mainline repo packages](#mainline-repo-packages)
|
||||
- [Configuration Tweaks](#configuration-tweaks)
|
||||
- [chrome setup](#chrome-setup)
|
||||
- [passwords/bitwarden](#passwordsbitwarden)
|
||||
- [web apps](#web-apps)
|
||||
- [zsh](#zsh)
|
||||
- [konsole setup](#konsole-setup)
|
||||
- [xfce tweaks](#xfce-tweaks)
|
||||
- [VsCode](#vscode)
|
||||
- [CTO Stuff](#cto-stuff)
|
||||
- [Upstream vendor software to checkout](#upstream-vendor-software-to-checkout)
|
||||
- [Projects](#projects)
|
||||
- [Special considerations for upstream](#special-considerations-for-upstream)
|
||||
- [Workstation details - x86-64 vm](#workstation-details---x86-64-vm)
|
||||
- [Workstation details - iPAD](#workstation-details---ipad)
|
||||
- [Remaining projects](#remaining-projects)
|
||||
- [SSH / GPT private key HSM](#ssh--gpt-private-key-hsm)
|
||||
- [TurboVNC (3d accelerated) on rpi as client](#turbovnc-3d-accelerated-on-rpi-as-client)
|
||||
- [Select an Investigative notebook](#select-an-investigative-notebook)
|
||||
- [Research source material organization](#research-source-material-organization)
|
||||
- [activitywatch](#activitywatch)
|
||||
- [Get photo processing workflow setup](#get-photo-processing-workflow-setup)
|
||||
- [switch mail from (just) thunderbird to thunderbird/(neo)mutt/notmuch/task warrior](#switch-mail-from-just-thunderbird-to-thunderbirdneomuttnotmuchtask-warrior)
|
||||
|
||||
## Introduction
|
||||
|
||||
In 01/2021 , Charles purchased a Raspberry Pi 4 as his daily driver with the intent of evaluating it for use as the standard issue equipment for TSYS personnel. This document is the results of his
|
||||
experiments with it from 01/2021 to (as of time of writing) August 1st 2021.
|
||||
|
||||
Charles is the founder, CEO and acting CTO of TSYS Group. In his role, he does everything from business ops, to system administration to software/hardware engineering tasks. As such he was best
|
||||
positioned to evaluate the rPI for all workloads.
|
||||
|
||||
The RPi4 has been approved as one of the standard/supported workstation for TSYS personnel across all teams/products.
|
||||
|
||||
The software mentioned in this document is a long list, reflecting the myriad of tasks/projects Charles may engage with on a daily basis. Most likely, you'll only need a subset of these tools,
|
||||
don't despair! Feel free to install all of them or a subset as you wish based on your mission objectives.
|
||||
|
||||
We hope this document is useful to everyone at TSYS who wants to maximize their productivity. TSYS fully supports Debian/Ubuntu GNU Linux for workstation use, both on rPI4 and x86 virtual/physical
|
||||
systems.
|
||||
|
||||
We do occasionally test Mac OSX and Windows 10, but they aren't officially supported.
|
||||
|
||||
Our experiments and daily use show that 85% or more of TSYS daily driver/workstation use (email/coding/research/browsing/document creation/discord/media editing/etc) can be done on an rPI4.
|
||||
|
||||
The few gaps can be done via an RDP session to an x86 system for the few things that have x86 dependencies or need 64bit os (64bit on pi isn't yet fully ready in our opinion as of August 2021).
|
||||
|
||||
## Charles Workstation details - RPI4 8Gb
|
||||
|
||||
- Operating System: RaspberryPi Os
|
||||
- Hardware:
|
||||
- Raspberry Pi 4 with 8gb RAM
|
||||
- Accessories :
|
||||
- Case : Argone One case <https://www.argon40.com/argon-one-m-2-case-for-raspberry-pi-4.html>
|
||||
- Monitors: Dual Dell 24" monitors (IPS) <https://www.dell.com/support/home/en-us/product-support/product/dell-st2421l/overview>0
|
||||
- Chair: Ikea MARKUS Office Chair: <https://www.ikea.com/us/en/p/markus-office-chair-vissle-dark-gray-90289172/>
|
||||
- Keyboard: Matias Backlight Keyboard <https://www.matias.ca/aluminum/backlit/>
|
||||
- Mouse: Apple Magic Mouse 2 Black
|
||||
- Tablet: iPad Mini 5th Gen (see iPAD section for more)
|
||||
- Headphones: JBL Over Ear (<https://www.jbl.com.au/TUNE750BTNC.html>)
|
||||
- Tp-link 7 port USB 3.0 Powered Hub (for plugging in thumb drives, data acquisition devices / other random usb bits) <https://www.tp-link.com/us/home-networking/usb-hub/uh700/>
|
||||
- IOGear card reader <https://www.iogear.com/product/GFR281/>
|
||||
- Security Dongle: Yubikey 4 OTP+U2F+CCID
|
||||
|
||||
### Out of box tweaks and basic setup
|
||||
|
||||
1) Put Rasberry Pi 4 into Argone One Case (running it without case will cause it to overheat quickly)
|
||||
2) Flash latest stable Raspbian 32bit to SD card and boot pi
|
||||
3) connect usb keyboard and mouse
|
||||
4) Run through first boot setup wizard
|
||||
5) Setup pin+yubi long string for password for the pi user
|
||||
6) Connect to wifi
|
||||
5) Pair and trust Matias Backlight Keyboard
|
||||
6) Pair and trust Apple Magic Mouse
|
||||
7) fix date/time via ntpdate (ntpdate 10.251.37.5)
|
||||
8) apt-get update ; apt-get -y full-upgrade
|
||||
9) add vi mode to /etc/profile (heathens by default!)
|
||||
10) clone dotfiles repo
|
||||
11) enable i2c access via raspi-config
|
||||
12) setup fan daemon <https://gitlab.com/DarkElvenAngel/argononed.git>
|
||||
13) setup virtual desktops
|
||||
|
||||
- Desktop 1: Browsing/Editing/Shell (chrome / VsCode / Konsole / Remmina )
|
||||
- Desktop 2: Comms (discourse/discord/irc etc/thunderbird/mutt)
|
||||
- Desktop 3: Long Running: (calibre/recol/etc)
|
||||
|
||||
14) (coming soon) run curl htp://dl.turnsys.net/buildFullWorkstation.sh
|
||||
|
||||
### Software Packages To Install
|
||||
|
||||
#### magic mouse 2 driver
|
||||
|
||||
https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver
|
||||
|
||||
#### Nodejs
|
||||
|
||||
```console
|
||||
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sud apt-get -y install nodejs
|
||||
sudo apt-get update && sudo apt-get install yarn
|
||||
```
|
||||
|
||||
#### Rust
|
||||
|
||||
```console
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
```
|
||||
|
||||
#### go
|
||||
|
||||
<https://pimylifeup.com/raspberry-pi-golang/>
|
||||
|
||||
#### mdbook
|
||||
|
||||
```console
|
||||
cargo install mdbook
|
||||
```
|
||||
|
||||
#### Recoll (local search)
|
||||
|
||||
```console
|
||||
cat recoll-rbuster.list
|
||||
deb [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] http://www.lesbonscomptes.com/recoll/raspbian/ buster main
|
||||
deb-src [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] http://www.lesbonscomptes.com/recoll/raspbian/ buster main
|
||||
```
|
||||
|
||||
#### Bitwarden CLI
|
||||
|
||||
```console
|
||||
sudo npm install -g @bitwarden/cli
|
||||
```
|
||||
|
||||
#### Krita
|
||||
|
||||
```console
|
||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
sudo flatpak -y install flathub org.kde.krita
|
||||
```
|
||||
|
||||
#### Backslide
|
||||
|
||||
```console
|
||||
sudo npm install -g backslide
|
||||
sudo npm i -g decktape
|
||||
sudo add chrome-aws-lambda
|
||||
```
|
||||
|
||||
#### RedNotebook (install from source, it just runs in place)
|
||||
|
||||
<https://rednotebook.sourceforge.io/downloads.html>
|
||||
<https://www.linuxlinks.com/raspberry-pi-4-chronicling-desktop-experience-dear-diary/>
|
||||
|
||||
#### OpenWebRx
|
||||
|
||||
on pi:
|
||||
|
||||
wget -O - <https://repo.openwebrx.de/debian/key.gpg.txt> | apt-key add
|
||||
echo "deb <https://repo.openwebrx.de/debian/> buster main" > /etc/apt/sources.list.d/openwebrx.list
|
||||
apt-get update
|
||||
apt-get install openwebrx
|
||||
|
||||
or (on x86)
|
||||
|
||||
wget -O - https://repo.openwebrx.de/debian/key.gpg.txt | apt-key add
|
||||
echo "deb https://repo.openwebrx.de/ubuntu/ hirsute main" > /etc/apt/sources.list.d/openwebrx.list
|
||||
apt-get update
|
||||
apt-get install openwebrx
|
||||
|
||||
#### csv2md
|
||||
|
||||
```console
|
||||
npm install -g csv2md
|
||||
```
|
||||
|
||||
#### metasploit
|
||||
|
||||
```console
|
||||
git clone https://github.com/rapid7/metasploit-framework.git
|
||||
cd metasploit-framework
|
||||
sudo gem install wirble sqlite3 bundler nokogiri bundle
|
||||
bundle install
|
||||
```
|
||||
|
||||
#### scap workbench
|
||||
|
||||
Follow the readme
|
||||
|
||||
#### Bitscope
|
||||
|
||||
on pi
|
||||
|
||||
```console
|
||||
wget http://bitscope.com/download/files/bitscope-dso_2.8.FE22H_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-logic_1.2.FC20C_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-meter_2.0.FK22G_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-chart_2.0.FK22M_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-proto_0.9.FG13B_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-console_1.0.FK29A_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-display_1.0.EC17A_armhf.deb
|
||||
wget http://bitscope.com/download/files/bitscope-server_1.0.FK26A_armhf.deb
|
||||
|
||||
sudo dpkg -i *.deb
|
||||
sudo apt-get -y -f install
|
||||
|
||||
```
|
||||
|
||||
on x86
|
||||
|
||||
TBD
|
||||
|
||||
#### docker based dev environment/pipeline
|
||||
|
||||
##### docker
|
||||
|
||||
```console
|
||||
curl -sSL https://get.docker.com | sh
|
||||
```
|
||||
|
||||
##### helm
|
||||
|
||||
|
||||
```console
|
||||
sudo snap install helm --classic
|
||||
```
|
||||
|
||||
##### kubectl / k3s
|
||||
|
||||
```console
|
||||
curl -sfL https://get.k3s.io | sh -
|
||||
```
|
||||
|
||||
##### docker-compose
|
||||
|
||||
##### Todo
|
||||
|
||||
- local k0s (for gitops testing)
|
||||
- (container) local docker reg
|
||||
- (container) local jenkins
|
||||
- (container) local all the apps for developing
|
||||
|
||||
#### Mainline repo packages
|
||||
|
||||
```console
|
||||
apt-get -y install \
|
||||
kicad librecad freecad gimp blender shellcheck jq net-tools\
|
||||
ruby-full offlineimap zsh vim thunderbird enigmail highlight\
|
||||
kleopatra zsh-autosuggestions zsh-syntax-highlighting screen \
|
||||
mtr cifs-utils grass cubicsdr arduino jupyter-notebook \
|
||||
dia basket vym code wings3d flatpak wireguard gnuplot \
|
||||
pandoc python3-blockdiag texlive-fonts-extra clang \
|
||||
spice-client-gtk spice-html5 virt-viewer gnome-system-monitor \
|
||||
glances htop dstat apt-file kleopatra konsole telnet clang \
|
||||
ripgrep recoll poppler-utils abiword wv antiword unrtf \
|
||||
libimage-exiftool-perl xsltproc davmail kphotoalbum opensc \
|
||||
yubikey-manager yubikey-personalization yubikey-personalization-gui \
|
||||
openshot kdenlive pitivi inkscape scribus scdaemon seafile-gui qgis \
|
||||
octave nodejs libreoffice calligra netbeans sigrok \
|
||||
nodejs audacity wireshark nmap tcpdump ndiff etherape ghostscript \
|
||||
lepton-eda ngspice graphicsmagick codeblocks scilab calibre paraview \
|
||||
gnuradio build-essential libimobiledevice-utils libimobiledevice-dev \
|
||||
libgpod-dev python3-numpy python3-pandas python3-matplotlib \
|
||||
curl git make binutils bison gcc build-essential openjdk-11-jre-headless \
|
||||
debootstrap cutecom minicom ser2net conman xsane gocr tesseract-ocr \
|
||||
fonts-powerline build-essential zlib1g zlib1g-dev libxml2 libxml2-dev \
|
||||
libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev \
|
||||
libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql \
|
||||
postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-dev ruby-dev \
|
||||
openvas git-core postgresql curl nmap gem libsqlite3-dev cmake ninja-build libopenscap-dev \
|
||||
qt5-default libqt5widgets5 libqt5widgets5 libqwt-headers libqt5xmlpatterns5-dev asciidoc \
|
||||
lmms virt-manager gqrx-sdr multimon-ng rtl-sdr fldigi grads cdo xygrib xygrib-maps evince \
|
||||
openwebrx xscreensaver blueman bluetooth pulseaudio-module-bluetooth blueman texlive-fonts-extra \
|
||||
texlive-fonts-recommended
|
||||
```
|
||||
|
||||
### Configuration Tweaks
|
||||
|
||||
|
||||
#### zsh
|
||||
|
||||
- Use oh-my-zsh
|
||||
- Use powerlevel10k
|
||||
|
||||
#### konsole setup
|
||||
|
||||
- settings -> edit current profile ->
|
||||
- apperance (set to dark pastels)
|
||||
- font (set to noto mono)
|
||||
- mouse
|
||||
- copy/paste
|
||||
- copy on select
|
||||
- paste from clipboard (default is paste from selection)
|
||||
- un-set copy text as html
|
||||
|
||||
- settings - configure shortcuts
|
||||
- next tab ctrl+tab
|
||||
- previous ctrl+shift+tab
|
||||
|
||||
#### xfce tweaks
|
||||
|
||||
- Set focus follows mouse (settings/window manager/focus)
|
||||
- (dark mode)? (only works for gtk apps)
|
||||
- need to set other apps individually to dark mode
|
||||
|
||||
#### VsCode
|
||||
|
||||
fenix appears to include it in the default image, but it doesn't launch from the menu and shell says code not found. Search for code and it will pull up an entry with VsCode logo labeled as Text Editor. Use that.
|
||||
|
||||
to see how I set it up VsCode for a myriad of tasks, see the VsCode guide for tsys at:
|
||||
|
||||
<https://git.turnsys.com/TSGTechops/docs-techops/src/branch/master/src/Systems/Admin-RandD/TSYS-DevEnv-VsCode.md>
|
||||
|
||||
|
||||
|
||||
### CTO Stuff
|
||||
|
||||
#### mbed studio
|
||||
#### eclipse
|
||||
#### android studio
|
||||
#### dbeaver
|
||||
#### postman
|
||||
#### sweethome3d
|
||||
#### ghidra
|
||||
|
||||
#### Upstream vendor software to checkout
|
||||
|
||||
This is a massive work in progress , is mostly for Charles own notes only, really only applicable for large upstream packages that TSYS needs to support
|
||||
long term/sync regularly with upstream, or part of a broader protfolio initiative etc.
|
||||
|
||||
Unless you have been specfically directed todo so in your roject readme, you don't need todo the below. In almost all cases , the work below is abstracted
|
||||
for/from you into our artifact repository and build process.
|
||||
|
||||
##### Projects
|
||||
|
||||
- openwrt
|
||||
- openmct
|
||||
- raspi kernel
|
||||
- FreeRTOS
|
||||
- freedombox
|
||||
- serval
|
||||
- genode
|
||||
- balena
|
||||
|
||||
##### Special considerations for upstream
|
||||
|
||||
|
||||
## Workstation details - iPAD
|
||||
|
||||
- Operating System: iPAD OS
|
||||
- Hardware: iPAD Mini 5th Generation
|
||||
- Accessories:
|
||||
- Lightining to USB3
|
||||
- Lightining to HDMI
|
||||
- I use same KB/Mouse that I do with the rPI
|
||||
- Key Applications
|
||||
- Working Copy
|
||||
- Buffer Text Editor
|
||||
- Blink.sh
|
||||
- Jump remote Desktop
|
||||
- GitJournal
|
||||
- Microsoft Todo
|
||||
- Neat
|
||||
- Discourse
|
||||
- FreeScout
|
||||
- ErpNext
|
||||
|
||||
### Remaining projects
|
||||
|
||||
These items remain todo and document. They are listed in decreasing order of importance.
|
||||
|
||||
|
||||
#### SSH / GPT private key HSM
|
||||
|
||||
- kleopatra
|
||||
- yubikey ssh key
|
||||
- yubikey gpg key
|
||||
|
||||
(not strictly related but in same family)
|
||||
- xca (build from source)
|
||||
|
||||
#### TurboVNC (3d accelerated) on rpi as client
|
||||
|
||||
#### Select an Investigative notebook
|
||||
|
||||
- <https://github.com/kpcyrd/sn0int>
|
||||
- <https://www.spiderfoot.net/>
|
||||
- <https://github.com/smicallef/spiderfoot?ref=d>
|
||||
- modelio <https://www.modelio.org/>
|
||||
- <https://gephi.org/>
|
||||
|
||||
#### Research source material organization
|
||||
|
||||
- zotero
|
||||
- docear <https://opensource.com/life/16/8/organize-your-scholarly-research-docear>
|
||||
|
||||
#### activitywatch
|
||||
|
||||
Effortless self instrumentation. Performed initial attempts/exploration. It builds (I think)
|
||||
|
||||
#### Get photo processing workflow setup
|
||||
|
||||
- currently exploring kphotoablbum
|
||||
- Browser based Sharing / browsing via Photoprism (or perhaps piwgio ultimately, with photoprism as part of a processing work flow)?
|
||||
- need something to sync to "cloud" with auto capture from phone
|
||||
- reference material:
|
||||
- <https://photoprism.app/>
|
||||
- <https://kn100.me/declouding-replacing-google-photos-part-1/>
|
||||
- <https://willem.com/blog/2020-08-31_free-from-the-icloud-escaping-apple-photos/>
|
||||
|
||||
#### switch mail from (just) thunderbird to thunderbird/(neo)mutt/notmuch/task warrior
|
||||
|
||||
This has been an ongoing on-again/off-again adventure....
|
302
Systems/Admin-RandD/VsCodeConfigGuide.md
Normal file
302
Systems/Admin-RandD/VsCodeConfigGuide.md
Normal file
@@ -0,0 +1,302 @@
|
||||
# TSYS Group - Engineering Documentation - Visual Studio Code Environment Setup Guide
|
||||
|
||||
- [TSYS Group - Engineering Documentation - Visual Studio Code Environment Setup Guide](#tsys-group---engineering-documentation---visual-studio-code-environment-setup-guide)
|
||||
- [Introduction](#introduction)
|
||||
- [Environmental considerations/assumptions](#environmental-considerationsassumptions)
|
||||
- [External Software Programs/Services Used](#external-software-programsservices-used)
|
||||
- [Short version](#short-version)
|
||||
- [Requirements and dependencies](#requirements-and-dependencies)
|
||||
- [Languages Used](#languages-used)
|
||||
- [Deployment Targets](#deployment-targets)
|
||||
- [General setup](#general-setup)
|
||||
- [Plugins - Team-*](#plugins---team-)
|
||||
- [General Tooling](#general-tooling)
|
||||
- [Docker / k8s](#docker--k8s)
|
||||
- [Git](#git)
|
||||
- [(Cross) Compile / (Remote) Debug / (Remote) development](#cross-compile--remote-debug--remote-development)
|
||||
- [Markdown (and documentation in )](#markdown-and-documentation-in-)
|
||||
- [Data](#data)
|
||||
- [Bash](#bash)
|
||||
- [Plugins - Team-SWEng](#plugins---team-sweng)
|
||||
- [API (rest) development](#api-rest-development)
|
||||
- [Web App development](#web-app-development)
|
||||
- [YAML](#yaml)
|
||||
- [Rust](#rust)
|
||||
- [C/C++](#cc)
|
||||
- [Arduino/Seeduino](#arduinoseeduino)
|
||||
- [CUDA](#cuda)
|
||||
- [Java](#java)
|
||||
- [PHP](#php)
|
||||
- [Python](#python)
|
||||
- [Plugins - Team-MechEng](#plugins---team-mecheng)
|
||||
- [Octave](#octave)
|
||||
- [R](#r)
|
||||
- [Jupyter](#jupyter)
|
||||
- [STL](#stl)
|
||||
- [G-code](#g-code)
|
||||
- [Gerber](#gerber)
|
||||
|
||||
## Introduction
|
||||
|
||||
This is the TSYS Visual Studio Code setup guide. It covers how to setup VsCode for all aspects of TSSY Group.
|
||||
|
||||
We have a very complex total stack, but don't despair, you will only need a small subset of this.
|
||||
|
||||
Which subset of course depends on what part of the TSYS mission you are supporting!
|
||||
|
||||
### Environmental considerations/assumptions
|
||||
|
||||
- Charles setup is the most comprehensive, as he is the co-founder and (as of Q3 2021) (acting) CTO and needs to develop for all pieces of the stack/products.
|
||||
- Do not just blindly follow this guide! Pick the pieces you need for your work. If you have any questions, ask in Discord or post to Discourse.
|
||||
|
||||
- Working against a remote server/container/k8s cluster over SSH via VsCode Remote
|
||||
- VsCode Remote Dev is heavily utilized (almost if not exclusively)
|
||||
- Source code resides in home directory on the server farm, but is edited "locally" on your workstation with VsCode (Remote)
|
||||
|
||||
- Using TSYS self hosted Gitea git instance
|
||||
- Using TSYS self hosted Jenkins CI
|
||||
- docker/kubectl commands are present and configured to run against the cluster (and you are connected to the VPN)
|
||||
|
||||
- Developing in Windows 10/Mac OSX/Linux with a GUI environment running native VsCode (CNW daily driver is a raspberry pi 4 with 8gb ram to help ensure lowest common denominator support/good performance)
|
||||
- Using Chrome web browser (firefox/safari may work, but are not supported at all)
|
||||
|
||||
- Developing primarily at the "git push, magic happens" abstraction layer
|
||||
- Need to occasionally inspect/debug the magic at various stages of the pipeline
|
||||
- Need to frequently debug running code on a variety of targets (pi/arduino etc)
|
||||
|
||||
- All text documentation is written in Markdown and is posted to Git/Discourse as Markdown
|
||||
- (tbd soon, actively experimenting)
|
||||
- All diagrams are created via text language
|
||||
- All diagrams are produced using
|
||||
- (blockdiag?
|
||||
- uml?
|
||||
- markdown extensions?
|
||||
- all (or some mix) of the above?
|
||||
- what extension(s)to use?)
|
||||
|
||||
### External Software Programs/Services Used
|
||||
|
||||
You'll need to setup some external tools and services to support the TSYS mission (in addition to VsCode).
|
||||
|
||||
Setup of external tools/services is outside the scope of this document. For guidance on tool/service selection and setup, please see the following links:
|
||||
|
||||
- <https://git.turnsys.com/TSGTechops/docs-techops/src/branch/master/src/Systems/Admin-Application/AppsAndServices.md>
|
||||
- <https://git.turnsys.com/TSGTechops/docs-techops/src/branch/master/src/Systems/Admin-RandD/EngineeringWorkstatioNBuildBuide.md>
|
||||
|
||||
Once you've setup your needed external tools and services , return to this document and continue with setup of VsCode as needed to work with the tooling you installed.
|
||||
|
||||
### Short version
|
||||
|
||||
very soon (june 2021) you'll have two options for EZ stack deployment for your product development environment :
|
||||
|
||||
1) docker pull TSYSVSC and use with <https://code.visualstudio.com/docs/remote/containers>
|
||||
|
||||
2) Login to <https://desktop.turnsys.com> and get a full engineering stack for whatever product you are working on.
|
||||
|
||||
Read on to understand the pieces and particulars in case you want to build your own setup.
|
||||
|
||||
## Requirements and dependencies
|
||||
|
||||
Here is the tool and language requirements of all the TSYS engineering projects/programs/products.
|
||||
|
||||
### Languages Used
|
||||
|
||||
| Language | Used By | Product Scope |
|
||||
|----------------------------------|--------------|------------------------------------|
|
||||
| bash | TSYS wide | All |
|
||||
| c/c++ | Team-SwEng | MorseFlyer |
|
||||
| CUDA | Team MechEng | MorseFlyer (envelope/airframe) |
|
||||
| dockerfile/docker compose | TSYS wide | All |
|
||||
| geo spatial data | Team SwEng | MorseFlyer (avionics) |
|
||||
| Gerber | Team HwEng | MorseSkynet, MorseFlyer (avionics) |
|
||||
| Go | Team-SwEng | HFNOC/HFNFC/RackRental |
|
||||
| helm charts | TSYS wide | All |
|
||||
| Java | Team SwEng | MorseTrackerHUD,MorseTracker |
|
||||
| javascript | Team SwEng | MorseTrackerHUD |
|
||||
| Markdown | TSYS wide | All |
|
||||
| octave | Team MechEng | MorseFlyer (envelope/airframe) |
|
||||
| OpenFAAS | Team-SwEng | RackRental.net |
|
||||
| PHP | TEam-SwEng | RackRental.net , HFNOC/HFNFC |
|
||||
| python (Jupyter and stand alone) | Team MechEng | MorseFlyer (envelope/airframe) |
|
||||
| R | Team MechEng | MorseFlyer (envelope/airframe) |
|
||||
| Ruby | Team-SwEng | All (as part of SDLC testing) |
|
||||
| Rust | Team-SwEng | HFNOC/HFNFC/RackRental |
|
||||
| tcl/tk | Team HwEng | MorseSkynet |
|
||||
| Xilinx | Team HwEng | MorseSkynet |
|
||||
| YAML | TSYS wide | All |
|
||||
|
||||
### Deployment Targets
|
||||
|
||||
| Target | Used By | Product Scope |
|
||||
|-----------------------------------------------------|-------------|------------------------------------|
|
||||
| Arduino (cross compiled) | Team-SwEng | MorseFlyer (Avionics) |
|
||||
| FreeRTOS (cross compiled) | Team-SwEng | MorseFlyer (Avionics) |
|
||||
| Jenkins build pipelines | All teams | All |
|
||||
| OpenMCT farm (java/micro services) | Team-SwEng | MorseTracker/MorseTrackerHUD |
|
||||
| Raspberry Pi (cross compiled) | Team-SwEng | MorseFlyer (Avionics) |
|
||||
| Subo pi farm (multi arch) Docker / k3s (and balena) | Team-SwEng | MorseFlyer (Avionics), MorseSkynet |
|
||||
| TSYS K3S sandbox/dev/prod clusters | All teams | All |
|
||||
| TSYS Web Farm (lots of PHP (wordpress etc)) | Team-WebEng | RackRental.net, HFNOC, HFNFC |
|
||||
|
||||
## General setup
|
||||
|
||||
These are steps you need to take before starting development in earnest.
|
||||
|
||||
Linux (or at least a mostly linux (WSL/mobaxterm)) environment is presumed for all the below.
|
||||
|
||||
You may well find GUI replacements and use them, especially on Windows/MACOSX. They are not supported in any way.
|
||||
|
||||
- Setup gitea
|
||||
- Login once to <https://git.turnsys.com> so you can be added to the appropriate repos/teams/orgs.
|
||||
- Customize any profile etc settings that you wish.
|
||||
- Obtain API key to use with gitea-issues plugin
|
||||
- Setup SSH
|
||||
- Setup SSH key
|
||||
- Add SSH public key to gitea
|
||||
- Setup git
|
||||
- For all git users:
|
||||
- $ git config --global user.name "John Doe"
|
||||
- $ git config --global user.email johndoe@example.com
|
||||
- Setup git lg : git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
|
||||
- for zsh users (and you really should use zsh/oh-my-zsh :)
|
||||
- git config --add oh-my-zsh.hide-status 1
|
||||
- git config --add oh-my-zsh.hide-dirty 1
|
||||
|
||||
## Plugins - Team-*
|
||||
|
||||
The plugins documented here are known to work, and are in active/frequent use by Charles as CTO as he hacks on the stack.
|
||||
Other options exist for almost all the below. If you find something that works better for you, use it!
|
||||
|
||||
Consider the below as a suggested/supported baseline.
|
||||
|
||||
### General Tooling
|
||||
|
||||
- Code Spell Checker <https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker>
|
||||
- Vim <https://marketplace.visualstudio.com/items?itemName=vscodevim.vim>
|
||||
|
||||
### Docker / k8s
|
||||
|
||||
- Docker:
|
||||
- <https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker>
|
||||
- <https://code.visualstudio.com/docs/containers/overview>
|
||||
- Bridge to K8s <https://marketplace.visualstudio.com/items?itemName=mindaro.mindaro> <https://code.visualstudio.com/docs/containers/bridge-to-kubernetes>
|
||||
|
||||
### Git
|
||||
|
||||
- Git Extension Pack <https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack>
|
||||
- Git Tree Compare <https://marketplace.visualstudio.com/items?itemName=letmaik.git-tree-compare>
|
||||
- Git Tags <https://marketplace.visualstudio.com/items?itemName=howardzuo.vscode-git-tags>
|
||||
- Gitea-VsCode <https://marketplace.visualstudio.com/items?itemName=ijustdev.gitea-vscode>
|
||||
|
||||
### (Cross) Compile / (Remote) Debug / (Remote) development
|
||||
|
||||
This section is a work in progress. Below is the current guides/plugins that are being tested. Roughly in decreasing order of confirmed stability/active usage.
|
||||
YMMV, DD , Buyer Beware etc etc etc.
|
||||
|
||||
- <https://code.visualstudio.com/docs/remote/remote-overview>
|
||||
- <https://code.visualstudio.com/docs/remote/ssh>
|
||||
- <https://dimamoroz.com/2021/03/09/intel-nuc-for-development/>
|
||||
- <https://github.com/Ed-Yang/rpidebug>
|
||||
- <https://enes-ozturk.medium.com/remote-debugging-with-gdb-b4b0ca45b8c1>
|
||||
- <https://enes-ozturk.medium.com/cross-compiling-with-cmake-and-vscode-9ca4976fdd1>
|
||||
- <https://gist.github.com/aakashpk/e90d4651b074248b4823f6d2dc3373a0>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=webfreak.debug>
|
||||
- <https://code.visualstudio.com/docs/cpp/config-linux>
|
||||
|
||||
### Markdown (and documentation in )
|
||||
|
||||
- Markdown All in One <https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-oneoo>
|
||||
- Markdown Preview Enhanced <https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced>
|
||||
- markdownlint <https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint>
|
||||
- Excel to markdown table <https://marketplace.visualstudio.com/items?itemName=csholmq.excel-to-markdown-table>
|
||||
- MdTableEditor < <https://marketplace.visualstudio.com/items?itemName=clover.md-table-editor>>
|
||||
- Markdown Table Formatter https://marketplace.visualstudio.com/items?itemName=fcrespo82.markdown-table-formatter
|
||||
- Gitdoc <https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc>
|
||||
- Draw.io integration <https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio>
|
||||
- PlantUML
|
||||
- <https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml>
|
||||
- <https://www.freecodecamp.org/news/inserting-uml-in-markdown-using-vscode/>
|
||||
- Latex Workshop <https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop>
|
||||
|
||||
### Data
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.geo-data-viewer>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv>
|
||||
|
||||
### Bash
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode>
|
||||
|
||||
## Plugins - Team-SWEng
|
||||
|
||||
### API (rest) development
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=humao.rest-client>
|
||||
|
||||
### Web App development
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks>
|
||||
|
||||
### YAML
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml>
|
||||
|
||||
### Rust
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=rust-lang.rust>
|
||||
|
||||
### C/C++
|
||||
|
||||
- <https://ludwiguer.medium.com/configure-visual-studio-code-to-compile-and-run-c-c-3cef24b4f690>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-extension-pack0>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner>
|
||||
|
||||
#### Arduino/Seeduino
|
||||
|
||||
-_<https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino>
|
||||
|
||||
#### CUDA
|
||||
|
||||
TBD. Pull requests welcome.
|
||||
|
||||
### Java
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack>
|
||||
|
||||
### PHP
|
||||
|
||||
- <https://github.com/cytopia/devilbox/blob/50ab236ea9780e6c3ba35d357a451d48aba9a5d2/docs/intermediate/configure-php-xdebug/linux/vscode.rst>
|
||||
|
||||
### Python
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=ms-python.python>
|
||||
|
||||
## Plugins - Team-MechEng
|
||||
|
||||
### Octave
|
||||
|
||||
TBD. Pull requests welcome.
|
||||
|
||||
### R
|
||||
|
||||
TBD. Pull requests welcome.
|
||||
|
||||
### Jupyter
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter>
|
||||
|
||||
### STL
|
||||
|
||||
- <https://marketplace.visualstudio.com/items?itemName=xdan.stlint-vscode-plugin>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=md2perpe.vscode-3dviewer>
|
||||
- <https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-3dviewer>
|
||||
|
||||
### G-code
|
||||
|
||||
TBD. Pull requests welcome.
|
||||
|
||||
### Gerber
|
||||
|
||||
TBD. Pull requests welcome.
|
Reference in New Issue
Block a user