Skip to content

Latest commit

 

History

History
2156 lines (1425 loc) · 100 KB

File metadata and controls

2156 lines (1425 loc) · 100 KB

Setup guide for a development machine on Windows

This file contains the Development Software and Tools section of my Setup guide for a development machine on Windows. The introduction to this guide as well as its full Table of Contents can be found on the README.md file of this repository. The Table of Contents of this section is listed below.

Table of Contents

  1. Development Software & Tools
    1. Notepad++
    2. Meld
    3. Command Line Fuzzy Finder
    4. Make
    5. jq
    6. ripgrep
    7. OpenCode
    8. AWS CLI
    9. Granted
    10. Docker
    11. kubectl
    12. kubectx
    13. K9s
    14. Java
    15. Apache Maven
    16. Apache Tomcat
    17. Quarkus CLI
    18. Node.js
    19. Terraform
    20. IntelliJ IDEA
    21. Visual Studio Code
    22. Zed
    23. DBeaver
    24. Postman
    25. Bruno

4. Development Software & Tools

4.1. Notepad++

Notepad++ is a free and open-source text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window.

4.1.1. Installation

WINDOWS

To install Notepad++, open a PowerShell console and execute the following commands:

scoop bucket add extras
scoop install extras/notepadplusplus

4.1.2. Configuration

On the menu option Settings->Plugins Admin..., install the plugins BetterMultiSelection, DSpellCheck, Json Tools and XML Tools.

4.2. Meld

Meld is the visual diff and merge tool, targeted at developers. It allows users to compare two or three files or directories visually, color-coding the different lines.

WinMerge is an excellent alternative to Meld but there's only the Windows and Meld is multiplatform and that allows me to use the same software on every operating system that I work with.

4.2.1. Installation

WINDOWS

To install Meld, open a PowerShell console and execute the following commands:

scoop bucket add extras
scoop install extras/meld

4.3. Command Line Fuzzy Finder

The Command-line Fuzzy Finder | fzf is a general-purpose command-line fuzzy finder. It's an interactive filter program for any kind of list; files, command history, processes, hostnames, bookmarks, git commits, etc. It implements a "fuzzy" matching algorithm, so you can quickly type in patterns with omitted characters and still get the results you want.

4.3.1. Installation

4.3.1.1. Installation on the WSL File System

WSL

To install Command-line Fuzzy Finder | fzf on the WSL File System, following the official instructions, execute the following command on a Ubuntu terminal.

sudo apt install fzf

To verify if the fzf installation was properly made, check the output of the following command:

fzf --version
fzf --help

Check the output of the previous command fzf --help to verify if the installed version supports shell integration and if it does, open the file ~/.bashrc with the Nano text editor and execute the following command:

nano ~/.bashrc

Then, add the upcoming snippet to the ~/.bashrc file.

# Set up fzf key bindings and fuzzy completion
eval "$(fzf --bash)"

Save the changes with the command CTRL + O and then exit the Nano text editor with the command CTRL + X.

To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc
4.3.1.2. Installation on the Windows Native File System

WINDOWS

To install fzf, open a PowerShell console and execute the following command:

scoop install main/fzf

To verify if the fzf installation was properly made, check the output of the following command:

fzf --version
fzf --help

To set up shell integration with Git Bash, open the file ~/.bashrc with the Nano text editor, executing the below command on a Git Bash terminal.

nano ~/.bashrc

Then, add the upcoming snippet to the ~/.bashrc file.

# Set up fzf key bindings and fuzzy completion
eval "$(fzf --bash)"

Save the changes with the command CTRL + O and then exit the Nano text editor with the command CTRL + X.

To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc

4.4. Make

GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.

4.4.1. Installation

4.4.1.1. Installation on the WSL File System

WSL

To install GNU Make on the WSL File System, execute the following command on a Ubuntu terminal.

sudo apt install make

To verify if the GNU Make installation was properly made, check the output of the following command:

make --version
4.4.1.2. Installation on the Windows Native File System

WINDOWS

To install GNU Make on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/make

To verify if the GNU Make installation was properly made, check the output of the following command:

make --version

4.5. jq

jq is a lightweight and flexible command-line JSON processor.

4.5.1. Installation

4.5.1.1. Installation on the WSL File System

WSL

To install jq on the WSL File System, execute the following command on a Ubuntu terminal.

sudo apt-get install jq

To verify if the jq installation was properly made, check the output of the following commands:

jq --version
jq --help
4.5.1.2. Installation on the Windows Native File System

WINDOWS

To install jq on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/jq

To verify if the jq installation was properly made, check the output of the following commands:

jq --version
jq --help

4.6. ripgrep

ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern.

4.6.1. Installation

4.6.1.1. Installation on the WSL File System

WSL

To install ripgrep on the WSL File System, following the official instructions, replace the {LABEL} in the below commands as appropriate and then execute them on a Ubuntu terminal.

curl -LO https://github.com/BurntSushi/ripgrep/releases/download/{VERSION}/{DEBIAN_RELEASE_ASSET}
sudo dpkg -i {DEBIAN_RELEASE_ASSET}
rm {DEBIAN_RELEASE_ASSET}

Label Definition

To verify if the ripgrep installation was properly made, check the output of the following commands:

rg --version
rg --help
4.6.1.2. Installation on the Windows Native File System

WINDOWS

To install ripgrep on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/ripgrep

To verify if the ripgrep installation was properly made, check the output of the following commands:

rg --version
rg --help

4.7. OpenCode

OpenCode is an open source agent that helps you write code in your terminal, IDE, or desktop.

4.7.1. Installation

4.7.1.1. Installation on the WSL File System

WSL

To install OpenCode on the WSL File System, following the official instructions, execute the following command on a Ubuntu terminal.

curl -fsSL https://opencode.ai/install | bash

Restart the bash section with the following command:

exec "$SHELL"

To verify if the OpenCode installation was properly made, check the output of the following commands:

opencode --version
opencode --help
4.7.1.2. Installation on the Windows Native File System

WINDOWS

To install OpenCode on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/opencode

To verify if the OpenCode installation was properly made, check the output of the following commands:

opencode --version
opencode --help

4.8. AWS CLI

The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

4.8.1. Installation

4.8.1.1. Installation on the WSL File System

WSL

To install AWS CLI on the WSL File System, following the official instructions, execute the following commands on a Ubuntu terminal.

curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscliv2.zip
unzip /tmp/awscliv2.zip -d /tmp/
sudo /tmp/aws/install

To verify if the AWS CLI installation was properly made, check the output of the following command:

aws --version

If the aws command cannot be found, you might need to restart your terminal or follow the troubleshooting in Troubleshoot AWS CLI errors.

AWS also provides a Session Manager plugin that "enables you to establish secure connections to your Amazon Elastic Compute Cloud (EC2) instances, edge devices, on-premises servers, and virtual machines (VMs)". Follow the Debian and Ubuntu official instructions to install the AWS Session Manager plugin on the WSL File System and download the .deb package executing the following command:

curl https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb -o /tmp/session-manager-plugin.deb

To install the downloaded .deb package executing the following command:

sudo dpkg -i /tmp/session-manager-plugin.deb

To verify the AWS Session Manager plugin installation, check the output of the following command:

session-manager-plugin

If the installation was successful, the following message is returned.

The Session Manager plugin is installed successfully. Use the AWS CLI to start a session.
4.8.1.2. Installation on the Windows Native File System

WINDOWS

To install AWS CLI on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/aws

To verify if the AWS CLI installation was properly made, check the output of the following command:

aws --version

If there is any problem using the AWS CLI, follow the troubleshooting in Troubleshoot AWS CLI errors.

To install the AWS Session Manager plugin on the Windows Native File System, open a PowerShell console and execute the following commands:

scoop bucket add extras
scoop install extras/aws-session-manager-plugin

To verify the AWS Session Manager plugin installation, check the output of the following command:

session-manager-plugin

If the installation was successful, the following message is returned.

The Session Manager plugin is installed successfully. Use the AWS CLI to start a session.

4.9. Granted

Granted is a command line interface (CLI) application which simplifies access to cloud roles and allows multiple cloud accounts to be opened in your web browser simultaneously.

4.9.1. Installation

4.9.1.1. Installation on the WSL File System

WSL

To install Granted on the WSL File System, following the official Linux (APT) instructions, execute the following commands on a Ubuntu terminal.

sudo apt update
sudo apt install gpg wget ca-certificates
wget -O- https://apt.releases.commonfate.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/common-fate-linux.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/common-fate-linux.gpg] https://apt.releases.commonfate.io stable main" | sudo tee /etc/apt/sources.list.d/common-fate.list
sudo apt update
sudo apt install granted

To verify if the Granted installation was properly made, check the output of the following command:

granted --version
granted --help

To pin Granted backend to file execute the following commands:

mkdir -p ~/.granted/keyring
chmod 700 ~/.granted ~/.granted/keyring
granted settings set --setting Keyring.Backend --value file
granted settings set --setting Keyring.FileDir --value "${HOME}/.granted/keyring"

To set the browser opener unified to Windows default browser via the XDG-OPEN wrapper, execute the following commands:

granted settings set --setting DefaultBrowser --value CUSTOM
granted settings set --setting CustomBrowserPath --value "${HOME}/.local/bin/xdg-open"
granted settings set --setting CustomSSOBrowserPath --value "${HOME}/.local/bin/xdg-open"

To make Granted write SSO tokens to AWS’s standard cache location (~/.aws/sso/cache), which AWS CLI v2 reads, execute the following command:

granted settings set --setting ExportSSOToken --value true

To list all Granted settings execute the following command:

granted settings list

To set up Granted shell alias, open the file ~/.bashrc with the Nano text editor, executing the following command:

nano ~/.bashrc

Then, add the upcoming snippet to the ~/.bashrc file.

# Set Granted shell alias
#
# + https://docs.commonfate.io/granted/internals/shell-alias
# + https://docs.commonfate.io/granted/troubleshooting#manually-configuring-your-shell-profile
alias assume="source assume"

Save the changes with the command CTRL + O and then exit the Nano text editor with the command CTRL + X. To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc

Now, after running assume <profile>, you can run AWS CLI commands without --profile because the AWS environment variables are set in your current shell session. To confirm that assume is executed as expected, execute assume <profile> and then check the output of the following command:

aws configure list
4.9.1.2. Installation on the Windows Native File System

WINDOWS

To install Granted on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/granted

To verify if the Granted installation was properly made, check the output of the following command:

granted --version
granted --help

To pin Granted backend to file execute, on a Git Bash terminal, the following commands:

mkdir -p ~/.granted/keyring
chmod 700 ~/.granted ~/.granted/keyring
granted settings set --setting Keyring.Backend --value file
granted settings set --setting Keyring.FileDir --value "${HOME}/.granted/keyring"

To set the browser opener unified to Windows default browser via the XDG-OPEN wrapper, replace the {LABEL} in the below commands as appropriate and then execute it, on a Git Bash terminal.

granted settings set --setting DefaultBrowser --value FIREFOX
granted settings set --setting CustomSSOBrowserPath --value "{PATH_TO_DEFAULT_BROWSER}"

Label Definition

  • {PATH_TO_DEFAULT_BROWSER}: The full path to the default browser executable file, e.g. C:/Program Files/Mozilla Firefox/firefox.exe

To make Granted write SSO tokens to AWS’s standard cache location (~/.aws/sso/cache), which AWS CLI v2 reads, execute, on a Git Bash terminal, the following command:

granted settings set --setting ExportSSOToken --value true

To list all Granted settings execute the following command:

granted settings list

To make assume behave in Git Bash like it does in PowerShell (i.e., set AWS environment variables in the current shell), add the following function to your ~/.bashrc:

# Use Granted's bash wrapper so AWS_* variables persist in this bash session
assume() {
    local granted_folder="$HOME/scoop/apps/granted/current"

    # Temporarily add Granted's install folder to PATH so the bash wrapper can find `assumego.exe`
    # and source the Granted’s bash script so exports persist in the current shell.
    PATH="$granted_folder:$PATH" \
        . "$granted_folder/assume" "$@"
}

To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc

Now, after running assume <profile>, you can run AWS CLI commands without --profile because the AWS environment variables are set in your current Git Bash session. To confirm that assume is executed as expected, execute assume <profile> and then check the output of the following command:

aws configure list

4.10. Docker

Docker is an open-source containerization platform. It enables developers to package applications into containers, which are standardized, executable components combining application source code with the operating system libraries and dependencies required to run that code in any environment.

Docker updated its Docker Desktop License Agreement and this change means that on companies with more than 250 employees or more than $10 million in annual revenue you will not be able to use Docker Desktop without a paid subscription. A possible alternative is Rancher Desktop but, as the license update is only related to Docker Desktop, it's also possible to utilize WSL to run Docker or the Docker Engine.

If you're going to do your development work on the Windows native file system, you should choose Rancher Desktop to replace Docker Desktop. But if you're planning to do all you development work on the WSL file system (taking advantage of the Linux tools), you should utilize WSL to run Docker or the Docker Engine.

4.10.1. Pre-Installation requirements

To avoid future conflicts between the ports reserved by Hyper-V and the ports used by the Docker containers, you should reset the "TCP Dynamic Port Range". That is achieved executing the upcoming commands from a PowerShell console with Administrator privileges:

netsh int ipv4 set dynamic tcp start=49152 num=16384
netsh int ipv6 set dynamic tcp start=49152 num=16384

Following the execution of the above commands, reboot the computer to apply the changes made.

After restarting the computer, check the output of the following command:

netsh int ipv4 show dynamicport tcp

The above command should now show that "TCP Dynamic Port Range" has been changed to 49152–65535. Now only the ports in this range may be reserved by Hyper-V.

4.10.2. Installation

4.10.2.1. Installation on the WSL File System

WSL

This section describes the necessary steps to install Docker and Docker Engine on a WSL Ubuntu distribution. The following steps are based on the official documentation for installing Docker on Ubuntu with some adaptations provided by Paul Knulst.

As per Docker documentation, before you can install Docker Engine, you need to uninstall any conflicting packages. Do it executing the following command:

sudo apt remove docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc
sudo apt autoremove

On your Ubuntu submodule of WSL, install the required dependencies with the following commands:

sudo apt update
sudo apt install ca-certificates curl

To add the Docker stable repository, execute the following commands:

sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

sudo apt update

Install the latest version of the Docker's packages with the following command:

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Add you user to the docker group with the following command

sudo usermod -aG docker $USER

Log out and log back in so that your group membership is re-evaluated, or run the following command to activate the changes to groups:

newgrp docker

Check the installed versions using the following commands

docker --version
dockerd --version
docker compose version
docker info

On a standard Ubuntu install, Docker is started by systemd automatically after installation. On WSL, this depends on systemd=true being enabled (as in /etc/wsl.conf) and on the WSL distro session actually starting systemd.

sudo systemctl status docker.service
sudo systemctl status containerd.service

If Docker isn’t running, start it manually with the following commands:

sudo systemctl start docker
sudo systemctl enable docker

The default iptables frontend on Ubuntu is usually iptables-nft. Docker works with iptables-nft and iptables-legacy, but if you experience Docker networking issues (for example, containers can’t reach the internet, port publishing doesn’t work, or firewall rules look wrong), you can try switching to the legacy backend as a troubleshooting step:

sudo update-alternatives --config iptables
sudo update-alternatives --config ip6tables
sudo systemctl restart docker.service

Then, verify if everything is running properly by checking the output of the following commands:

sudo systemctl status docker.service
sudo systemctl status containerd.service
docker run hello-world

When you run docker login, Docker may use a credential helper to store credentials. On Linux, secretservice requires a running DBus session and a Secret Service provider (commonly GNOME Keyring or KWallet). On a headless WSL Ubuntu (no desktop environment), this is often not available, so using pass is a practical alternative, which can be installed with the following command:

sudo apt install pass

When it's necessary to manage credentials with Docker, pass requires a GPG key to encrypt passwords and it can be created with the following command:

gpg --full-generate-key

Following the above command, when prompted, set the following options:

Kind of key:    {KEY_TYPE}
Key expiration: {KEY_EXPIRATION}
Real name:      {REAL_NAME}
Email address:  {EMAIL}
Passphrase:     {PASSPHRASE}

Label Definition

  • {KEY_TYPE}: The cryptographic algorithm and usage for your keypair. Recommended for pass: RSA and RSA (creates a primary key for signing/certifying + a subkey for encryption).
  • {KEY_SIZE}: The size of the RSA key, in bits (security vs performance trade-off). Common choices: 3072 (good default) or 4096 (stronger, slightly slower).
  • {KEY_EXPIRATION}: When the key should expire. Examples: 0 (never expires), 1y (expires in one year), 2y, 6m, etc.
  • {REAL_NAME}: A human-readable name embedded in the key’s user ID (UID).
  • {EMAIL}: The email address embedded in the key’s UID. It does not have to be “real” for cryptographic purposes, but you should use something you’ll recognize.
  • {PASSPHRASE}: The passphrase that protects your private key on disk, if you forget it, you effectively lose the ability to decrypt previously stored secrets.

After generating the key, you can discover the Key ID with the following command:

gpg --list-secret-keys --keyid-format=long

Once the GPG key is created, replace the {LABEL} in the below command as appropriate and then execute it to initialize pass with the GPG identity you want to use:

pass init {GPG_IDENTITY}

Label Definition

  • {GPG_IDENTITY} : The email used when generating the key, or the key ID

Upon success of the GPG key initialization, edit the Docker configuration to use the pass credentials helper executing the following commands:

mkdir -p ~/.docker
echo '{
    "credsStore": "pass"
}' > ~/.docker/config.json
4.10.2.2. Installation on the Windows Native File System with Rancher Desktop

WINDOWS

Rancher Desktop is an app that provides container management and Kubernetes on the desktop. It is available for Mac (both on Intel and Apple Silicon), Windows, and Linux.

Rancher Desktop installation is only necessary if you're going to do your development work on the Windows Native File System because, if you're going to do all you development work on the WSL file system, you should utilize WSL to run Docker or the Docker Engine.

Windows Linux Subsystem (WSL) is required to run Rancher Desktop. If it isn't installed, follow the instructions on this repository to install it.

To install Rancher Desktop, take the following steps:

  1. Download: Get the latest version from the releases page on GitHub and execute the installer.
  2. Install: When prompted, choose Install for all users of this machine (accept the elevated permissions prompt).
  3. Finish: When the installation is finished, uncheck Run Rancher Desktop and click Finish.
  4. Launch: Start Rancher Desktop from the Windows Start Menu.
  5. Configure: On the welcome screen, uncheck Enable Kubernetes and select dockerd as the Container Engine.

Once the installation is completed, go through Rancher Desktop preferences and set it as desired. It is recommended to enable Automatically start at login and also Start in the background.

To verify that the installation was successful, make sure Rancher Desktop is running, then open a new PowerShell console and execute:

wsl --list --verbose

You should see the Rancher Desktop distros running. Next, test if the docker command is fully functional for your user:

docker info

If you see detailed information about the Docker installation, you are done! No further action is necessary.

If docker info returns a permission error (e.g., "Access is denied"), your Windows user lacks the privileges to interact with the Docker socket. You will need to add your user to the docker-users group and that can be done taking the following steps:

  1. On a PowerShell console, check if the group exists and your membership by running:
net localgroup docker-users
  1. If the docker-users group doesn't exists yet, open a PowerShell console with Administrator privileges and create it with the following commands:
New-LocalGroup -Name 'docker-users' -Description 'docker Users Group'
  1. On a PowerShell console with Administrator privileges, add your Windows user to the group (replace {YOUR_USER_ID} with your exact Windows username, found by looking at the folder name under C:\Users\):
net localgroup docker-users "{YOUR_USER_ID}" /ADD

Security Note: Avoid the "Administrator" Workaround

You might find older tutorials or StackOverflow answers (like the one linked above) suggesting you run Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') to fix this issue. Do not do this. Adding the docker-users group to the Windows Administrators group is a severe security risk that grants full system control to anyone in the group.

How it actually works: The Docker/Rancher background service runs with elevated privileges and listens for commands via a Windows "Named Pipe" (//./pipe/docker_engine). By default, the service is programmed to look for a local group called exactly docker-users. If this group exists, the service explicitly allows members of that group to send commands through the pipe.

By simply creating the group, adding your user, and logging out/in (which refreshes your Windows security token), the Docker service will securely grant your user access to the pipe without needing to compromise your entire machine's security.

  1. Log out of Windows and log back in to apply the group membership changes.

    • Click the Start button;
    • Click your User Profile Icon;
    • Select Sign out;
    • Log back into Windows.
  2. Confirm that everything is correct, executing on a Git Bash terminal the following commands:

docker info
docker --version
kubectl version --client

The Rancher Desktop installation and usage files are stored in the following folder:

  • %USERPROFILE%\AppData\Local\rancher-desktop contains the distribution data, container images, logs, etc;

4.11. kubectl

kubectl is the command line tool for controlling Kubernetes clusters. It allows you to deploy applications, inspect and manage cluster resources, and view logs.

4.11.1. Installation

4.11.1.1. Installation on the WSL File System

WSL

To install kubectl on the WSL File System, following the official instructions, execute the following commands on a Ubuntu terminal.

Start by installing the required dependencies:

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg

Download the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories so you can disregard the version in the URL:

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.35/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg

Add the appropriate Kubernetes apt repository. If you want to use Kubernetes version different than v1.35, replace v1.35 with the desired version (check the official instructions) in the command below:

echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.35/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

Install kubectl with the following command:

sudo apt update
sudo apt install kubectl

To verify the kubectl installation, check the output of the following command:

kubectl version --client

Note

If you want to prevent kubectl from being automatically updated by apt upgrade, you can hold the package:

sudo apt-mark hold kubectl

Note

To upgrade kubectl to another minor release, you'll need to bump the version in /etc/apt/sources.list.d/kubernetes.list before running apt update and apt-get upgrade. This procedure is described in more detail in Changing The Kubernetes Package Repository.

4.11.1.2. Installation on the Windows Native File System

WINDOWS

When doing development work on the Windows Native File System, kubectl is automatically provided by Rancher Desktop. If Rancher Desktop is installed, no additional steps are required. Refer to the Rancher Desktop installation instructions in this guide for details.

To verify the kubectl installation, check the output of the following command:

kubectl version --client

4.12. kubectx

kubectx is a tool to switch between contexts (clusters) on kubectl faster. It also includeskubens, which is a tool to switch between Kubernetes namespaces (and configure them for kubectl) easily.

4.12.1. Installation

4.12.1.1. Installation on the WSL File System

WSL

To install kubectx on the WSL File System, following the official instructions, execute the following command on a Ubuntu terminal.

sudo apt install kubectx

To verify if the kubectx installation was properly made, check the output of the following command:

kubectx --version
kubectx --help
4.12.1.2. Installation on the Windows Native File System

WINDOWS

To install kubectx on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/kubectx

To verify if the kubectx installation was properly made, check the output of the following command:

kubectx --version
kubectx --help

4.13. K9s

K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of the project is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources.

4.13.1. Installation

4.13.1.1. Installation on the WSL File System

WSL

To install K9s on the WSL File System, following the official instructions, execute the following commands on a Ubuntu terminal.

wget -P /tmp https://github.com/derailed/k9s/releases/latest/download/k9s_linux_amd64.deb
sudo apt install /tmp/k9s_linux_amd64.deb
rm /tmp/k9s_linux_amd64.deb

To verify if the K9s installation was properly made, check the output of the following commands:

k9s version
k9s info
k9s help

If the command k9s info shows a warning/error stating "ERROR Unable to reads k9s config file", that's because it was just installed and haven't actually been launched yet. By design, K9s does not create its configuration files or folders during the apt install process. Instead, it generates them dynamically the very first time you start the program. All you need to do is launch K9s once to initialize your environment.

4.13.1.2. Installation on the Windows Native File System

WINDOWS

To install K9s on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/k9s

To verify if the K9s installation was properly made, check the output of the following commands:

k9s version
k9s info
k9s help

4.14. Java

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere, meaning that compiled Java code can run on all platforms that support Java without the need to recompile.

4.14.1. Installation

4.14.1.1. Installation on the WSL File System

WSL

The easiest way to install and manage multiple versions of Java on the WSL File System is to use SDKMAN. This is a free, lightweight, open-source utility written in Bash that provides a convenient command line interface to manage multiple versions of Java and also takes care of setting the necessary environment variables.

Following the official instructions, install SDKMAN and the necessary dependencies executing the upcoming commands on a Ubuntu terminal:

sudo apt update
sudo apt install zip unzip
curl -s "https://get.sdkman.io" | bash

After completing the installation process, open a new terminal or run the following command in the same shell:

source "$HOME/.sdkman/bin/sdkman-init.sh"

To confirm the installation's success, execute the following command:

sdk version

To list the available Java versions, execute the following command:

sdk list java

To install a specific version of Java, replace the {LABEL} in the upcoming command as appropriate and then execute it:

sdk install java {IDENTIFIER}

Label Definition

  • {IDENTIFIER} : Identifier of the desired Java version as shown in the output of the command sdk list java, e.g. 21.ea.35-open

To set a specific version of Java as the default, replace the {LABEL} in the upcoming command as appropriate and then execute it:

sdk default java {IDENTIFIER}

Label Definition

  • {IDENTIFIER} : Identifier of the desired Java version as shown in the output of the command sdk list java, e.g. 21.ea.35-open

Restart the bash section with the following command:

exec "$SHELL"

To check if the JAVA_HOME value was properly set, check the output of the following command:

echo $JAVA_HOME

To check if the Windows PATH value was properly set, check the output of the following command:

echo $PATH

To verify the Java installation, check the output of the following command:

java -version

If everything is correct, the above command will output Java Runtime Environment version.

Finally, to verify the Java Compiler installation, check the output of the following command:

javac -version

If everything is correct, the above command will output the Java Compiler version.

When using applications like Zscaler, it might be necessary to import security certificate to the Java Keystore. Do it by replacing the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -importcert -trustcacerts -alias {CERTIFICATE_ALIAS} -file {PATH_TO_DER_CERTIFICATE} -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -noprompt

Label Definition

  • {PATH_TO_DER_CERTIFICATE} : Path to the .der certificate file
  • {CERTIFICATE_ALIAS} : The chosen certificate alias

To confirm that the certificate was added to the JRE keystore, replace the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -v -list -keystore $JAVA_HOME/lib/security/cacerts -alias {CERTIFICATE_ALIAS} -storepass changeit -noprompt

Label Definition

  • {CERTIFICATE_ALIAS} : The chosen certificate alias
4.14.1.2. Installation on the Windows Native File System

WINDOWS

The instructions shown here describe how to manually install Java on the Windows Native File System for the current user account.

Start by creating the folder where Java will be installed, executing, on a Git Bash terminal the following commands:

mkdir -p /c/dev/java/candidates

Download the .zip option of the desired JDK version and vendor. Then, unpack it to a folder inside C:\dev\java\candidates. Rename the extracted folder taking in consideration the following structure:

{VENDOR}-{VERSION}-{PROJECT}

The different parts in the above name structure, shall be replaced as explained next:

  • {VENDOR} : The Java vendor's name, e.g. oracle
  • {VERSION} : The Java version number, including the string jdk, e.g. jdk1.8.0.231
  • {PROJECT} : The name of the project where this version of Java will be used, e.g. sa3

With the above examples, the JDK folder name would be oracle-jdk1.8.0.231-sa3

To have more control over Java versions and updates, you will create a symbolic link namedcurrent that will target the desired Java candidate folder. But, to be able to do so without Administrator priviliges, you need to enable Windows Developer Mode which can be done following the Advanced Windows Settings of this guide.

With Developer Mode enabled, replace the {LABEL} in the upcoming command as appropriate and then execute it, on a Windows Command Prompt, to create a symbolic link named current that targets the the desired Java candidate folder:

mklink /J C:\dev\java\candidates\{JAVA_CANDIDATE} C:\dev\java\current
  • {JAVA_CANDIDATE} : The folder's name that contains the desired Java candidate, e.g. oracle-jdk1.8.0.231-sa3

Check the output of the upcoming commands to confirm that the the symlink was created as desired:

dir C:\dev\java\candidates\
dir C:\dev\java\candidates\current\

Later if you want to upgrade and/or change the Java version in use, you can simply unpack the newer version and change the symlink to point to the latest version.

del C:\dev\java\candidates\current
mklink /J C:\dev\java\candidates\{JAVA_CANDIDATE} C:\dev\java\current

To set JAVA_HOME as environment variable for the current user account, press WIN + R, type rundll32.exe sysdm.cpl,EditEnvironmentVariables and then press Enter.

On the User variables section, click the New button and fill the Variable name input box with JAVA_HOME and Variable value input box with the path C:\dev\java\current . If a JAVA_HOME already exists, select it and click the Edit button, then fill the Variable value input box with the path C:\dev\java\current.

Still on the User variables section, select the Path variable and click the Edit button. Then, click the New button and fill the input box with the following value:

%JAVA_HOME%\bin

Click the OK button to close the window used to edit the PATH variable and then click the OK button on the environment variables window to close it.

To check if the Windows JAVA_HOME value was properly set, open a Windows Command Prompt and check the output of the following command:

echo %JAVA_HOME%

To check if the Windows PATH value was properly set, on the same Windows Command Prompt, check the output of the following command:

echo %PATH%

To verify the Java installation, on the same Windows Command Prompt, check the output of the following command:

java -version

If everything is correct, the above command will output Java Runtime Environment version.

Finally, to verify the Java Compiler installation, on the same Windows Command Prompt, check the output of the following command:

javac -version

If everything is correct, the above command will output the Java Compiler version.

When using applications like Zscaler, it might be necessary to import security certificate to the Java Keystore. On a Git Bash terminal, replace the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -importcert -trustcacerts -alias {CERTIFICATE_ALIAS} -file {PATH_TO_DER_CERTIFICATE} -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -noprompt

Label Definition

  • {PATH_TO_DER_CERTIFICATE} : Path to the .der certificate file
  • {CERTIFICATE_ALIAS} : The chosen certificate alias

To confirm that the certificate was added to the JRE keystore, replace the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -v -list -keystore $JAVA_HOME/lib/security/cacerts -alias {CERTIFICATE_ALIAS} -storepass changeit -noprompt

Label Definition

  • {CERTIFICATE_ALIAS} : The chosen certificate alias

4.15. Apache Maven

Apache Maven is a build automation tool used primarily for Java projects. It can also be used to build and manage projects written in C#, Ruby, Scala, and other languages and it is hosted by the Apache Software Foundation.

4.15.1. Installation

4.15.1.1. Installation on the WSL File System

WSL

To be able to install a specific Apache Maven version on the WSL File System, I like to follow a procedure inspired by the Linuxiz Blog.

Start by creating the folder where Apache Maven will be installed, executing the following commands:

sudo mkdir -p /opt/maven/candidates
sudo chown -R $USER:$USER /opt/maven/

Check the output of the upcoming command to confirm that the folder was created as desired:

ls -la --group-directories-first /opt

To download the desired Apache Maven version in the /tmp directory, replace the {LABEL} in the upcoming command as appropriate and then execute it:

wget {DOWNLOAD_LINK} -P /tmp

Label Definition

  • {DOWNLOAD_LINK} : Download link to the binary tar.gz archive take from the official download page

Once the download is completed, extract the archive in the /opt/candidates directory with the following command:

tar xf /tmp/apache-maven-*.tar.gz -C /opt/maven/candidates/

Check the output of the upcoming command to confirm that the folder was created as desired:

ls -la --group-directories-first /opt/maven/candidates

Then, rename the extracted folder taking in consideration the following structure:

apache-maven-{VERSION}-{PROJECT}

The different parts in the above name structure, shall be replaced as explained next:

  • {VERSION} : The Maven version number, e.g. 3.8.6
  • {PROJECT} : The name of the project where this instance of Maven will be used, e.g. sa3

With the above examples, the Maven folder name would be apache-maven-3.8.6-sa3

Check the output of the upcoming command to confirm that the folder was renamed as desired:

ls -la --group-directories-first /opt/maven/candidates

To have more control over Apache Maven versions and updates, replace the {LABEL} in the upcoming command as appropriate and then execute it to create a symbolic link current that will point to the Apache Maven installation folder:

ln -s /opt/maven/candidates/{MAVEN_FOLDER} /opt/maven/current
  • {MAVEN_FOLDER} : The folder's name that contains the desired version, e.g. apache-maven-3.8.6-sa3

Check the output of the upcoming commands to confirm that the the symlink was created as desired:

ls -la --group-directories-first /opt/maven/
ls -la --group-directories-first /opt/maven/current/

Later if you want to upgrade your Apache Maven installation you can simply unpack the newer version and change the symlink to point to the latest version.

To set the MAVEN_HOME environment variable for your WSL user, open the file ~/.bashrc with the Nano text editor, executing the below command on a Ubuntu terminal.

nano ~/.bashrc

Then, add the upcoming snippet to the ~/.bashrc immediately before sourcing the file to customize the bash prompt.

# User's environment variables
export MAVEN_HOME=/opt/maven/current

# User's path customization
export PATH=${MAVEN_HOME}/bin:${PATH}

Save the changes with the command CTRL + O and then exit the Nano text editor with the command CTRL + X.

To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc

To check if the MAVEN_HOME environment variable was properly set, check the output of the following command:

echo $MAVEN_HOME

To check if the users's PATH was properly set, check the output of the following command:

echo $PATH

To verify the Apache Maven installation, check the output of the following command:

mvn -version

If everything is correct, the above command will output the Apache Maven version.

4.15.1.2. Installation on the Windows Native File System

WINDOWS

To install Apache Maven, download the desired Binary zip archive and unpack it to the folder C:\dev\apache-maven\candidates. Rename the extracted folder taking in consideration the following structure:

apache-maven-{VERSION}-{PROJECT}

The different parts in the above name structure, shall be replaced as explained next:

  • {VERSION} : The Maven version number, e.g. 3.8.6
  • {PROJECT} : The name of the project where this instance of Maven will be used, e.g. sa3

With the above examples, the Maven folder name would be apache-maven-3.8.6-sa3

To have more control over Apache Maven versions and updates, you will create a symbolic link named current that will target the desired Apache Maven candidate folder. But, to be able to do so without Administrator priviliges, you need to enable Windows Developer Mode which can be done following the Advanced Windows Settings of this guide.

With Developer Mode enabled, replace the {LABEL} in the upcoming command as appropriate and then execute it, on a Windows Command Prompt, to create a symbolic link named current that targets the the desired Apache Maven candidate folder:

mklink /J C:\dev\maven\candidates\{MAVEN_CANDIDATE} C:\dev\maven\current
  • {MAVEN_CANDIDATE} : The folder's name that contains the desired Maven candidate, e.g. apache-maven-3.8.6-sa3

Check the output of the upcoming commands to confirm that the the symlink was created as desired:

dir C:\dev\maven\candidates\
dir C:\dev\maven\candidates\current\

Later if you want to upgrade and/or change the Apache Maven version in use, you can simply unpack the newer version and change the symlink to point to the desired candidate.

del C:\dev\maven\candidates\current
mklink /J C:\dev\maven\candidates\{MAVEN_CANDIDATE} C:\dev\maven\current

To set the MAVEN_HOME environment variable for the current user account, press WIN + R, type rundll32.exe sysdm.cpl,EditEnvironmentVariables and then press Enter.

On the User variables section, click the New button and fill the Variable name input box with MAVEN_HOME and the Variable value input box with the path to the Apache Maven folder. If a MAVEN_HOME already exists, select it and click the Edit button, then fill the Variable value input box with the path to the Apache Maven installation folder.

Still on the User variables section, select the Path variable and click the Edit button. Then, click the New button and fill the input box with the following value:

%MAVEN_HOME%\bin

Click the OK button to close the window used to edit the PATH variable and then click the OK button on the environment variables window to close it.

To check if the Windows MAVEN_HOME value was properly set, open a Windows Command Prompt and check the output of the following command:

echo %MAVEN_HOME%

To check if the Windows PATH value was properly set, on the same Windows Command Prompt, check the output of the following command:

echo %PATH%

To verify the Apache Maven installation, on the same Windows Command Prompt, check the output of the following command:

mvn -version

If everything is correct, the above command will output the Apache Maven version.

4.15.2. Configuration

The default location for the user's settings file and for the Maven Local Repository is the .m2 folder at the user's Home Folder. Check it it already exists and if it doesn't create it with the upcoming command. If Apache Maven is installed on the WSL File System, use a Ubuntu terminal and if it is installed on the Windows Native File System use a Git Bash terminal.

mkdir -p ~/.m2

The development environment will better contained if a Maven Local Repository is set for each project. Therefore, replace the {LABEL} in the upcoming command as appropriate and execute it. If Apache Maven is installed on the WSL File System, use a Ubuntu terminal and if it is installed on the Windows Native File System use a Git Bash terminal.

mkdir -p ~/.m2/repository-{PROJECT}

Label Definition

  • {PROJECT} : The label that identifies the project name

To set the folder created with the above command as the custom location for the Maven Local Repository, edit the file settings.xml located at the conf folder of the Apache Maven installation folder, first replace the {LABEL} in the below snippet as appropriate and then insert the it immediately after the localRepository comment section.

<localRepository>${user.home}/.m2/repository-{PROJECT}</localRepository>

Label Definition

  • {PROJECT} : The label that identifies the project name

4.15.3. Usage & Maintenance

To maintain a transparent development environment, each project version uses a dedicated settings file. These are linked to the default Maven location (~/.m2/settings.xml) using Symbolic Links (Windows Developer mode must be enabled). This allows IDEs and the CLI to work without additional flags or admin permissions, while providing a clear visual indication of which configuration is currently active.

Every project configuration must be stored in ~/.m2/ using following naming structure:

settings-{PROJECT}-{DATE}.xml

The different parts in the above name structure, shall be replaced as explained next:

  • {PROJECT} : The name of the project where the settings.xml file was used with, e.g. sa3
  • {DATE} : The date of the change on the format yyyymmdd, e.g. 20200321

With the above examples, the settings.xml backup file name would be settings-sa3-20200321.xml

If a project requires no specific configuration, create an "empty" settings file containing only the basic <settings> tags to ensure Maven remains functional:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
</settings>

To switch to a different project or update to a new version, you must first delete the existing ~/.m2/settings.xml symlink and then create the new one. If Apache Maven is installed on the WSL File System, replace the placeholders in the below command as necessary and then execute it on a Ubuntu terminal to get it done.

rm ~/.m2/settings.xml
ln ~/.m2/settings-{PROJECT}-{DATE}.xml ~/.m2/settings.xml

When Apache Maven is installed on the Windows Native File System, to delete the existing ~/.m2/settings.xml symlink and then create the new one when switching to a different project or update to a new version, replace the placeholders in the below command as necessary and then execute it on a Windows Command Prompt.

del %USERPROFILE%\.m2\settings.xml
mklink %USERPROFILE%\.m2\settings.xml %USERPROFILE%\.m2\settings-{PROJECT}-{DATE}.xml

4.16. Apache Tomcat

Apache Tomcat is an open source implementation of the Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations specifications. These specifications are part of the Jakarta EE platform.

4.16.1. Installation

4.16.1.1. Installation on the Windows Native File System

WINDOWS

To install Apache Tomcat application server on the Windows Native File System, download the desired release zip archive and unpack it to the folder C:\dev\apache-tomcat\candidates. Rename the extracted folder taking in consideration the following structure:

tomcat-{VERSION}-{PROJECT}

The different parts in the above name structure, shall be replaced as explained next:

  • {VERSION} : The Tomcat version number, e.g. 8.5.82
  • {PROJECT} : The name of the project where this instance of Tomcat will be used, e.g. sa3

With the above examples, the Tomcat folder name would be tomcat-8.5.82-sa3

4.17. Quarkus CLI

The Quarkus CLI lets you create Quarkus projects, manage extensions and do essential build and development tasks using the underlying project build tool.

4.17.1. Installation

4.17.1.1. Installation on the WSL File System

WSL

To install Quarkus CLI on the WSL File System, following the official instructions, execute the following command on a Ubuntu terminal.

sdk install quarkus

To verify if the Quarkus CLI installation was properly made, check the output of the following command:

quarkus --version
4.17.1.2. Installation on the Windows Native File System

WINDOWS

To install Quarkus CLI, open a PowerShell console and execute the following command:

scoop install main/quarkus-cli

To verify if the Quarkus CLI installation was properly made, check the output of the following command:

quarkus --version

4.18. Node.js

Node.js is a cross-platform, open-source JavaScript runtime environment that runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

4.18.1. Installation

The most pratical way to install Node.js is via a Node version manager because it allows you to easily install and switch between numerous versions of Node.js. This is useful when a project you’re working on requires a different version of Node.js than what you currently have installed.

4.18.1.1. Installation on the WSL File System

WSL

The Node version manager that I use on Linux is nvm, which can also be used on the WSL File System. nvm is a version manager for Node.js, designed to be installed per-user, and invoked per-shell. It works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and WSL. nvm is also recommended on npm's Official Documentation.

Make sure that you have the build-essentials package already installed and then, to install nvm, replace the {LABEL} in the upcoming command as appropriate and execute it from an Ubuntu terminal.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/{VERSION_NUMBER}/install.sh | bash

Label Definition

  • {VERSION_NUMBER} : The latest version number found on Installing and Updating section of the project’s home repository

Running the above command downloads a script and runs it. The script clones the nvm repository to ~/.nvm and adds a code snippet to the end of the ~/.bashrc file. To add proper context to this new code snippet, start editing the ~/.bashrc file, execute the following command to be able to edit with the Nano text editor.

nano ~/.bashrc

and add the below comments above the mentioned new code snippet.

# Sets the environment for nvm (Node Version Manager)

After completing the edition of the .bashrc file, save and close it. In order for the changes to take effect, run the following command:

source ~/.bashrc

To check that nvm is properly installed, run the following command:

nvm --version

To have a list of default global packages installed with every new version of Node.js, start editing the file ~/.config/nvm/default-packages with the below command.

nano ~/.config/nvm/default-packages

and add the desired packages names, one per line, to the file. After completing the edition of the file ~/.config/nvm/default-packages, save and close it.

To check if the edition of the file was successful, run the following command:

cat ~/.config/nvm/default-packages

To install the latest available LTS version of Node.js, run the following command:

nvm install --lts

To check if node is correctly installed, run the following command

node --version

When Node.js is installed, npm is automatically installed with it. However, according to npm's documentation npm is released more frequently thanNode.js, so to install the latest stable version of npm, run the following command:

nvm install-latest-npm
4.18.1.2. Installation on the Windows Native File System

WINDOWS

My go to Node version manager on on the Windows Native File System used to be NVS but, it has seen very little activity recently, with the last major release being in 2023. Therefore, I'm now starting to use fnm (Fast Node Manager).

4.18.1.2.1. fnm (Fast Node Manager)

fnm can be installed with scoop executing, on PowerShell console, the following command:

scoop install main/fnm

Before you can use fnm, you have to first set up your shell.

To be able to use fnm with Git Bash, edit the ~/.bashrc file and add the below snippet.

# fnm shell setup
eval "$(fnm env --use-on-cd --shell bash --version-file-strategy=recursive)"

Check out also the Official Configuration section to enable other highly recommended features.

To enable the changes made, you will need to source the ~/.bashrc file, executing the following command:

source ~/.bashrc

At this stage, you will probably be prompt to install the default Node.js version and you should refuse to install it. To check if fnm was properly installed, execute the following commands:

fnm -V
fnm -h

To install and use the latest Node.js LTS version, on Git Bash, execute the following command:

fnm install --lts
fnm use lts-latest
fnm list

To be able to use fnm with PowerShell, you will need add the bellow snippet to you profile file.

# fnm shell setup
fnm env --use-on-cd --shell powershell --version-file-strategy=recursive | Out-String | Invoke-Expression

To create a PowerShell profile, if it doesn't exists yet, execute the below command on a PowerShell console.

if (-not (Test-Path $profile)) { New-Item $profile -Force }

To edit you PowerShell profile, execute, on a PowerShell console, the following command:

Invoke-Item $profile

To check if fnm was properly installed, execute the following commands:

fnm -V
fnm -h

To install and use the latest Node.js LTS version, on PowerShell, execute the following command:

fnm install --lts
fnm use lts-latest
fnm list

For an extended usage documentation, check the official documentation

From now on, the latest Node.js LTS version will be available on Git Bash and PowerShell. To set up other shells, check the official documentation. To confirm that everything is properly set, check the output of the below commands executed from a from a PowerShell console and from a Git Bash terminal.

node --version
npm --version

If everything is correct, the above commands will output the node version and the npm version.

4.18.1.2.2. NVS (Node Version Switcher)

Although I'm now using fnm as my preferred Node Version Manager, I'm keeping here, for historical reference, my guide to install NVS.

The instructions to install NVS shown here are following the official instructions for the manual setup from a Command Prompt.

To set NVS_HOME as environment variable for the current user account, press WIN + R, type rundll32.exe sysdm.cpl,EditEnvironmentVariables and then press Enter.

On the User variables section, click the New button and fill the Variable name input box with NVS_HOME and the Variable value input box with %LOCALAPPDATA%\nvs.

Click the OK button to close the window used to create the new environment variable and then click the OK button on the environment variables window to close it.

To check if the Windows NVS_HOME value was properly set, open a Windows Command Prompt and check the output of the following command:

echo %NVS_HOME%

On the same Windows Command Prompt, clone the nvs repository with the following command:

git clone https://github.com/jasongin/nvs "%NVS_HOME%"

Then, on the same Windows Command Prompt, install the application executing the following command:

"%NVS_HOME%\nvs.cmd" install

To check if the folder %LOCALAPPDATA%\nvs was properly added to the current user account path variable, press WIN + R, type rundll32.exe sysdm.cpl,EditEnvironmentVariables and then press Enter.

On the User variables section, select the Path variable and click the Edit button. Then check if the folder %LOCALAPPDATA%\nvs is one of the Path variable entries. If it isn't, edit or create it.

Click the OK button to close the window used to edit the PATH variable and then click the OK button on the environment variables window to close it.

To check if NVS was properly installed, on the same Windows Command Prompt, check the output of the following command:

nvs --version

To be able to use NVS with Git Bash, open a Git Bash terminal and execute the below command to source the install command:

. "$NVS_HOME/nvs.sh" install

The install command adds a snippet to the ~/.bashrc file to source nvs.sh, so that the nvs function is available in future shells. The nvs.sh script adds an nvs shell function to the environment.

Edit the ~/.bashrc file and add the bellow comment above the code added by the install command.

# Adds an nvs shell function to the environment to enable the tool to be invoked as just nvs without any path

After adding the above snippet, the new code on the ~/.bashrc will be similar to the following snippet:

# Adds an nvs shell function to the environment to enable the tool to be invoked as just nvs without any path
function setupNvs {
    export NVS_HOME="$HOME\AppData\Local\nvs";
    [ -s "$NVS_HOME/nvs.sh" ] && source "$NVS_HOME/nvs.sh" >> /dev/null;
    return 0;
}
setupNvs

To add the latest version of node run the below command from a Windows Command Prompt.

nvs add lts

Then execute the bellow command to add a version of node to PATH for the current shell:

nvs use lts

The above command will only set the node version in use for the current shell/terminal and it will not be permanent. To add it to PATH permanently, execute the following command:

nvs link lts

To check if the folder %LOCALAPPDATA%\nvs\default was properly added to the current user account path variable, press WIN + R, type rundll32.exe sysdm.cpl,EditEnvironmentVariables and then press Enter.

On the User variables section, select the Path variable and click the Edit button. Then check if the folder %LOCALAPPDATA%\nvs\default is one of the Path variable entries. If it isn't, edit or create it.

Click the OK button to close the window used to edit the PATH variable and then click the OK button on the environment variables window to close it.

From now on, the latest node lts version will be available on all shells of the system. To confirm that everything is properly set, check the output of the below commands executed from a Windows Command Prompt, from a PowerShell console and from a Git Bash terminal.

node --version
npm --version

If everything is correct, the above commands will output the node version and the npm version.

4.19. Terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently.

4.19.1. Installation

4.19.1.1. Installation on the WSL File System

WSL

The easiest way to install and manage multiple versions of Terraform on the WSL File System is to use TFSwitch. This is a command line tool that lets you switch between different versions of Terraform.

Create a folder to store the user's binaries executing the following command:

mkdir -p ~/.local/bin

It's necessary that the folder ~/.local/bin is included on the PATH and, on Ubuntu, that is normally done by the ~/.profile script. Close the terminal and on a new Ubuntu terminal and then check the output of the following command to confirm that ~/.local/bin is included on the PATH.

echo $PATH

Following the official instructions, download TFSwitch installation script to the folder /tmp executing the upcoming commands on a Ubuntu terminal:

wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh -P /tmp

Make the TFSwitch installation script executable with the following command:

chmod 755 /tmp/install.sh

Install TFSwitch on the ~/.local/bin executing the following command:

/tmp/install.sh -b ~/.local/bin/

To verify if the TFSwitch installation was properly made, check the output of the following command:

tfswitch --version

To install a specific Terraform on the WSL File System, replace the {LABEL} in the below command as appropriate and then execute it on a Ubuntu terminal.

tfswitch -b ~/.local/bin/terraform {VERSION}

Label Definition

To verify if the Terraform installation was properly made, check the output of the following command:

terraform --version
4.19.1.2. Installation on the Windows Native File System

WINDOWS

To install Terraform on the Windows Native File System, open a PowerShell console and execute the following command:

scoop install main/terraform

Using Scoop, it's possible to install a specific version of an app. To do that for Terraform, replace the {LABEL} in the below command as appropriate and then execute it on a PowerShell console.

scoop install terraform@ {VERSION}

Label Definition

To verify if the Terraform installation was properly made, check the output of the following command:

terraform --version

4.20. IntelliJ IDEA

IntelliJ IDEA is an integrated development environment written in Java for developing computer software written in Java, Kotlin, Groovy, and other JVM-based languages. It is developed by JetBrains and is available as an Apache 2 Licensed community edition, and in a proprietary commercial edition.

4.20.1. Installation

WINDOWS

The JetBrains Toolbox App is the recommended process to install JetBrain products. Download the latest installation file from the official download page. Then, execute the downloaded file to install JetBrains Toolbox App.

Execute the JetBrains Toolbox App and then login in the JetBrains account. Then, on the Toolbox App Menuchoose the Settings option and uncheck the checkbox Launch Toolbox App at system startup.

To install IntelliJ IDEA, launch the JetBrains Toolbox App and then choose the desired IntelliJ IDEA version to install and follow the instructions prompted.

Some antivirus software can interfere with the IDE build process, causing builds to run dramatically slower. To prevent this, the folders where the IDE writes a lot of files should be excluded from the antivirus software real-time scanning. That can be done following the following steps:

  • Click the Start button and search for “Windows Security”;
  • Start the Windows Security application;
  • Click on “Virus and threat protection”;
  • Click on “Manage settings” under “Virus & threat protection settings”;
  • Scroll down if needed, and then click on “Add or remove exclusions” (there will be a prompt for elevated permissions that must be accepted);
  • Click the button + Add an exclusion, choose Folder from the dropdown list and then add all (one by one) the following folders:
    • C:\code
    • %APPDATA%\JetBrains\
    • %LOCALAPPDATA%\JetBrains\

It is also recommend to exclude the IDE process from the antivirus to improve the startup performance. To do that exclusion, on the on “Add or remove exclusions”, Click the button + Add an exclusion, choose Process from the dropdown list and then add all (one by one) the following processes:

  • idea64.exe
  • fsnotifier.exe

4.20.2. Install plugins

4.20.2.1. Install SonarQube plugin

SonarQube is an IDE extension that helps to detect and fix quality issues as the code is written. To install it, choose Plugins from the IntelliJ IDEA welcome screen and then, on the Marketplace tab search for "SonarQube". Within the listed plugins, click "Install" on the right one and follow the "Wizard" instructions to install it.

4.20.2.2. Install JPA Buddy

JPA Buddy is an IDE extension that helps developers work efficiently with Hibernate, EclipseLink, Spring Data JPA, Flyway, Liquibase, Lombok, MapStruct, and other related technologies in both Java and Kotlin. To install it, choose Plugins from the IntelliJ IDEA welcome screen and then, on the Marketplace tab search for "JPA Buddy". Within the listed plugins, click "Install" on the right one and follow the "Wizard" instructions to install it.

4.20.3. Set code formatters

4.20.3.1. Java

Google Java Style Guide seems to be the most popular Code Style Guide for Java. This style guide is licensed under the CC-By 3.0 License and a there's a repository where a formatter configuration file for IntelliJ IDEA is available.

To add the above mentioned Code Style Formatter settings, on the IntelliJ IDEA welcome screen, choose All Settings from the Customize tab. Then choose the tab Editor->Code Style->Java. On this tab, click the settings icon choose Import Scheme/IntelliJ IDEA code style XML and pick the file(s) with the desired settings.

4.20.4. Configure Version Control

4.20.4.1. Commit

Modern IntelliJ IDEA versions uses a non-modal Commit tool window (accessible via Alt + 0 or the checkmark icon on the left sidebar). The Shelf tab is contextual; it only appears in the Commit tool window when you have at least one shelved change. To manage your shelf:

  1. Open the Commit tool window.
  2. If you have shelved items, the Shelf tab will appear next to the Changes tab header.
  3. If you do not see the tab, it means your shelf is currently empty.

To move changes to the shelf instead of committing them, take the following steps:

  1. In the Commit tool window, right-click the files or the "Changes" changelist.
  2. Select Shelf Changes... from the context menu.
  3. Provide a name for the shelf and click Shelf Changes. The Shelf tab will now become visible.

4.20.5. Configure Build Tools

4.20.5.1. Maven

To customize Maven, on the IntelliJ IDEA welcome screen, choose All Settings from the Customize tab. Then choose the tab Build, Execution, Deployment->Build Tools->Maven. On this tab, change the input boxes listed below as described:

Beware that you must choose the Apache Maven according to the file system you're working on (WSL File System or the Windows Native File System). This is a per project setting, therefore it might be necessary to set it for every project when opened with IntelliJ IDEA for the first time.

4.20.6. Configure Tools

4.20.6.1. Terminal

To customize the Terminal in use with IntelliJ IDEA, on the application welcome screen, choose All Settings from the Customize tab. Then choose the tab Tools->Terminal. On this tab, take in consideration the file system you're working on and change the input boxes listed below as described:

  • WSL File System
    • Shell path : wsl.exe
    • Default Tab name : Terminal;
  • Windows Native File System
    • Shell path : C:\Users\{USER}\AppData\Local\Programs\Git\bin\bash.exe --login -i
    • Default Tab name : Terminal;

Label Definition

  • {USER} : Windows username

This settings will only take effect when starting a new terminal. Therefore, create/add/open a new terminal window and terminate the old one.

This is a per project setting, therefore it might be necessary to set it for every project when opened with IntelliJ IDEA for the first time.

4.20.7. Run/Debug Configurations

When networkingMode=mirrored is not enabled the Windows firewall configuration needs to be adapted to ensure the building of a project on the WSL File System works properly. Open a PowerShell console with Administrator privileges and execute the following command to get the exact network interface name:

Get-NetAdapter

Replace the {LABEL} in the upcoming command as appropriate and execute it from an a PowerShell console with Administrator privileges to allow connections using WSL.

New-NetFirewallRule -DisplayName "WSL" -Direction Inbound  -InterfaceAlias "{ADAPTER_NAME}"  -Action Allow

Label Definition

  • {ADAPTER_NAME} : The Hyper-V Virtual Ethernet Adapter for WSL name obtained with the Powershell command Get-NetAdapter

Then, to renew the firewall rules, execute the following command:

Get-NetFirewallProfile -Name Public | Get-NetFirewallRule | where DisplayName -ILike "IntelliJ IDEA*" | Disable-NetFirewallRule

After starting a debugger session, the Windows Firewall popup might appears and them, select the Public networks checkbox and click the Allow access button.

4.20.7.1 Shorten command line method

To avoid the error "Command line is too long" when running tests it's necessary to set the "Shorten command line" method in the Run/Debug configuration to "JAR manifest". That can be done for the specific method or class, but it's better to set it as default on run/debug configuration templates.

From the IntelliJ IDEA main menu, select Run->Edit Configurations.... On the screen that pop-up, click Edit configuration templates... (bottom left corner of the pop-up screen). On the following pop-up screen, select the JUnit tab.

Then, click on the Modify options link (ALT+M) and set/select the Shorten command line option. Back on the JUnit tab, there will be a new dropdown input box named Shorten command line. In this new dropdown, choose the Jar manifest option. Click the button OK (once to close the Select configuration templates pop up and again to close the Run->Edit Configurations pop up screen) and from now on all the new JUnit Run/Debug configurations will use this template.

4.21. Visual Studio Code

Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.

4.21.1. Installation

WINDOWS

Download the Visual Studio Code User Installer file from the official download page. Then, execute the downloaded file to install Visual Studio Code.

Execute Visual Studio Code and to enable the Settings Sync option, click on te gear menu (on the bottom left of the application screen) and select the Setting Sync... option. When asked to sign in, choose the GitHub option and then insert the needed credentials. When asked what preferences to sync, select the checkboxes listed next:

  • Settings;
  • Keyboard Shortcuts for each platform;
  • User Snippets;
  • Extensions
  • UI State

4.21.2. Install extensions

With the Settings Sync option on, Visual Studio Code will installed all the synced extensions. Wait for while to allow the full synchronization and then check if all of the following extensions were properly installed:

4.22. Zed

Zed is a minimal code editor crafted for speed and collaboration with humans and AI.

4.22.1. Installation

WINDOWS

To install Zed, open a PowerShell console and execute the following commands:

scoop bucket add extras
scoop install extras/zed

4.23. DBeaver

DBeaver is free and open source universal database tool for developers and database administrators.

4.23.1. Installation

WINDOWS

Download DBeaver installer latest version from official downloads page. Then, execute the downloaded file and when prompted, choose to install DBeaver only for the current user. When asked to select the components to install, check the following checkboxes:

  • DBeaver Community;
  • Include Java
  • Associate .SQL files

DBeaver will store the drivers it uses in the folder %USERPROFILE%\AppData\Roaming\DBeaverData\drivers.

When using applications like Zscaler, it might be necessary to import security certificate to the DBeaver JRE Keystore. On a Git Bash terminal, navigate to the folder %USERPROFILE%\AppData\Local\DBeaver\jre\lib\security, replace the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -importcert -trustcacerts -alias {CERTIFICATE_ALIAS} -file {PATH_TO_DER_CERTIFICATE} -keystore cacerts -storepass changeit -noprompt

Label Definition

  • {PATH_TO_DER_CERTIFICATE} : Path to the .der certificate file
  • {CERTIFICATE_ALIAS} : The chosen certificate alias

To confirm that the certificate was added to the JRE keystore, replace the {LABELS} in the upcoming command as appropriate and then execute it:

keytool -v -list -keystore cacerts -alias {CERTIFICATE_ALIAS} -storepass changeit -noprompt

Label Definition

  • {CERTIFICATE_ALIAS} : The chosen certificate alias

4.24. Postman

Postman helps you be more efficient while working with APIs. Using Postman, you can construct complex HTTP requests quickly, organize them in collections.

4.24.1. Installation

WINDOWS

Download Postman installer latest version from official downloads page. Then, execute the downloaded file and when prompted, sign in into the Postman account.

4.25. Bruno

Bruno is an open source IDE for exploring and testing APIs. It is a lightweight, Git-native, local-first alternative to Postman.

4.25.1. Installation

WINDOWS

To install Bruno, open a PowerShell console and execute the following commands:

scoop bucket add extras
scoop install extras/bruno