-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
hide: | ||
- toc | ||
--- | ||
|
||
# 流水线缓存 | ||
|
||
应用工作台 v0.32.0 版本支持了 Jenkins 流水线的缓存功能,其中需要为流水线配置 SC、PVC 等资源,所以需要工作台管理员启用流水线后才可进行使用。 | ||
|
||
## 管理员启用流水线缓存 | ||
|
||
1. 前往 应用工作台 -> 工作台管理 -> 流水线设置 -> 流水线配置。 | ||
|
||
2. 点击 `前往配置` 启用流水线缓存。 | ||
|
||
![cache1](../../images/cache1.jpg) | ||
|
||
3. 填写相关参数,目的是为平台流水线配置好后端存储类,以方便后续创建 PVC 资源。 | ||
|
||
- Jenkins 名称:默认读取当前平台集成的 Jenkins 实例名称 | ||
- Jenkins 地址:默认读取当前平台集成的 Jenkins 实例地址 | ||
- Jenkins 部署位置:默认读取当前平台集成的 Jenkins 实例部署位置,如果未设置部署位置,无法启用流水线缓存 | ||
- 存储池:选择 Jenkins 所在集群提供的存储类 | ||
- 默认容量:在流水线中配置缓存时默认的容量值 | ||
- 容量限制:在流水线中配置缓存时可设置的最大容量值 | ||
- 访问方式:支持 ReadWriteOnce、ReadWriteMany、ReadOnlyMany、ReadWriteOncePod | ||
- 默认挂载路径:在流水线中配置缓存时数据卷挂载到目录的默认值。 | ||
|
||
![cache2](../../images/cache2.jpg) | ||
|
||
4. 完成配置后,前往流水线为单条流水线启用缓存。 | ||
|
||
![cache3](../../images/cache3.jpg) | ||
|
||
## 流水线启用缓存能力 | ||
|
||
1. 在 应用工作台 -> 流水线 页面,选择某一条流水线,点击流水线的名称。 | ||
|
||
2. 流水线详情界面,在右上角点击`编辑流水线` ,进入图形化编辑页面,点击 `缓存配置`。 | ||
|
||
3. 为当前流水线开启缓存能力,并配置相关参数. | ||
|
||
- 访问方式:支持 ReadWriteOnce、ReadWriteMany、ReadOnlyMany、ReadWriteOncePod | ||
- 容量:不得高于管理员设置的最大值 | ||
- 缓存目录:挂载路径,将数据卷挂载在容器的某个目录下,用于缓存数据 | ||
|
||
![cache4](../../images/cache4.jpg) | ||
|
||
4. 配置成功后,会为当前流水线创建一个 PVC 资源,另外暂时不支持二次更新。 | ||
|
||
## 流水线使用缓存能力 | ||
|
||
!!! note | ||
|
||
注意:启用流水线缓存后,需要在 Agent 设置,类型选择 Kubernetes,其他类型暂不支持! | ||
|
||
1. 流水线详情界面,在右上角点击`编辑流水线` ,进入图形化编辑页面,点击 `Agent 设置`。 | ||
|
||
![cache5](../../images/cache5.jpg) | ||
|
||
2. 类型选择 `Kubernetes`,并且开启`启用缓存`。 | ||
|
||
![cache6](../../images/cache6.jpg) | ||
|
||
3. 配置好 Agent 的容器镜像后,即可在流水线中使用缓存能力。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters