Be more careful when processing the config file:
Rancher Desktop
Rancher Desktop is an open-source project to bring Kubernetes and container management to the desktop. Windows and macOS versions of Rancher Desktop are available for download.
Features
Rancher Desktop provides the following features in the form of a desktop application:
- The version of Kubernetes you choose
- Ability to test upgrading Kubernetes to a new version and see how your workloads respond
- Build, push, and pull images (powered by KIM)
- Expose an application in Kubernetes for local access
All of this is wrapped in an open-source application.
Get The App
You can download the application for macOS and Windows on the releases page.
Running on Windows requires Windows Subsystem for Linux (WSL). Please install WSL prior to installing Rancher Desktop. In a future release Rancher Desktop will automate the step for you.
Note, development builds are available from the CI system. Development builds are not signed.
Base Design Details
Rancher Desktop is an electron application with the primary business logic being written in TypeScript and JavaScript. It leverages several other pieces of technology to provide the platform elements which include k3s, kim, kubectl, wsl, hyperkit, and more. The application wraps numerous pieces of technology to provide one cohesive application.
Building The Source
Rancher can be built from source on macOS or Windows. The following provides some detail on building.
Prerequisites
Rancher Desktop is an electron and node.js application. node.js v14 needs to be installed to build the source.
The following is a breakdown of the pre-requisites for each platform. These need to be installed first.
macOS:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
Ubuntu:
sudo apt-get install -y libcairo2-dev libpango1.0-dev libpng-dev libjpeg-dev libgif-dev librsvg2-dev
Windows
- Download a Microsoft Windows 10 development virtual machine.
- Open a privileged PowerShell prompt (hit Windows Key +
Xand openWindows PowerShell (Admin)). - Run the automated setup script:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser iwr -useb 'https://github.com/rancher-sandbox/rd/raw/main/scripts/windows-setup.ps1' | iex - Close the privileged PowerShell prompt.
You are now ready to clone the repository and run npm install.
Manual Development Environment Setup
- Download and install Visual Studio, taking care to install:
- MSVC v141 - VS 2017 C++ x64/x86 build tools (v14.16)
- MSVC v142 - VS 2019 C++ x64/x86 build tools (Latest)
- Download the GTK+ Win64 bundle; it is recommended to install it in the
default location at
C:\GTK. - Download the libjpeg-turbo development files; it is recommended to install
it in the default location at
C:\libjpeg-turbo64. - Install git, Python 2.x, and NodeJS.
- Install Scoop via
iwr -useb get.scoop.sh | iex - Install git and nvm via
scoop install git nvm - Add the old versions bucket via
scoop bucket add versions - Install nvm and Python 2 via
scoop install python27 - Install NodeJS via
nvm install 14.17.0- Remember to use it by running
nvm use 14.17.0
- Remember to use it by running
- Install Scoop via
- Configure NPM to use the version of MSBuild installed:
Note that this is the default path; the path on your system may differ.
npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
If you have customized the GTK and libjpeg paths, you will need to run
npm install with the GYP_DEFINES variable set to point to them. In
PowerShell, this would look something like:
$Env:GYP_DEFINES = 'GTK_Root="C:/Path/To/GTK" jpeg_root="C:/Path/To/libjpeg"'
How To Run
Use the following commands. The former is needed the first time or after an update is pulled from upstream. The latter is needed for follow-up starts.
npm install
npm run dev