Setting up Meshery Development Environment on Windows
Meshery can be run on the Windows platform in three different modes.
- Windows native mode
- Under WSL or WSL2
- Using Hyper-V to install a Linux VM to run Meshery.
Running Meshery on WSL(2) or Hyper-V is not much different from running Meshery on a native Linux platform. The same instructions can be followed as already documented.
Essentially, all three platforms require the same prerequisites but the Linux platforms (as there are more than one of them) come with some of the prerequisites that Windows does not.
In general, all three require that Docker and Kubernetes are present. If Docker Desktop is installed, then Docker actually uses Hyper-V to install a VM. For the requisite images, both Linux and Windows containers are required depending on what one wants to do but the Linux images are certainly required. This is where the exception that was mentioned earlier comes into play, that is if a Kubernetes elsewhere is used. This installation is specified in the config file in the .kube directory in the home directory.
Prerequisite Dependencies
All three platforms require the following prerequisites:
- make
- gcc
- nodejs (for npm)
- go
Using WSL2
Here is a link to setting up WSL2: https://learn.microsoft.com/en-us/windows/wsl/install
On Windows Native Mode
Installing Meshery on native Windows may be a little more involved than installing Meshery on a Linux platform. That is because Linux installations usually come with a lot of the prerequisites preinstalled. Moreover, one is given a hint on the Linux platform on what to do next including the command, especially on Ubuntu.
On Windows, make, gcc and some of the other prerequisites do not come pre-installed, These will need to be installed manually. Also, after installing any of the items, it may be necessary to set its path. This can be done in the control panel by searching for setting the system environment variables.
Please research the internet to install these components. However, here are a few suggestions:
- make: https://gnuwin32.sourceforge.net/packages/make.htm
- gcc: https://gcc.gnu.org/install/binaries.html
- nodejs (for npm): https://phoenixnap.com/kb/install-node-js-npm-on-windows
- go: https://go.dev/doc/install
Compatibility
The following minimum Windows build versions are required:
Name | Version |
---|---|
WSL1 | x64 - Windows 7 |
WSL2 | x64 - Version 1903, Build 18362; ARM 64 - Version 2004, Build 19041 |
Custom Kernel | Build 18945 |
Kernel with K8s required modules | Build 19013 |
Note
Run the following command on Powershell to check your Windows build and version:
[System.Environment]::OSVersion.Version
Steps
Perform the following steps in order:
1. Install Windows Subsystem for Linux (WSL)
Open Powershell in administrator mode and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart Restart-Computer
Choosing your WSL version:
WSL2 (Recommended)
Set the default version to WSL2, which will be inherited by any distro you wish to use.
Enable VM (Virtual Machine) feature: Open PowerShell in administrator mode and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Set WSL2 as the default version:
wsl --set-default-version 2
WSL1
Warning: It is recommended to update to WSL2 as WSL1 doesnβt support the Docker Desktop application for Windows. Instead, it only supports the deprecated version, Docker Toolbox.
If you still wish to continue, follow the instructions for
2. Install a new distro
In this tutorial, Ubuntu 18.04 will be the distro used. Feel free to use any distro of your choice.
Note: If you choose to run Meshery without installing a distro, skip step 2.
3. Enable Docker
The Docker Desktop application for Windows includes a comprehensive set of tools, including Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and a Credential Helper.
Windows 10 Version | Docker Desktop |
---|---|
Pro/Education/Enterprise | Docker Desktop for Windows Pro |
Home | Docker Desktop for Windows Home |
Using Hyper-V to install a linux VM
Here is a link to install linux VM using Hyper-V: https://wiki.ubuntu.com/Hyper-V
Git Bash
Git Bash is a terminal emulator which provides git command line experience. This will make working with git easier. You can download it from here: https://git-scm.com/downloads
Get the code
- Fork and then clone the Meshery repository
$ git clone https://github.com/YOUR-USERNAME/meshery
Suggested Reading
- Build & Release (CI) - Details of Meshery's build and release strategy.
- Contributing to Meshery Adapters - How to contribute to Meshery Adapters
- Contributing to Meshery CLI - How to contribute to Meshery Command Line Interface.
- Contributing to Meshery's End-to-End Tests using Cypress - How to contribute to End-to-End Tests using Cypress.
- Contributing to Meshery Docker Extension - How to contribute to Meshery Docker Extension
- Contributing to Meshery Docs - How to contribute to Meshery Docs.
- How to write MeshKit compatible errors - How to declare errors in Meshery components.
- Contributing to Meshery using git - How to contribute to Meshery using git
- Meshery CLI Contributing Guidelines - Design principles and code conventions.
- Contributing to Model Components - How to contribute to Meshery Model Components
- Contributing to Model Relationships - How to contribute to Meshery Models Relationships, Policies...
- Contributing to Models Quick Start - A no-fluff guide to creating your own Meshery Models quickly.
- Contributing to Models - How to contribute to Meshery Models, Components, Relationships, Policies...
- Contributing to Meshery Policies - How to contribute to Meshery Policies
- Contributing to Meshery Server Events - Guide is to help backend contributors send server events using Golang.
- Contributing to Meshery UI - Notification Center - How to contribute to the Notification Center in Meshery's web-based UI.
- Contributing to Meshery UI - Sistent - How to contribute to the Meshery's web-based UI using sistent design system.
- Contributing to Meshery's End-to-End Tests - How to contribute to End-to-End Tests using Playwright.
- Contributing to Meshery UI - How to contribute to Meshery UI (web-based user interface).
- Contributing to Meshery Server - How to contribute to Meshery Server
- End-to-End Test Status - Status reports of Meshery's various test results.