TSYS Group - Engineering Documentation - Visual Studio Code Environment Setup Guide

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 CTO and has/does need 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 produced using (blockdiag? uml? markdown? all the above? extension(s))

Short version

very soon (may 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. Browse 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.

Software Programs Used

You'll need to setup some subset of the tools below todo your job (in addition to VsCode), and also use VsCode with various TSYS hosted services like Gitea, Jenkins and Docker/K3s.

Setup of external tools is outside the scope of this document. For guidance on tool setup, please see the following links:

This software has two modes of deployment:

  • downloaded from the vendor and setup on your physical workstation (used for dev/testing/experimenting)
  • downloaded from the /subo directory and ran on your physical workstation or run from the /subo directory on a virtual workstation you login to remotely

The software that is built/deployed in /subo is the only version approved for production use.

The exception to that is if it has an OTS notation next to it's name, in which case you can use the latest stable version from the vendor.

Once you've setup your needed external tools, return to this document and continue with setup of VsCode as needed to work with the tooling you installed.

ProgramUsed ByLinkProduct Scope
obs (OTS)Allhttps://obsproject.com/All
bitwaden (OTS)Allhttps://bitwarden.com/All
docear (OTS)Allhttps://docear.org/All
polar (OTS)Allhttps://getpolarized.io/All
calibre (OTS)Allhttps://calibre-ebook.com/All
vym (OTS)Allhttp://www.insilmaril.de/vym/All
argouml (OTS)Allhttps://github.com/argouml-tigris-org/argoumlAll
bonita (OTS)Allhttps://www.bonitasoft.com/All
Docker Desktop (OTS)Allhttps://www.docker.com/products/docker-desktopAll
Pandoc (OTS)Allhttps://pandoc.org/All
EsimTeam-HwEnghttps://esim.fossee.in/MorseFlyer (avionics), MorseSkynet
KicadTeam-HwEnghttps://gitlab.com/kicad/code/kicadMorseFlyer (avionics), MorseSkynet
LibrePCBTeam-hwEnghttps://librepcb.org/MorseFlyer (avionics), MorseSkynet
NgSpiceTeam-HwEnghttp://ngspice.sourceforge.net/resources.htmlMorseFlyer (avionics), MorseSkynet
qrouterTeam-HwEnghttp://opencircuitdesign.com/qrouter/MorseFlyer (avionics), MorseSkynet
GerbyTeam-HwEnghttp://gerbv.geda-project.org/MorseFlyer (avionics), MorseSkynet
camoticsTeam-MechEnghttps://camotics.org/MorseFlyer (avionics), MorseSkynet
GprMaxTeam-HwEnghttps://github.com/gprMax/gprMaxMorseFlyer (avionics), MorseSkynet
SciKit-RFTeam-HwEnghttps://scikit-rf.readthedocs.io/en/latest/MorseFlyer (avionics), MorseSkynet
FloraTeam-HwEng/SwEnghttps://flora.aalto.fi/MorseFlyer (avionics), MorseSkynet
inkscapeTeam-HwEng/MechEnghttps://inkscape.org/MorseFlyer, MorseSkynet
gerber2graphtecTeam-HwEnghttps://github.com/pmonta/gerber2graphtecMorseFlyer, MorseSkynet
gerber2graphtecTeam-HwEnghttps://github.com/colinoflynn/gerber2graphtec/>MorseFlyer, MorseSkynet
BlenderTeam-MechEng/HwEnghttps://www.blender.org/MorseFlyer, MorseSkynet
FreecadTeam-MechEng/HwEnghttps://github.com/FreeCADMorseFlyer, MorseSkynet
LibrecadTeam-MechEng/HwEnghttps://librepcb.org/MorseFlyer, MorseSkynet
SolvespaceTeam-MechEnghttps://solvespace.com/index.plMorseFlyer, MorseSkynet
CuraTeam-MechEnghttps://ultimaker.com/software/ultimaker-curaMorseFlyer (envelope/parafoil/airframe)
Cubit ToolkitTeam-MechEnghttps://cubit.sandia.gov/MorseFlyer (envelope/parafoil/airframe)
ParaviewTeam-MechEnghttps://www.paraview.org/MorseFlyer (envelope/parafoil/airframe)
OctaveTeam-MechEnghttps://hg.savannah.gnu.org/hgweb/octaveMorseFlyer (envelope/parafoil/airframe)
OpenVSPTeam-MechEnghttp://openvsp.org/MorseFlyer (envelope/parafoil/airframe)
OneLABTeam-MechEnghttp://onelab.info/MorseFlyer (envelope/parafoil/airframe)
SciLabTeam-MechEnghttps://www.scilab.org/MorseFlyer (envelope/parafoil/airframe)
Warp3dTeam_MechEnghttp://www.warp3d.net/MorseFlyer (envelope/parafoil/airframe)
CodeAsterTeam-MechEnghttps://www.code-aster.org/V2/spip.php?rubrique2MorseFlyer (envelope/parafoil/airframe)
VirtualSatelliteTeam_MechEnghttps://github.com/virtualsatelliteMorseFlyer (envelope/parafoil/airframe)
NasaTrickTeam_MechEnghttps://github.com/nasa/trickMorseFlyer (envelope/parafoil/airframe)
NasaTran95Team_MechEnghttps://github.com/nasa/trickMorseFlyer (envelope/parafoil/airframe)
rstudio (OTS)Team-HwEnghttps://www.rstudio.com/MorseFlyer (envelope/parafoil/airframe)
DbEaver(OTS)Team-SwEnghttps://dbeaver.io/MorseFlyer(avionics), RacKRental.net, HFNOC
CUDA SDKTeam-HwEnghttps://developer.nvidia.com/cuda-zoneMorseFlyer (envelope/parafoil/airframe)
Microsoft R (OTS)Team-HwEnghttps://mran.microsoft.com/openMorseFlyer (avionics)
open 3d model viewerTeam-MechEnghttps://acgessler.github.io/open3mod/MorseFlyer (envelope/parafoil/airframe)
PHP runtimeTeam-SwEnghttp://devilbox.org/RackRental
postman (OTS)Team-SwEnghttps://www.postman.com/RackRental/HFNOC
xilinxTeam-HwEnghttps://www.xilinx.com/MorseSkynet
sdrsharpTeam-HwEnghttps://www.rtl-sdr.com/tag/sdrsharp/MorseSkynet
gnuradioTeam-HwEnghttps://www.gnuradio.org/MorseSkynet
XilinxTeam-HwEnghttps://www.xilinx.com/support/download.htmlMorseSkynet
YoSysTeam-HwEnghttp://www.clifford.at/yosys/MorseSkynet
graywolfTeam-HwEnghttps://github.com/rubund/graywolfMorseSkynet
chiselTeam-HwEnghttps://www.chisel-lang.org/MorseSkynet
embitz (OTS)Team-SwEng/HwEnghttps://www.embitz.org/MorseSkynet
android studio (OTS)Team-SwEnghttps://developer.android.com/studioMorsePod
grass gis (OTS)Team-SwEnghttps://grass.osgeo.org/HFNOC
qgis (OTS)Team-SwEnghttps://qgis.org/en/site/HFNOC
udig (OTS)Team-SwEnghttp://udig.refractions.net/HFNOC
OpenGribsTeam-SwEnghttps://opengribs.org/en/HFNOC
worldwind (OTS)Team-HwEnghttps://worldwind.arc.nasa.gov/HFNOC
sweethome3d (OTS)Team-MechEnghttp://www.sweethome3d.com/MorseCollective
jxplorer (OTS)Team-IThttp://jxplorer.org/HFNOC/HFNFC
ghidra (OTS)Team-SwEnghttps://ghidra-sre.org/ALl (SDLC)
openscap (OTS)Team-IThttps://www.open-scap.org/tools/scap-workbench/All (SDLC)
metasploitTeam-SwEnghttps://github.com/rapid7/metasploit-framework/wiki/Nightly-InstallersAll (SDLC)
OWASP Threat DragonTeam-SwEnghttps://owasp.org/www-project-threat-dragon/All (SDLC)

Languages Used

LanguageUsed ByProduct Scope
bashTSYS wideAll
MarkdownTSYS wideAll
dockerfile/docker composeTSYS wideAll
helm chartsTSYS wideAll
YAMLTSYS wideAll
c/c++Team-SwEngMorseFlyer
JavaTeam SwEngMorseTrackerHUD,MorseTracker
javascriptTeam SwEngMorseTrackerHUD
Some geo spatial stuffTeam SwEngMorseFlyer (avionics)
GerberTeam HwEngMorseSkynet, MorseFlyer (avionics)
tcl/tkTeam HwEngMorseSkynet
XilinxTeam HwEngMorseSkynet
CUDATeam MechEngMorseFlyer (envelope/airframe)
python (Jupyter and stand alone)Team MechEngMorseFlyer (envelope/airframe)
octaveTeam MechEngMorseFlyer (envelope/airframe)
RTeam MechEngMorseFlyer (envelope/airframe)
PHPTEam-SwEngRackRental.net , HFNOC/HFNFC
OpenFAASTeam-SwEngRackRental.net
RubyTeam-SwEngAll (as part of SDLC testing)

Deployment Targets

TargetUsed ByProduct Scope
Raspberry Pi (cross compiled)Team-SwEngMorseFlyer (Avionics)
Arduino (cross compiled)Team-SwEngMorseFlyer (Avionics)
FreeRTOS (cross compiled)Team-SwEngMorseFlyer (Avionics)
TSYS Web Farm (lots of PHP (wordpress etc))Team-WebEngRackRental.net, HFNOC, HFNFC
Subo pi farm (multi arch) Docker / k3s (and balena)Team-SwEngMorseFlyer (Avionics), MorseSkynet
OpenMCT farm (java/micro services)Team-SwEngMorseTracker/MorseTrackerHUD
TSYS K3S sandbox/dev/prod clustersAll teamsAll
Jenkins build pipelinesAll teamsAll

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.
  • 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

Docker / k8s

Git

Remote development/debug

THis is used regularly by Techops and Charles and is well supported.

Cross Compile / Remote Debug

Markdown

Bash

Plugins - Team-SWEng

YAML

C/C++

Arduino/Seeduino

-_https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino

CUDA

TBD. Pull requests welcome.

Java

PHP

Geospatial

Python

Plugins - Team-MechEng

Octave

TBD. Pull requests welcome.

R

TBD. Pull requests welcome.

Jupyter

STL

G-code

TBD. Pull requests welcome.

Gerber

TBD. Pull requests welcome.