You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by ww...@apache.org on 2022/01/28 00:05:42 UTC
[incubator-yunikorn-site] branch master updated: [YUNIKORN-1056] Document usage of scheduler plugin (#115)
This is an automated email from the ASF dual-hosted git repository.
wwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-yunikorn-site.git
The following commit(s) were added to refs/heads/master by this push:
new 9fdc1e6 [YUNIKORN-1056] Document usage of scheduler plugin (#115)
9fdc1e6 is described below
commit 9fdc1e6df42e76cd652394c08bfc460d9de9622e
Author: Craig Condit <cc...@apache.org>
AuthorDate: Thu Jan 27 18:05:34 2022 -0600
[YUNIKORN-1056] Document usage of scheduler plugin (#115)
Added doc in quick start, user and developer doc about the plugin
---
docs/developer_guide/build.md | 8 +++++-
docs/developer_guide/deployment.md | 5 ++++
docs/get_started/get_started.md | 11 ++++++--
docs/user_guide/deployment_modes.md | 51 +++++++++++++++++++++++++++++++++++++
package.json | 2 +-
sidebars.js | 1 +
6 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/docs/developer_guide/build.md b/docs/developer_guide/build.md
index 0db8de0..c7b9d04 100644
--- a/docs/developer_guide/build.md
+++ b/docs/developer_guide/build.md
@@ -33,7 +33,7 @@ Read the [environment setup guide](developer_guide/env_setup.md) first to setup
## Build YuniKorn for Kubernetes
Prerequisite:
-- Go 1.12+
+- Go 1.16+
You can build the scheduler for Kubernetes from [yunikorn-k8shim](https://github.com/apache/incubator-yunikorn-k8shim) project.
The build procedure will build all components into a single executable that can be deployed and running on Kubernetes.
@@ -172,6 +172,12 @@ make run
```
It will connect with the kubernetes cluster using the users configured configuration located in `$HOME/.kube/config`.
+To run YuniKorn in Kubernetes scheduler plugin mode instead, execute:
+
+```
+make run_plugin
+```
+
You can also use the same approach to run the scheduler locally but connecting to a remote kubernetes cluster,
as long as the `$HOME/.kube/config` file is pointing to that remote cluster.
diff --git a/docs/developer_guide/deployment.md b/docs/developer_guide/deployment.md
index 5d27d5e..cf26d6e 100644
--- a/docs/developer_guide/deployment.md
+++ b/docs/developer_guide/deployment.md
@@ -98,6 +98,11 @@ The deployment will run 2 containers from your pre-built docker images in 1 pod,
* yunikorn-scheduler-core (yunikorn scheduler core and shim for K8s)
* yunikorn-scheduler-web (web UI)
+Alternatively, the scheduler can be deployed as a K8S scheduler plugin:
+```
+kubectl create -f deployments/scheduler/plugin.yaml
+```
+
The pod is deployed as a customized scheduler, it will take the responsibility to schedule pods which explicitly specifies `schedulerName: yunikorn` in pod's spec. In addition to the `schedulerName`, you will also have to add a label `applicationId` to the pod.
```yaml
metadata:
diff --git a/docs/get_started/get_started.md b/docs/get_started/get_started.md
index aa526d0..920059b 100644
--- a/docs/get_started/get_started.md
+++ b/docs/get_started/get_started.md
@@ -33,7 +33,7 @@ The easiest way to get started is to use our Helm Charts to deploy YuniKorn on a
It is recommended to use Helm 3 or later versions.
```shell script
-helm repo add yunikorn https://apache.github.io/incubator-yunikorn-release
+helm repo add yunikorn https://apache.github.io/incubator-yunikorn-release
helm repo update
kubectl create namespace yunikorn
helm install yunikorn yunikorn/yunikorn --namespace yunikorn
@@ -41,8 +41,15 @@ helm install yunikorn yunikorn/yunikorn --namespace yunikorn
By default, the helm chart will install the scheduler, web-server and the admission-controller in the cluster.
When `admission-controller` is installed, it simply routes all traffic to YuniKorn. That means the resource scheduling
-is delegated to YuniKorn. You can disable it by setting `embedAdmissionController` flag to false during the helm install.
+is delegated to YuniKorn. You can disable it by setting `embedAdmissionController` flag to `false` during the helm install.
+The YuniKorn scheduler can also be deployed as a Kubernetes scheduler plugin by setting the Helm `enableSchedulerPlugin`
+flag to `true`. This will deploy an alternate Docker image which contains YuniKorn compiled together with the default
+scheduler. This new mode offers better compatibility with the default Kubernetes scheduler and is suitable for use with the
+admission controller delegating all scheduling to YuniKorn. Because this mode is still very new, it is not enabled by default.
+
+If you are unsure which deployment mode you should use, refer to our [side-by-side comparison](user_guide/deployment_modes).
+
Further configuration options for installing YuniKorn via Helm are available in the [YuniKorn Helm hub page](https://hub.helm.sh/charts/yunikorn/yunikorn).
If you don't want to use helm charts, you can find our step-by-step
diff --git a/docs/user_guide/deployment_modes.md b/docs/user_guide/deployment_modes.md
new file mode 100644
index 0000000..6864a9c
--- /dev/null
+++ b/docs/user_guide/deployment_modes.md
@@ -0,0 +1,51 @@
+---
+id: deployment_modes
+title: Deployment Modes
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## YuniKorn deployment modes
+
+YuniKorn can be deployed in two different modes: standard and plugin. In standard mode, YuniKorn runs as a customized
+Kubernetes scheduler. In plugin mode, YuniKorn is implemented as a set of plugins on top of the default Kubernetes
+scheduling framework.
+
+In both cases, it is recommended to run the admission controller as well, as this will ensure that only a single
+scheduler is active within your Kubernetes cluster. In this mode, the default Kubernetes scheduler (which is always running)
+will be bypassed for all pods except YuniKorn itself.
+
+## Which version should I use?
+
+### Standard mode
+
+Standard mode is currently the default. It is stable, efficient, and very performant. It is well-suited for
+deployments where most if not all pods are leveraging the queueing features of YuniKorn.
+
+### Plugin mode
+
+Plugin mode is a new deployment model where the scheduler is implemented on top of the default Kubernetes scheduling
+logic, allowing for better compatibility with the default Kubernetes scheduler. It is well-suited for mixed
+workloads (traditional Kubernetes as well as queued applications).
+
+Plugin mode is currently very new and has therefore not yet reached the maturity level of standard mode.
+
+To activate plugin mode when deploying with Helm, set the variable `enableSchedulerPlugin` to `true`.
+
diff --git a/package.json b/package.json
index 3977747..1e901df 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"dependencies": {
"@docusaurus/core": "2.0.0-beta.14",
"@docusaurus/preset-classic": "2.0.0-beta.14",
- "@docusaurus/theme-search-algolia": "^2.0.0-beta.14",
+ "@docusaurus/theme-search-algolia": "^2.0.0-beta.15",
"@mdx-js/react": "^1.5.8",
"clsx": "^1.1.1",
"react": "16.13.1",
diff --git a/sidebars.js b/sidebars.js
index 1ffe89f..29cacd0 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -21,6 +21,7 @@ module.exports = {
'get_started/core_features'
],
'User Guide': [
+ 'user_guide/deployment_modes',
'user_guide/queue_config',
'user_guide/placement_rules',
'user_guide/usergroup_resolution',