diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..b9b41ddd58 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,49 @@ +name: Publish docs via GitHub Pages +on: + push: + branches: + - master + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install git+https://${{ secrets.GH_TOKEN }}@github.com/lensapp/mkdocs-material-insiders.git + pip install mkdocs-git-revision-date-localized-plugin mike + + + - name: Checkout Release from lens + uses: actions/checkout@v2 + with: + repository: lensapp/lens + + - name: git config + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git pull + + + - name: mkdocs deploy latest + run: | + mike deploy --push latest + + + - name: mkdocs deploy new release / tag + if: contains(github.ref, 'refs/tags/v') + run: | + mike deploy --push--update-aliases ${{ github.ref }} latest + mike set-default --push ${{ github.ref }} + + + + diff --git a/README.md b/README.md index b403492e72..21522cf4cb 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,16 @@ Allows for faster separate re-runs of some of the more involved processes: 1. `yarn dev:extension-types` compile declaration types for `@k8slens/extensions` 1. `yarn dev-run` runs app in dev-mode and auto-restart when main process file has changed +## Development (documentation) + +Run a local instance of `mkdocs serve` in a docker container for developing the Lens Documentation. + +> Prerequisites: docker, yarn + +* `yarn mkdocs-serve-local` - local build and serve of mkdocs with auto update enabled + +Go to [localhost:8000](http://127.0.0.1:8000) + ## Developer's ~~RTFM~~ recommended list: - [TypeScript](https://www.typescriptlang.org/docs/home.html) (front-end/back-end) @@ -53,6 +63,8 @@ Allows for faster separate re-runs of some of the more involved processes: - [ElectronJS](https://www.electronjs.org/docs) (chrome/node) - [NodeJS](https://nodejs.org/dist/latest-v12.x/docs/api/) (api docs) + + ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/lensapp/lens. \ No newline at end of file diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000000..12bc650410 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.k8slens.dev diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..f8a979fb90 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,21 @@ +# Overview + +Lens is the most powerful Kubernetes IDE on the market. It is a standalone application, and it is available on macOS, Windows, and Linux. Some of the benefits of using Lens include: + +* Confidence that your clusters are properly setup and configured. +* Increased visibility, real time statistics, log streams, and hands-on troubleshooting capabilities. +* The ability to work with your clusters quickly and easily, radically improving productivity and the speed of business. + +Watch this introductory video to see Lens in action: + +[![Screenshot](img/lens-intro-video-screenshot.png)](https://youtu.be/04v2ODsmtIs) + +**Note:** Use CTRL+click (on Windows and Linux) or CMD+click (on MacOS) to open the above in a new tab + +## Downloading Lens + +[Download Lens](https://github.com/lensapp/lens/releases) for macOS, Windows, or Linux. + +## Quick Start + +Get up and running quickly by learning to [add clusters](clusters/adding-clusters.md). diff --git a/docs/clusters/adding-clusters.md b/docs/clusters/adding-clusters.md new file mode 100644 index 0000000000..a89afb2f25 --- /dev/null +++ b/docs/clusters/adding-clusters.md @@ -0,0 +1,16 @@ +# Adding clusters + +Add clusters by clicking the **Add Cluster** button in the left-side menu. + +1. Click the **Add Cluster** button (indicated with a '+' icon). +2. Enter the path to your kubeconfig file. You'll need to have a kubeconfig file for the cluster you want to add. You can either browse for the path from the file system or or enter it directly. + +Selected [cluster contexts](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context) are added as a separate item in the left-side cluster menu to allow you to operate easily on multiple clusters and/or contexts. + +**NOTE**: Any cluster that you added manually will not be merged into your kubeconfig file. + +![Add Cluster](images/add-cluster.png) + +For more information on kubeconfig see [Kubernetes docs](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/). + +To see your currently-enabled config with `kubectl`, enter `kubectl config view --minify --raw` in your terminal. \ No newline at end of file diff --git a/docs/clusters/images/add-cluster.png b/docs/clusters/images/add-cluster.png new file mode 100644 index 0000000000..b53c09f704 Binary files /dev/null and b/docs/clusters/images/add-cluster.png differ diff --git a/docs/clusters/images/cluster-settings.png b/docs/clusters/images/cluster-settings.png new file mode 100644 index 0000000000..27a4a72ff9 Binary files /dev/null and b/docs/clusters/images/cluster-settings.png differ diff --git a/docs/clusters/images/remove-cluster.png b/docs/clusters/images/remove-cluster.png new file mode 100644 index 0000000000..bcaa69c44a Binary files /dev/null and b/docs/clusters/images/remove-cluster.png differ diff --git a/docs/clusters/removing-clusters.md b/docs/clusters/removing-clusters.md new file mode 100644 index 0000000000..89b7286f99 --- /dev/null +++ b/docs/clusters/removing-clusters.md @@ -0,0 +1,12 @@ +# Removing clusters + +You can remove Lens clusters using the context menu that appears when you hover over the cluster in the left-side menu that you want to remove. By right-clicking the cluster of choice you can hit the `Remove` button to delete it from your list. + +To remove a cluster from your cluster list: + +1. Hover over the name of the cluster you want to remove in the left side menu. A context menu will appear. +2. Click **Remove**. + +**NOTE**: This will only remove the cluster from your Lens cluster list. It will not affect your actual Kubernetes cluster or its configuration. + +![Remove Cluster](images/remove-cluster.png) \ No newline at end of file diff --git a/docs/clusters/settings.md b/docs/clusters/settings.md new file mode 100644 index 0000000000..13371ad1e4 --- /dev/null +++ b/docs/clusters/settings.md @@ -0,0 +1,63 @@ +# Cluster Settings + +It is easy to configure Lens Clusters to your liking through its various settings. By right-clicking the cluster of choice you can open `Settings`. + +## Status + +An overview of the cluster status. + +### Cluster Status + +This section provides cluster details including the detected distribution, kernel version, API endpoint and online status. + +## General + +General information for the cluster with some settings that can be customized. + +### Cluster Name + +The cluster name is inheritated from the kubeconfig by default. You can change the cluster name to another value by updating here. Note this does not update your kubeconfig file. + +### Workspace + +This is the Lens Workspace that the cluster is associated with. You can change to another workspace or create a new workspace - this option will take you the Workspaces editor where you can create a new workspace and then +navigate back to the cluster settings. + +### Cluster Icon + +A random cluster icon is associated with your cluster when it is first created. You can define your own cluster icon here. + +### HTTP Proxy + +If you need to use a HTTP proxy to communicate with the Kubernetes API you can define it here. + +### Prometheus + +Lens can be configured to query a Prometheus server that is installed in the cluster. The query format used can be configured here to either auto-detect or a pre-configured query format. The available formats are: + +* Lens +* Helm Operator +* Prometheus Operator +* Stacklight + +For more details of custom Prometheus configurations refer to this [guide](https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md). + +### Working Directory + +The terminat working directory can be configured here - by default it is set to `$HOME`. + +## Features + +Additional Lens features that can be installed by the user. + +### Metrics + +Enable timeseries data visualization (Prometheus stack) for your cluster. Install this only if you don't have existing Prometheus stack installed. + +### User Mode + +User Mode feature enables non-admin users to see namespaces they have access to. This is achieved by configuring RBAC rules so that every authenticated user is granted to list namespaces. + +## Removal + +Remove the current cluster. diff --git a/docs/custom_theme/img/favicon.ico b/docs/custom_theme/img/favicon.ico new file mode 100644 index 0000000000..19b2de71d1 Binary files /dev/null and b/docs/custom_theme/img/favicon.ico differ diff --git a/docs/custom_theme/main.html b/docs/custom_theme/main.html new file mode 100644 index 0000000000..b6ad2467dd --- /dev/null +++ b/docs/custom_theme/main.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block analytics %} + + + +{% endblock %} \ No newline at end of file diff --git a/docs/extensions/capabilities/common-capabilities.md b/docs/extensions/capabilities/common-capabilities.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/capabilities/overview.md b/docs/extensions/capabilities/overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/capabilities/theming.md b/docs/extensions/capabilities/theming.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/get-started/anatomy.md b/docs/extensions/get-started/anatomy.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/get-started/wrapping-up.md b/docs/extensions/get-started/wrapping-up.md new file mode 100644 index 0000000000..95f36dbe88 --- /dev/null +++ b/docs/extensions/get-started/wrapping-up.md @@ -0,0 +1,18 @@ +# Wrapping Up + +In the [Your First Extension](your-first-extension.md) topic, you learned how to create and run an extension. In the [Extension Anatomy](anatomy.md) topic, you learned fundamental concepts to Lens extension development. However, this is just a small glimpse of what can be created with Lens Extensions. Below are some suggested routes for furthering your Lens extension development skills. + +## Extension Capabilities + +In this section, we split the Lens extension points into a few categories, each with short descriptions as to what your extension could achieve. Validate that your extension idea is achievable by reading the [Extension Capabilities](../capabilities/overview.md) section for new extension ideas. + +## Guides & Samples + +We have a great collection of sample extensions that you can adapt from, and some of them include a detailed guide that explains the source code. You can find all Samples & Guides in the [lens-extension-samples](https://github.com/lensapp/lens-extension-samples) repository. + +## Testing and Publishing + +This section includes topics that help you develop high-quality Lens extensions. For example, you can learn + +* How to add [integration tests](../testing-and-publishing/testing.md) for your extension +* How to [publish your extension](../testing-and-publishing/publishing.md) diff --git a/docs/extensions/get-started/your-first-extension.md b/docs/extensions/get-started/your-first-extension.md new file mode 100644 index 0000000000..0b057d2a87 --- /dev/null +++ b/docs/extensions/get-started/your-first-extension.md @@ -0,0 +1,63 @@ +# Your First Extension + +In this topic, we'll teach you the fundamental concepts for building extensions. Make sure you have [Node.js](https://nodejs.org/en/) and [Git](https://git-scm.com/) installed.... + +## Installing and Building the extension + +Simple Lens extension that adds "Hello World" page to a cluster menu. + +### Linux + +First you will need to clone the [Lens Extension samples](https://github.com/lensapp/lens-extension-samples) repository to your local machine: + +```sh +git clone https://github.com/lensapp/lens-extension-samples.git +``` + +Next you need to create a symlink from the directory that Lens will monitor for user installed extensions to the sample extension, in this case **helloworld-sample**: + +```sh +mkdir -p ~/.k8slens/extensions +cd ~/.k8slens/extensions +ln -s /helloworld-sample helloworld-sample +``` + +To build the extension you can use `make` or run the `npm` commands manually: + +```sh +cd /helloworld-sample +make build +``` + +OR + +```sh +cd /helloworld-sample +npm install +npm run build +``` + +If you want to watch for any source code changes and automatically rebuild the extension you can use: + +```sh +cd /helloworld-sample +npm run dev +``` + +Finally, if you already have Lens open you will need to quit and restart Lens for the extension to be loaded. After this initial restart you can reload Lens and it will pick up any new builds of the extension. Within Lens connect to an existing cluster or [create a new one](../../clusters/adding-clusters.md). You should see then see the "Hello World" page in the Lens sidebar cluster menu. + +## Developing the extension + +Let's make a change to the message that our helloworld-sample extension displays: + +* Navigate to `/helloworld-sample`. +* Change the message from HelloWorld! to **Hello Lens Extensions** in `page.tsx`. +* Rebuild the extension or, if you used `npm run dev`, the extension should automatically rebuild. +* Reload the Lens window and click on the Hello World page. +* You should see the updated message showing up. + +## Next steps + +In the next topic, [Extension Anatomy](anatomy.md), we'll take a closer look at the source code of the Hello World sample and explain key concepts. + +You can find the source code of this tutorial at: [lensapp/lens-extension-samples](https://github.com/lensapp/lens-extension-samples/tree/master/helloworld-sample). The [Extension Guides](../guides/overview.md) topic contains other samples, each illustrating a different Lens Extension API. diff --git a/docs/extensions/guides/overview.md b/docs/extensions/guides/overview.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/guides/renderer-extension.md b/docs/extensions/guides/renderer-extension.md new file mode 100644 index 0000000000..fc4f9b8bdd --- /dev/null +++ b/docs/extensions/guides/renderer-extension.md @@ -0,0 +1 @@ +# Renderer Extension diff --git a/docs/extensions/overview.md b/docs/extensions/overview.md new file mode 100644 index 0000000000..4a118bd4d3 --- /dev/null +++ b/docs/extensions/overview.md @@ -0,0 +1,48 @@ +# Lens Extension API + +The Extensions API in Lens allows users to customize and enhance the Lens experience by creating their own menus or page content that is extended from the existing pages. Many of the core features of Lens are built as extensions and use the same Extension API. + +This documentation describes: + +* How to build, run, test and publish an extension +* How to take advantage of Lens's Extension API +* Where to find [guides](guides/overview.md) and [code samples](https://github.com/lensapp/lens-extension-samples) to help get you started + +Code samples are available at [lensapp/lens-extension-samples](https://github.com/lensapp/lens-extension-samples). + +## What can extensions do + +Here are some examples of what you can achieve with the Extension API: + +* Add custom components & views in the UI - Extending the Lens Workbench + +If you'd like to have a more comprehensive overview of the Extension API, refer to the [Extension Capabilities Overview](capabilities/overview.md) page. [Extension Guides Overview](guides/overview.md) also includes a list of code samples and guides that illustrate various Extension API usage. + +## How to build extensions + +Building a good extension can take a lot of effort. Here is what each section of the API doc can help you with: + +* **Get Started** teaches fundamental concepts for building extensions with the Hello World sample. +* **Extension Capabilities** dissects Lens's Extension API into smaller categories and points you to more detailed topics. +* **Extension Guides** includes guides and code samples that explain specific usages of Lens Extension API. +* **Testing and Publishing** includes in-depth guides on various extension development topics, such as testing and publishing extensions. +* **Advanced Topics** explains advanced concepts such as integrating with 3rd party applications/services. +* **References** contains exhaustive references for the Lens Extension API, Contribution Points, and many other topics. + +## What's new + +Lens updates on a monthly cadence, and that applies to the Extension API as well. New features and APIs become available every month to increase the power and scope of Lens extensions. + +To stay current with the Extension API and Lens features in general, you can review the [release notes](https://github.com/lensapp/lens/releases). + +## Looking for help + +If you have questions for extension development, try asking on: + +* [Lens Dev Slack](http://k8slens.slack.com/): Public chatroom for Lens developers. Some Lens team members chime in on conversations. + +To provide feedback on the documentation or issues with the Lens Extension API, create new issues at [lensapp/lens](https://github.com/lensapp/lens/issues) with the labels `area/documentation` and/or `area/extension`. + +## Download Lens - The Kubernetes IDE + +Go to [Lens](https://k8slens.dev) diff --git a/docs/extensions/testing-and-publishing/bundling.md b/docs/extensions/testing-and-publishing/bundling.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/testing-and-publishing/publishing.md b/docs/extensions/testing-and-publishing/publishing.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/extensions/testing-and-publishing/testing.md b/docs/extensions/testing-and-publishing/testing.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/getting-started/downloading-lens.md b/docs/getting-started/downloading-lens.md new file mode 100644 index 0000000000..2493edc5f6 --- /dev/null +++ b/docs/getting-started/downloading-lens.md @@ -0,0 +1,64 @@ +# Downloading Lens + +Lens is lightweight and simple to install. You'll be up and running in just a few minutes. + + +## System requirements + +Review the [System Requirements](/supporting/requirements/) to check if your computer configuration is supported. + + +## macOS + +1. [Download Lens](https://github.com/lensapp/lens/releases) for macOS. +2. Open the browser's download list and locate the downloaded archive. +3. Select the 'magnifying glass' icon to open the archive in Finder. +4. Double-click `Lens-{version}.dmg` and drag `Lens.app` to the `Applications` folder, making it available in the macOS Launchpad. +5. Add Lens to your Dock by right-clicking on the icon to bring up the context menu and choosing **Options**, **Keep in Dock**. + + +## Windows + +1. Download the [Lens installer](https://github.com/lensapp/lens/releases) for Windows. +2. Once it is downloaded, run the installer `Lens-Setup-{version}.exe`. This will only take a minute. +3. By default, Lens is installed under `C:\users\{username}\AppData\Local\Programs\Lens`. + + +## Linux + +See the [Download Lens](https://github.com/lensapp/lens/releases) page for a complete list of available installation options. + + +### Snap + +Lens is officially distributed as a Snap package in the [Snap Store](https://snapcraft.io/store): + +[![Get it from the Snap Store](images/snap-store.png)](https://snapcraft.io/kontena-lens) + +You can install it by running: + +```bash +sudo snap install kontena-lens --classic +``` + + +## Network + +Lens is built on top of Electron and benefits from all the networking stack capabilities of Chromium. + + +### Proxy server support + +... + + +## Update cadence + +Lens releases a new version each month with new features and important bug fixes. Lens supports auto updating and you will be prompted to install the new release when it becomes available! + +To stay current with the Lens features, you can review the [release notes](https://github.com/lensapp/lens/releases). + + +## Quick Start + +Get up and running quickly by learning to [add clusters](../clusters/adding-clusters.md). \ No newline at end of file diff --git a/docs/getting-started/images/color-theme.png b/docs/getting-started/images/color-theme.png new file mode 100644 index 0000000000..5e4f144560 Binary files /dev/null and b/docs/getting-started/images/color-theme.png differ diff --git a/docs/getting-started/images/disabled-telemetry-usage-tracking.png b/docs/getting-started/images/disabled-telemetry-usage-tracking.png new file mode 100644 index 0000000000..809a96056a Binary files /dev/null and b/docs/getting-started/images/disabled-telemetry-usage-tracking.png differ diff --git a/docs/getting-started/images/snap-store.png b/docs/getting-started/images/snap-store.png new file mode 100644 index 0000000000..5e652132c3 Binary files /dev/null and b/docs/getting-started/images/snap-store.png differ diff --git a/docs/getting-started/introductory-videos.md b/docs/getting-started/introductory-videos.md new file mode 100644 index 0000000000..fcaee999c0 --- /dev/null +++ b/docs/getting-started/introductory-videos.md @@ -0,0 +1,36 @@ +# Introductory Videos + +Continue your Lens journey with this set of introductory videos! These videos are meant to quickly familiarize you with Lens' various powerful features. + + diff --git a/docs/getting-started/preferences.md b/docs/getting-started/preferences.md new file mode 100644 index 0000000000..cd71e476f8 --- /dev/null +++ b/docs/getting-started/preferences.md @@ -0,0 +1,28 @@ +# Preferences + + +## Color themes + +The Color Themes option in Lens preferences lets you set the colors in the Lens user interface to suit your liking. + +1. Go to **File** > **Preferences** (**Lens** > **Preferences** on Mac). +2. Select your preferred theme from the **Color Theme** dropdown. +![Color Theme](images/color-theme.png) + + +## Telemetry & usage tracking + +Lens collects telemetry data, which is used to help us understand how to improve the product. For example, this usage data helps us to debug issues and to prioritize new features. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data. Please see our [privacy statement](https://www.mirantis.com/company/privacy-policy/) to learn more. + + +### Disable telemetry reporting + +If you don't wish to send usage data to Mirantis, you can disable the "Telemetry & Usage Tracking" in the Lens preferences. + +1. Go to **File** > **Preferences** (**Lens** > **Preferences** on Mac). +2. Scroll down to **Telemetry & Usage Tracking** +3. Uncheck **Allow telemetry & usage tracking**. + +This will silence all telemetry events from Lens going forward. Telemetry information may have been collected and sent up until the point when you disable this setting. +![Disable Telemetry & Usage Tracking](images/disabled-telemetry-usage-tracking.png) + diff --git a/docs/img/favicon.ico b/docs/img/favicon.ico new file mode 100644 index 0000000000..19b2de71d1 Binary files /dev/null and b/docs/img/favicon.ico differ diff --git a/docs/img/lens-intro-video-screenshot.png b/docs/img/lens-intro-video-screenshot.png new file mode 100644 index 0000000000..2c5467b3f0 Binary files /dev/null and b/docs/img/lens-intro-video-screenshot.png differ diff --git a/docs/img/lens-logo-icon.svg b/docs/img/lens-logo-icon.svg new file mode 100644 index 0000000000..ede39244e5 --- /dev/null +++ b/docs/img/lens-logo-icon.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/docs/img/play.svg b/docs/img/play.svg new file mode 100644 index 0000000000..a94d6e88ab --- /dev/null +++ b/docs/img/play.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 0000000000..f727034bbd --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,90 @@ +:root { + --md-primary-fg-color: #3d90ce; + --md-accent-fg-color: #3d90ce; +} + +:root > * { + /* Footer */ + --md-footer-bg-color: #3d90ce; +} + +.md-version__list { + overflow: auto; +} + +ul.video-list { + counter-reset: section; + list-style: none; + padding-left: 0; + position:relative +} + +ul.video-list .video:not(:last-of-type) a { + border-bottom:2px solid #e6e6e6 +} + +ul.video-list a { + position: relative; + padding: 2rem 2rem 2rem 4.2rem; + display: block; + box-sizing:border-box +} + +ul.video-list a .info { + padding-top:0.25rem +} + +ul.video-list a .info::before { + counter-increment: section; + content: counter(section); + position: absolute; + left: 1.5rem; + color:black +} + +ul.video-list a .info > p, ul.video-list a .info > span { + color:black +} + +ul.video-list a .info .title { + margin-top: 0; + margin-bottom:0.7rem +} + +ul.video-list a .info .description { + margin-bottom: 1rem; + +} + +ul.video-list a .info .duration, ul.video-list a .info .duration span { + color: #6e6e6e; + +} + +ul.video-list a:hover, ul.video-list a:focus { + text-decoration:none +} + +ul.video-list a:hover { + background:#f2f2f2 +} + +ul.video-list a:hover::after { + content: ''; + display: block; + width: 6rem; + height: 6rem; + position: absolute; + background: url("/img/play.svg"); + background-size: 6rem; + top: 3rem; + left:8.6rem +} + +ul.video-list .thumb { + max-height: 8.2rem; + padding-right: 2rem; + position: relative; + float:left +} + diff --git a/docs/supporting/requirements.md b/docs/supporting/requirements.md new file mode 100644 index 0000000000..6eb929a3b3 --- /dev/null +++ b/docs/supporting/requirements.md @@ -0,0 +1,26 @@ +# Requirements for Lens + +## Hardware + +Lens is a small download (< 300 MB) and has a disk footprint of 600 MB. Lens is lightweight and should easily run on today's hardware. + +We recommend: + +* 2 GHz or faster processor +* 1 GB of RAM + +## Platforms + +Lens has been tested on the following platforms: + +* OS X +* Windows +* Linux + +### Additional Windows requirements + +... + +### Additional Linux requirements + +... diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000000..07d6cfe7a7 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,85 @@ +site_name: Lens Documentation +site_description: Documentation for Lens IDE. The only system you’ll ever need to take control of your Kubernetes clusters. It's open source and free. Download it today! +site_author: Mirantis, Inc. +site_url: https://docs.k8slens.dev +docs_dir: docs/ +repo_name: GitHub +repo_url: https://github.com/lensapp/lens +copyright: Copyright © 2020 Mirantis Inc. - All rights reserved. +edit_uri: "" +nav: + - Overview: README.md + - Getting started: + - Downloading Lens: getting-started/downloading-lens.md + - Preferences: getting-started/preferences.md + - Introductory videos: getting-started/introductory-videos.md + - Clusters: + - Adding clusters: clusters/adding-clusters.md + - Removing cluster: clusters/removing-clusters.md + - Settings: clusters/settings.md + - Extensions: + - Overview: extensions/overview.md + - Get Started: + - Your First Extension: extensions/get-started/your-first-extension.md + - Extension Anatomy: extensions/get-started/anatomy.md + - Wrapping Up: extensions/get-started/wrapping-up.md + - Extension Capabilities: + - Overview: extensions/capabilities/overview.md + - Common Capabilities: extensions/capabilities/common-capabilities.md + - Theming: extensions/capabilities/theming.md + - Extension Guides: + - Overview: extensions/guides/overview.md + - Renderer Extension: extensions/guides/renderer-extension.md + - Testing and Publishing: + - Testing Extensions: extensions/testing-and-publishing/testing.md + - Publishing Extensions: extensions/testing-and-publishing/publishing.md + - Bundling Extensions: extensions/testing-and-publishing/bundling.md + - Lens Website: https://k8slens.dev +theme: + name: 'material' + highlightjs: true + language: 'en' + custom_dir: docs/custom_theme + favicon: img/favicon.ico + logo: img/lens-logo-icon.svg + palette: + - scheme: default + toggle: + icon: material/toggle-switch + name: Switch to light mode + - scheme: slate + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + features: + - navigation.instant + - toc.autohide + - search.suggest + - search.highlight + +extra_css: + - stylesheets/extra.css + +plugins: + - search + - git-revision-date-localized + +markdown_extensions: + - toc: + permalink: "#" + toc_depth: 3 + +extra: + generator: false + social: + - icon: fontawesome/brands/github + link: https://github.com/lensapp/lens + name: Lens on GitHub + - icon: fontawesome/brands/twitter + link: https://twitter.com/k8slens + name: Lens on Twitter + - icon: fontawesome/brands/slack + link: http://k8slens.slack.com/ + name: Lens on Slack + version: + method: mike \ No newline at end of file diff --git a/mkdocs/Dockerfile b/mkdocs/Dockerfile new file mode 100644 index 0000000000..81a82d3443 --- /dev/null +++ b/mkdocs/Dockerfile @@ -0,0 +1,35 @@ +ARG PYTHON_VERSION=3.8.1-alpine3.11 + +FROM python:${PYTHON_VERSION} as builder + +ENV PYTHONUNBUFFERED 1 + +# Set build directory +WORKDIR /wheels + +# Copy files necessary +COPY ./requirements.txt . + +# Perform build and cleanup artifacts +RUN \ + apk add --no-cache \ + git \ + git-fast-import \ + && apk add --no-cache --virtual .build gcc musl-dev \ + && python -m pip install --upgrade pip \ + && pip install -r requirements.txt \ + && apk del .build gcc musl-dev \ + && rm -rf /usr/local/lib/python3.8/site-packages/mkdocs/themes/*/* \ + && rm -rf /tmp/* + + + +# Set final MkDocs working directory +WORKDIR /docs + +# Expose MkDocs development server port +EXPOSE 8000 + +# Start development server by default +ENTRYPOINT ["mkdocs"] +CMD ["serve", "--dev-addr=0.0.0.0:8000"] diff --git a/mkdocs/requirements.txt b/mkdocs/requirements.txt new file mode 100644 index 0000000000..4db6d92e25 --- /dev/null +++ b/mkdocs/requirements.txt @@ -0,0 +1,8 @@ +# Direct dependencies +mkdocs>=1.1 +Pygments>=2.4 +markdown>=3.2 +pymdown-extensions>=7.0 +mkdocs-material-extensions>=1.0 +mkdocs-git-revision-date-localized-plugin>=0.7.3 +mkdocs-material>=6.1.0 \ No newline at end of file diff --git a/package.json b/package.json index f44078b42b..7a2f53f412 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "download:kubectl": "yarn run ts-node build/download_kubectl.ts", "download:helm": "yarn run ts-node build/download_helm.ts", "build:tray-icons": "yarn run ts-node build/build_tray_icon.ts", - "lint": "eslint $@ --ext js,ts,tsx --max-warnings=0 src/" + "lint": "eslint $@ --ext js,ts,tsx --max-warnings=0 src/", + "mkdocs-serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest" }, "config": { "bundledKubectlVersion": "1.17.11", diff --git a/src/main/menu.ts b/src/main/menu.ts index 037378537d..cb8f260dcf 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -1,4 +1,4 @@ -import { app, BrowserWindow, dialog, Menu, MenuItem, MenuItemConstructorOptions, webContents } from "electron" +import { app, BrowserWindow, dialog, Menu, MenuItem, MenuItemConstructorOptions, webContents, shell } from "electron" import { autorun } from "mobx"; import { WindowManager } from "./window-manager"; import { appName, isMac, isWindows } from "../common/vars"; @@ -193,6 +193,12 @@ export function buildMenu(windowManager: WindowManager) { navigate(whatsNewURL()) }, }, + { + label: "Documentation", + click: async () => { + shell.openExternal('https://docs.k8slens.dev/'); + }, + }, ...ignoreOnMac([ { label: "About Lens",