Setting up Meshery Development Environment on Windows

Meshery can be run on the Windows platform in three different modes.

  1. Windows native mode
  2. Under WSL or WSL2
  3. 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:

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

1. The default version of WSL is set to WSL1 by default. You can move forward to install the distro of your choice.

2. Docker Toolbox
Warning: Docker Toolbox is a deprecated version. It is recommended to update your system and install the Docker Desktop application with WSL2.

Docker Toolbox uses Linux-specific kernel features, and can’t run natively on Windows. Instead, it creates and uses a small Linux VM on your machine along with docker-machine, and uses VirtualBox to run Docker.

  • Go to Toolbox Releases and download the latest release .exe file
  • Follow these instructions to successfully set up the Docker Toolbox application.

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