Skip to content

Commit 4316687

Browse files
committed
add extensions docs
Signed-off-by: frezes <zhangjunhao@kubesphere.io>
1 parent ac6bf45 commit 4316687

7 files changed

Lines changed: 166 additions & 7 deletions

File tree

.github/workflows/deploy-gh-pages.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- "website/**"
79
# Review gh actions docs if you want to further define triggers, paths, etc
810
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
911

website/docs/intro.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ AI Labs 的目标是:
1616

1717
## 🚀 AI Labs 组件概览
1818

19+
20+
> 💡 **提示:**
21+
> AI Labs 仍在持续演进中,未来将陆续集成更多智能组件与实验特性,助力 KubeSphere 迈向全面智能化。
22+
1923
| 组件名称 | 描述 | 推荐程度 | 当前开发状态 | 最新版本 |
2024
| -------------- | ---------------------------------------------------------------------------------------------------- | ----- | ------ | ------ |
2125
| **HolmesGPT** | 一款面向云原生环境的智能故障诊断 Agent(AI Agent for Troubleshooting Cloud-Native Environments),能够自动分析日志、检测异常并提供修复建议。 | ⭐⭐⭐⭐⭐ | ✅ 已完成 | v0.12.4 |
@@ -31,6 +35,3 @@ AI Labs 的目标是:
3135
- [快速部署 AI Labs](./quick-start.md)
3236
- [安装扩展组件](./extension-managerment/_category_.json)
3337

34-
35-
> 💡 **提示:**
36-
> AI Labs 仍在持续演进中,未来将陆续集成更多智能组件与实验特性,助力 KubeSphere 迈向全面智能化。

website/extensions/intro.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
---
22
sidebar_position: 1
3-
title: 扩展组件介绍
3+
title: 扩展组件概览
44
---
55

6-
# 扩展组件介绍
6+
# 扩展组件概览
77

8+
9+
> 💡 **提示:**
10+
> AI Labs 仍在持续演进中,未来将陆续集成更多智能组件与实验特性,助力 KubeSphere 迈向全面智能化。
11+
12+
| 组件名称 | 描述 | 推荐程度 | 当前开发状态 | 最新版本 |
13+
| -------------- | ---------------------------------------------------------------------------------------------------- | ----- | ------ | ------ |
14+
| **HolmesGPT** | 一款面向云原生环境的智能故障诊断 Agent(AI Agent for Troubleshooting Cloud-Native Environments),能够自动分析日志、检测异常并提供修复建议。 | ⭐⭐⭐⭐⭐ | ✅ 已完成 | v0.12.4 |
15+
| **Open-WebUI** | 开源的多模型统一聊天界面(Open WebUI for LLMs),支持本地与远程大语言模型接入。 | ⭐⭐⭐⭐☆ | ✅ 已完成 | v0.6.8 |
16+
| **JupyterHub** | 支持多用户的交互式 Notebook 环境,用于实验、教学与 AI 原型开发。 | ⭐☆☆☆☆ | ✅ 已完成 | v5.3.0 |
17+
| **n8n** | 可视化工作流自动化平台(Workflow Automation for AI Integration),用于探索 AI 组件间的自动化编排与数据流集成。 | ⭐⭐⭐⭐⭐ | 🧪 研究中 | - |

website/extensions/jupyterhub/intro.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,50 @@
22
sidebar_position: 1
33
---
44

5-
# Intro
5+
# JupyterHub
6+
7+
## JupyterHub
8+
9+
介绍 JupyterHub 之前,我们先了解下 Jupyter Notebook。
10+
11+
### Jupyter Notebook
12+
13+
**A Jupyter Notebook** is nothing more than a Python(&) process which is getting commands from a web browser and displaying the output via that browser. What the process actually sees is roughly like getting commands on standard input(&) and writing to standard output(&). There is nothing intrinsically special about this process
14+
15+
- it can do anything a normal Python process can do, and nothing more. The Jupyter kernel handles capturing output and converting things such as graphics to a form usable by the browser.
16+
17+
18+
### JupyterHub
19+
20+
直白的讲,**Jupyter Notebook** 就是一个“交互式的笔记本式编程工具”,那么, **JupyterHub** 解决的是“多人怎么方便、安全、高效地用 **Jupyter Notebook**” 的问题。
21+
22+
因此,JupyterHub 更符合 **教学/培训、在线服务/公共平台** 的使用场景。
23+
24+
## 最佳实践
25+
26+
JupyterHub 扩展组件仅将 [JupyterHub Helm chart](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/tree/main/jupyterhub) 制作为 KubeSphere 扩展组件,方便用户在 KubeSphere 环境中快速部署 JupyterHub。
27+
28+
### 部署 JupyterHub 扩展组件
29+
30+
修改 JupyterHub 扩展组件配置,将 proxy 对外暴露,即可使用暴露地址访问 Jupyter。
31+
32+
```yaml
33+
jupyterhub:
34+
proxy:
35+
# service relates to the proxy-public service
36+
service:
37+
type: NodePort
38+
labels: {}
39+
annotations: {}
40+
nodePorts:
41+
http: 30639
42+
https:
43+
disableHttpPort: false
44+
extraPorts: []
45+
loadBalancerIP:
46+
loadBalancerSourceRanges: []
47+
```
48+
49+
注意,默认部署使用 `jupyterhub.auth.DummyAuthenticatorJupyterHub` 身份验证器,允许任何人使用任何用户名和密码登录。这仅应用于初始测试目的。如正式使用,可参考 [JupyterHub Authentication](https://zero-to-jupyterhub.readthedocs.io/en/latest/authentication.html) 配置身份验证器。
50+
51+
更多帮助文档可参考 [JupyterHub for Kubernetes](https://z2jh.jupyter.org/en/stable/index.html)。
4.13 MB
Loading
5.34 MB
Loading

website/extensions/open-webui/intro.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,105 @@
22
sidebar_position: 1
33
---
44

5-
# Intro
5+
# Open WebUI
66

7+
## 简介
8+
9+
### Open WebUI 简介
10+
11+
"Open WebUI is an extensible, feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline. It supports various LLM runners like Ollama and OpenAI-compatible APIs, with built-in inference engine for RAG, making it a powerful AI deployment solution."
12+
13+
![Open WebUI Demo](./img/demo.gif)
14+
15+
总的来说,Open WebUI 是一个 User-friendly AI Interface (Supports Ollama, OpenAI API, ...),更多内容可参考 [Open WebUI 官方文档](https://docs.openwebui.com/)
16+
17+
### Open WebUI 扩展组件
18+
19+
Open WebUI 扩展组件是 KubeSphere 提供的用于集成 Open WebUI 的插件, 并内置 Ollama 用于模型部署,支持用户在 KubeSphere 中快速部署 Open WebUI,并支持通过 KubeSphere 账户进行登录。
20+
21+
## 最佳实践
22+
23+
### 安装 Open WebUI 扩展组件并部署模型
24+
25+
以下是在 KubeSphere 上安装 Open WebUI 扩展组件,并配置 deepseek-r1:1.5b 模型进行部署的配置文件,请根据实际情况修改配置文件中的 IP 地址和端口。然后就可以如图所示
26+
27+
```yaml
28+
open-webui-helper:
29+
# -- The URL of the Open WebUI
30+
# openWebUIUrl: "http://{nodeIP}:{NodePort}"
31+
openWebUIUrl: "http://172.31.19.4:32678"
32+
33+
open-webui:
34+
ollama:
35+
enabled: true
36+
ollama:
37+
# gpu:
38+
# enabled: true
39+
# type: 'nvidia'
40+
# number: 1
41+
models:
42+
pull:
43+
- deepseek-r1:1.5b
44+
run:
45+
- deepseek-r1:1.5b
46+
# runtimeClassName: nvidia
47+
persistentVolume:
48+
enabled: true
49+
50+
# -- Service values to expose Open WebUI pods to cluster
51+
service:
52+
type: NodePort
53+
nodePort: "32678"
54+
```
55+
56+
部署完成后,可以通过 KubeSphere 的 "组件坞" 中的 ""Open WebUI" 进行访问。
57+
58+
![deploy](./img/deploy-open-webui.gif)
59+
60+
### 安装 Open WebUI 扩展组件并接入 KubeSphere 账户
61+
62+
Open WebUI 提供了非常友好的 [SSO 接入](https://docs.openwebui.com/features/sso/) , 而 KubeSphere 也可以[作为 OIDC 身份提供者](https://docs.kubesphere.com.cn/v4.2.0/04-platform-management/05-platform-settings/04-ks-as-oidc-identity-provider/),那么,结合起来,就可以实现通过 KubeSphere 账户进行登录 Open WebUI。
63+
64+
65+
首先,请确保已安装 KubeSphere,并配置了 portal.hostname 和 portal.port,请参考[作为 OIDC 身份提供者](https://docs.kubesphere.com.cn/v4.2.0/04-platform-management/05-platform-settings/04-ks-as-oidc-identity-provider/) 步骤进行配置。
66+
67+
然后在 KubeSphere 上安装 Open WebUI 扩展组件,进行以下配置,请根据实际情况修改配置文件中的 IP 地址和端口。
68+
69+
70+
```yaml
71+
open-webui-helper:
72+
openWebUIUrl: "http://172.31.19.4:32678" #-- The URL of the Open WebUI
73+
74+
kubesphereAsOIDCProvider:
75+
enabeld: true #-- Enable KubeSphere as OIDC Provider
76+
77+
open-webui:
78+
ollama:
79+
enabled: true
80+
service:
81+
type: NodePort
82+
nodePort: "32678" #-- Service NodePort to expose Open WebUI pods to cluster
83+
extraEnvVars:
84+
- name: OAUTH_TOKEN_ENDPOINT_AUTH_METHOD
85+
value: client_secret_post
86+
sso:
87+
enabled: enabled
88+
enableSignup: true
89+
oidc:
90+
enabled: true
91+
clientId: "open-webui"
92+
clientSecret: "open-webui"
93+
clientExistingSecret: ""
94+
providerUrl: "http://172.31.19.4:30880/.well-known/openid-configuration" #-- KubeSphere OIDC Provider URL
95+
providerName: "kubesphere"
96+
scopes: "openid email profile"
97+
```
98+
99+
配置完成后,即可使用 KubeSphere 账户进行登录 Open WebUI。
100+
101+
### 高可用部署建议
102+
103+
- 将 Open WebUI 的数据库存储到外部数据库中,如 PostgreSQL。
104+
- 部署 Redis 作为缓存,用于多副本 Open WebUI 通信, 以保证会话一致性等。
105+
- 部署多个 Open WebUI 副本,以实现高可用。
106+
- 可考虑 ollama 单独部署

0 commit comments

Comments
 (0)