Docs: update to current state

- We no longer need to manually install WSL; the installer does that.
- We no longer need the canvas native dependencies.
  - This includes Visual Studio & Python 2 on Windows.
  - This includes pkg-config, cairo, etc. on macOS.
- Tools are added to the PATH on Windows now.

Signed-off-by: Mark Yen <mark.yen@suse.com>
This commit is contained in:
Mark Yen
2021-06-09 11:27:20 -07:00
parent 3da5cbf832
commit 4c6a1cd105
4 changed files with 48 additions and 63 deletions

View File

@@ -5,11 +5,13 @@ This document outlines the process to get your pull request accepted.
## Start With An Issue
Prior to creating a pull request it is a good idea to create an issue.
Prior to creating a pull request it is a good idea to [create an issue].
This is especially true if the change request is something large.
The bug, feature request, or other type of issue can be discussed prior to
creating the pull request. This can reduce rework.
[create an issue]: https://github.com/rancher-sandbox/rancher-desktop/issues/new
## Sign Your Commits
A sign-off is a line at the end of the explanation for a commit.
@@ -61,7 +63,7 @@ Then you add a line to every git commit message:
Signed-off-by: Joe Smith <joe.smith@example.com>
Use your real name (sorry, no pseudonyms or anonymous contributions.)
Use your real name (sorry, no pseudonyms or anonymous contributions).
If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

View File

@@ -9,48 +9,53 @@ Rancher Desktop provides the following features in the form of a desktop applica
- 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](https://github.com/rancher/kim))
- 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.
[KIM]: https://github.com/rancher/kim
## Get The App
You can download the application for macOS and Windows on the [releases page](https://github.com/rancher-sandbox/rd/releases).
You can download the application for macOS and Windows on the [releases page].
Running on Windows requires [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
Please install WSL prior to installing Rancher Desktop. In a future release
Rancher Desktop will automate the step for you.
[releases page]: https://github.com/rancher-sandbox/rd/releases
Note, [development builds](https://github.com/rancher-sandbox/rd/actions/workflows/package.yaml) are available from the CI system. Development builds are not signed.
Running on Windows requires [Windows Subsystem for Linux (WSL)]. This will be
installed automatically during Rancher Desktop installation.
[Windows Subsystem for Linux (WSL)]:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Note, [development builds] are available from the CI system. Development builds
are not signed.
[development builds]:
https://github.com/rancher-sandbox/rd/actions/workflows/package.yaml
## 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.
Rancher Desktop is an Electron application with the primary business logic
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.
Rancher can be built from source on macOS or Windows. Cross-compilation is
currently not supported. The following provides some detail on building.
### Prerequisites
Rancher Desktop is an [electron](https://www.electronjs.org/) and [node.js](https://nodejs.org/) application. node.js v14 needs to be installed to build the source.
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.
[Electron]: https://www.electronjs.org/
[Node.js]: https://nodejs.org/
**macOS:**
```bash
brew install pkg-config cairo pango libpng jpeg giflib librsvg
```
**Ubuntu:**
```bash
sudo apt-get install -y libcairo2-dev libpango1.0-dev libpng-dev libjpeg-dev libgif-dev librsvg2-dev
```
### Windows
#### Windows
1. Download a Microsoft Windows 10 [development virtual machine].
2. Open a privileged PowerShell prompt (hit Windows Key + `X` and open
@@ -59,7 +64,7 @@ sudo apt-get install -y libcairo2-dev libpango1.0-dev libpng-dev libjpeg-dev lib
```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb 'https://github.com/rancher-sandbox/rd/raw/main/scripts/windows-setup.ps1' | iex
iwr -useb 'https://github.com/rancher-sandbox/rancher-desktop/raw/main/scripts/windows-setup.ps1' | iex
```
4. Close the privileged PowerShell prompt.
@@ -68,39 +73,13 @@ You are now ready to clone the repository and run `npm install`.
[development virtual machine]: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
[automated setup script]: ./scripts/windows-setup.ps1
#### Manual Development Environment Setup
##### Manual Development Environment Setup
1. 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)
2. Download the [GTK+ Win64 bundle]; it is recommended to install it in the
default location at `C:\GTK`.
3. Download the [libjpeg-turbo development files]; it is recommended to install
it in the default location at `C:\libjpeg-turbo64`.
4. Install git, Python 2.x, and NodeJS.
1. Install [Scoop] via `iwr -useb get.scoop.sh | iex`
2. Install git and nvm via `scoop install git nvm`
3. Add the old versions bucket via `scoop bucket add versions`
4. Install nvm and Python 2 via `scoop install python27`
5. Install NodeJS via `nvm install 14.17.0`
* Remember to use it by running `nvm use 14.17.0`
5. Configure NPM to use the version of MSBuild installed:
```powershell
npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
```
Note that this is the default path; the path on your system may differ.
1. Install [Scoop] via `iwr -useb get.scoop.sh | iex`
2. Install git and nvm via `scoop install git nvm`
3. Install NodeJS via `nvm install 14.17.0`
* Remember to use it by running `nvm use 14.17.0`
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:
```powershell
$Env:GYP_DEFINES = 'GTK_Root="C:/Path/To/GTK" jpeg_root="C:/Path/To/libjpeg"'
```
[Visual Studio]: https://visualstudio.microsoft.com/
[GTK+ Win64 bundle]: https://download.gnome.org/binaries/win64/gtk+/2.22/
[libjpeg-turbo development files]: https://sourceforge.net/projects/libjpeg-turbo/files/2.0.6/libjpeg-turbo-2.0.6-vc64.exe/download
[Scoop]: https://scoop.sh/
### How To Run
@@ -112,3 +91,6 @@ update is pulled from upstream. The latter is needed for follow-up starts.
npm install
npm run dev
```
To build the distributable (application bundle on macOS, installer on Windows),
run `npm run build`.

View File

@@ -3,9 +3,8 @@
Rancher Desktop provides the ability to build, push, and pull images via the
[KIM](https://github.com/rancher/kim) project.
Note, on Mac `kim` is put into the path. This feature is not yet working on
Windows and you will need to either manually add the binary to your path or
install KIM directly. Adding KIM to your path is coming soon.
Note, `kim` is put into the path automatically. This occurs during the
installer on Windows, and upon first run on macOS.
## Using KIM

View File

@@ -7,9 +7,11 @@ When run for the first time or when changing versions, Kubernetes container
images are downloaded. It may take a little time to load on first run for a new
Kubernetes version.
Running on Windows requires [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
Please install WSL prior to installing Rancher Desktop. In a future release
Rancher Desktop will automate the step for you.
Running on Windows requires [Windows Subsystem for Linux(WSL)]. This will be
installed automatically during the Rancher Desktop setup process.
[Windows Subsystem for Linux(WSL)]:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Note, the Windows installer is not yet signed. This will happen soon. In the
meantime, when presented with a dialog box like the following, click on "More