Skip to content

Windows

Declan Coughlan edited this page Jan 2, 2024 · 4 revisions

Windows Workstation Setup

Requirements

  • Windows 10
    • Version 2004 for Linux based development
  • i7 or higher processor and 16GB of RAM.

Software Install

The following software will be installed:

  • Chocolatey
  • Docker
  • VS Code
  • PG Admin
  • Optional Software
  • Development Setup
    • Linux based
    • Native Windows
  • Next Steps

Chocolately

Open a Windows PowerShell as an Administrator and execute the following:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco --version
exit

Install Docker

Open a Windows PowerShell as an Administrator and execute the following:

choco install wsl -y
restart-computer

After the computer restarts, open a Windows PowerShell as an Administrator and execute the following:

choco install wsl2 -y
choco install docker-desktop -y
restart-computer

After the computer reboots, wait for Docker to start and walk through or skip the tutoria: "Get Started With Docker" which will open automatically.

If you have previously installed wsl with a pre-existing Linux distro you can now swap its WSL version with the commands found here, this may will be required for the correct installation and running of tools such as homebrew and the OpenShift-cli tool. If you are having any issue with commands returning a "Bad Address" error this may solve your issue.

Install VS Code

Open a Windows PowerShell as an Administrator and execute the following:

choco install vscode -y

Install PGAdmin

Open a Windows PowerShell as an Administrator and execute the following:

choco install pgadmin4 -y

NOTE: you may experience a failure while installing with an error referring to a missing file on pgAdmin's ftp server. This failure is between chocolatey and pgAdmin where older versions of pgAdmin are deleted from the ftp servers however chocolatey package references are not up to date or not yet approved, which attempts to install an older approved version.

A workaround is to navigate to the ftp server noted in the error message (remove the specific file reference) and search for an existing version that can then be installed using choco install pgadmin 4 --version={yourChosen.Version} --pre This should get you up and running.

Optional Software

  • Microsoft Cascadia Code fonts
  • Go and Powerline Go

MS Cascadia Code fonts

Open a Windows PowerShell as an Administrator and execute the following:

choco install cascadiafonts -y

Configure VS Code to use the Cascadia Code font and ligatures if installed by:

  • Going to: File/Preferences/Settings
  • Clicking on: Text Editor/Font
  • Edit Font Family and Prepend: 'Cascadia Code' to the existing list of fonts
  • Enable Ligatures by editing settings.json and setting "editor.fontLagatures": true

You should have a settings.json similar to

{
    "editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
    "editor.fontLigatures": true
}

Save your settings.json file.

Development Setup

On Windows, a developer has a choice between using native windows or the Windows Subsystem for Linux 2 (WSL2) which provides a full Linux environment.

Linux based

Configure WSL2

Open a Windows PowerShell as an Administrator and execute the following:

choco install microsoft-windows-terminal -y

At time of writing, Ubuntu 20.04 is not available for chocolatey install and so you have to:

  • Open the Microsoft Store and search for Ubuntu 20.04 LTS
  • Click Get
  • Close the Microsoft Store.
Windows Terminal Cascadia Font configuration

If the optional MS Cascadia fonts were installed, you can configure Windows Terminal to use them by opening a Windows Terminal window and

  • Click on the drop down next to the + in the title/tab bar
  • Click on Settings
  • Find the Ubuntu 20.04 reference and add the following:
    "fontFace": "Cascadia Code PL",
    "fontSize": 11,
    "closeOnExit": true,
    "cursorShape": "vintage",
    "cursorHeight": 25

Save the file (settings.json).

After opening an Ubuntu 20.04 window, please follow the instructions on the Linux configuration page.

Native Windows

Git

Open a Windows PowerShell as an Administrator and execute:

choco install git -y
.Net Core

Open a Windows PowerShell as an Administrator and execute:

choco install dotnetcore-sdk -y
dotnet tool install --global dotnet-ef
NodeJS

Open a Windows PowerShell as an Administrator and execute:

choco install nodejs-lts -y
Visual Studio 2019 (optional)

Open a Windows PowerShell as an Administrator and execute the installer for VS 2019 Community or Enterprise (if you're licensed):

VS 2022 Community

choco install visualstudio2022community --package-parameters "--add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Component.GitHub.VisualStudio --includeRecommended" -y

or

VS 2022 Enterprise

choco install visualstudio2022enterprise --package-parameters "--add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Component.GitHub.VisualStudio --includeRecommended" -y

Next Steps

Please proceed to the General Setup section to complete your Health Gateway development environment.

Clone this wiki locally