Software Installation
Linux Development Environment
Installing Visual Studio Code
For Linux, use the VS Code IDE. The latest source can be found at: https://code.visualstudio.com/download
- 
If using Ubuntu, select the .deb format, or APT $ sudo apt update $ sudo apt install software-properties-common apt-transport-https wget # (on WSL2, you can stop here. Vs code can be installed now, with `code .`) $ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - $ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" $ sudo apt install code
- 
Run VS Code, and from the Extensions side bar (CTRL+SHIFT+X OR Menu View > Extensions), run the following installations: - Nuget Package Manager
- C# (Base Language support)
- C# .Net 8.0 SDK for Linux (see below)
 
.Net 8.0, For C# Development
Note
The HCC2 software is currently using Microsoft .NET SDK version 8.0 internally, so please download .NET 8.0 of the C# SDK.
By matching .NET versions, you can apply the installed .NET libraries to your application, reducing the application's Docker container size.
Sensia reserve the right to change the supported versions as needed.
The C# SDK can be installed with this command:
sudo apt install dotnet-sdk-8.0
To install manually:
- 
Download the appropriate installer for C# .NET from the following location: .Net Download 
- 
Run the installer (assuming the .NET package is located in $HOME/Downloads)mkdir -p $HOME/dotnet && tar zxf Downloads/dotnet-sdk-8.0.408-linux-x64.tar.gz -C $HOME/dotnet
- 
Edit your shell profile file ( $HOME/.profileif using Ubuntu) and add the following lines at the end of the file:export PATH=$PATH/usr/share/dotnet export DOTNET_ROOT=/usr/share/dotnet
- 
Execute the following commands: The correct version of dotnet should be indicated.source $HOME/.profile dotnet --version
- 
Restart VS Code. 
Installing Nuget Package Manager
- Open VS Code.
- Press Ctrl-Shift-X.
- In the top textbox (left) write NuGet Package Manager. Find it in the list (should be the first).
- Press Install.
Windows Development Environment
Installing Visual Studio Code
- 
If you are using the VS Code IDE, navigate to https://code.visualstudio.com/download and select the appropriate Windows installer to install Visual Studio Code. 
- 
Start VS Code, press CTRL+SHIFT+Xor choose Menu View > Extensions to display the Extensions sidebar, and run the following installations:- Nuget Package Manager
- C# (Base Language support)
- C# .Net 8.0 SDK for Linux (see below)
 
- 
Install C# tools for Visual Studio Code from Visual Studio Marketplace 
Installing Development Tools
Installing Python
- 
Install python3 (it is already installed in Ubuntu 20.04). Follow the instructions found here: Installing Python3. 
- 
Install PIP tool (if not already installed): sudo apt install python-3-pip
- 
Install pymodbus python package. Run the following commands: If you receive an error in WSL2 involving "externally-managed-environment", you may need to enable a virtual environment (venv) to install pymodbus. Typically you needcd $HOME pip install pymodbus==3.6.2sudo apt install python3-venv && python3 -m venv .venv && source .venv/bin/activate && pip install pymodbus==3.6.2. Thereafter, each time you run the python application, you need tosource .venv/bin/activate.
Installing Git
The "Git" version control system is used throughout this document and should be installed from git-scm.com.
To use apt, run the following command:
sudo apt-get -y install git
Installing Docker
- 
Go to page: Install Docker Engine on Ubuntu. There you’ll find the exact instructions to install Docker in Ubuntu 22.04. 
- 
Add your user to the Docker group. Run the following command: sudo groupadd docker sudo usermod -aG docker $USER
If you are running a Windows/WSL environment, Docker Desktop is available from Docker.com.
Installing Mender
- 
Install mender-artifact by following the instructions at doc.mender.io. Select the Linux platform. 
- 
Once downloaded (assuming it is in $HOME/Downloads), run the following commands:(where X, Y and Z are the specific version you have downloaded)sudo dpkg -i ~/Downloads/mender-artifact_X_Y_Z-1+ubuntu+noble_amd64.deb
Note
If mender-artifact is not owned by ‘root’, enter the following command:
sudo chown root mender-artifact
- 
To check mender-artifact is correctly installed, type: mender-artifact -- version