Skip to content

Commit d54b23d

Browse files
authored
Merge pull request #1421 from aFlyBird0/docs-helm
docs: use cases - helm installer
2 parents 67f819d + c953364 commit d54b23d

19 files changed

+230
-7
lines changed

docs/plugins/helm-installer/argocd.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install Argo CD with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `argocd`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: argocd
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/argocd.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 Argo CD
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `argocd`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: argocd
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/plugins/helm-installer/artifactory.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install Artifactory with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `artifactory`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: artifactory
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/artifactory.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 Artifactory
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `artifactory`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: artifactory
11+
```
12+
313
## 默认配置
414
515
| key | default value | description |

docs/plugins/helm-installer/devlake.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install DevLake with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `devlake`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: devlake
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/devlake.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 DevLake
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `devlake`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: devlake
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/plugins/helm-installer/helm-installer.zh.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tools:
1818
```
1919
2020
在这个配置文件里,和插件相关的配置 name 和 instanceID,前者表示你将使用 `helm-installer` 插件,后者表示插件实例名。
21-
请注意这个 instanceID 使用了 "argocd-" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。
21+
请注意这个 instanceID 使用了 "argocd" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。
2222

2323
你可以在 [Install Argo CD with DevStream](./argocd.zh.md) 中查看 DevStream 为你设置了哪些默认值。
2424

@@ -47,6 +47,7 @@ tools:
4747
chartName: ""
4848
version: ""
4949
namespace: ""
50+
releaseName: ""
5051
wait: true
5152
timeout: 10m
5253
upgradeCRDs: true
@@ -58,7 +59,7 @@ tools:
5859
### 2.1、instanceID 使用技巧
5960

6061
instanceID 的前缀如果能够匹配到某个已经被支持的工具(详见文末列表),那么 DevStream 会为你设置一系列的默认值。
61-
比如 "argocd-001" 的前缀 "argocd-" 能够匹配到 "argocd" + "-",因此 Argo CD 的默认 Chart 配置会被应用,于是如下最小化配置:
62+
比如 "argocd-001" 的前缀 "argocd-" 能够匹配到 "argocd",因此 Argo CD 的默认 Chart 配置会被应用,于是如下最小化配置:
6263

6364
```yaml
6465
tools:
@@ -74,13 +75,14 @@ tools:
7475
dependsOn: [ ]
7576
options:
7677
repo:
77-
name: ""
78-
url: ""
78+
name: "argo"
79+
url: "https://argoproj.github.io/argo-helm"
7980
chart:
8081
chartPath: ""
81-
chartName: ""
82+
chartName: "argo/argo-cd"
8283
version: ""
83-
namespace: ""
84+
namespace: "argocd"
85+
releaseName: "argocd"
8486
wait: true
8587
timeout: 10m
8688
upgradeCRDs: true

docs/plugins/helm-installer/kube-prometheus.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install kube-prometheus with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `kube-prometheus`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: kube-prometheus
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/kube-prometheus.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 kube-prometheus
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `kube-prometheus`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: kube-prometheus
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/plugins/helm-installer/openldap.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install OpenLDAP with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `openldap`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: openldap
11+
```
12+
313
### Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/openldap.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 OpenLDAP
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `openldap`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: openldap
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/plugins/helm-installer/sonarqube.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install SonarQube with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `sonarqube`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: sonarqube
11+
```
12+
313
### Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/tekton.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install Tekton with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `tekton`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: tekton
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/tekton.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 Tekton
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `tekton`,最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: tekton
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/plugins/helm-installer/vault.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Install Vault with DevStream
22

3+
## InstanceID Prefix
4+
5+
The `instanceID` prefix must be `vault`, the minimum tools configuration example:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: vault
11+
```
12+
313
## Default Configs
414
515
| key | default value | description |

docs/plugins/helm-installer/vault.zh.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# 使用 DevStream 部署 Vault
22

3+
## 前缀匹配
4+
5+
`instanceID` 的前缀需要是 `vault`, 最小化 tools 配置示例:
6+
7+
```yaml
8+
tools:
9+
- name: helm-installer
10+
instanceID: vault
11+
```
12+
313
## 默认配置
414
515
| 配置项 | 默认值 | 描述 |

docs/use-cases/helm-installer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Replacing Helm with DevStream Makes Application Deployment Easier

docs/use-cases/helm-installer.zh.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# 用 DevStream 替代 Helm 让应用部署更加简单
2+
3+
helm-installer 插件实现了比 helm 更加简单和容易上手的方式来快速部署提供了 Helm Chart 的应用。
4+
5+
下面以 Argo CD 为例,介绍如何使用 DevStream 部署 Argo CD。
6+
7+
## 1 下载
8+
9+
进入你的工作目录,运行:
10+
11+
```shell
12+
sh -c "$(curl -fsSL https://download.devstream.io/download.sh)"
13+
```
14+
15+
!!! quote "可选"
16+
你可以将 `dtm` 移到 PATH 中。例如:`mv dtm /usr/local/bin/`
17+
18+
更多安装方式详见[安装dtm](../install.zh.md)。
19+
20+
## 2 配置
21+
22+
创建一个 `config.yaml` 文件,内容如下:
23+
24+
```yaml title="config.yaml"
25+
config:
26+
state:
27+
backend: local
28+
options:
29+
stateFile: devstream.state
30+
tools:
31+
- name: helm-installer
32+
instanceID: argocd
33+
```
34+
35+
其中 `instanceID` 为 "argocd",匹配了 "argocd" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。
36+
37+
通过 DevStream 安装 Helm 应用,你不需要搜索/阅读应用的官方文档,也不需要依次运行 `helm repo add` 等命令。你只需要知道应用的名称,将其作为 `instanceID` 的前缀,然后运行即可。这里是 [DevStream 支持的所有应用列表及前缀对应关系](../plugins/helm-installer/helm-installer.zh.md#3)。
38+
39+
## 3 初始化
40+
41+
运行以下命令以下载相应的插件:
42+
43+
```shell
44+
./dtm init -f config.yaml
45+
```
46+
47+
## 4 应用
48+
49+
运行以下命令以安装 Argo CD:
50+
51+
```shell
52+
./dtm apply -f config.yaml -y
53+
```
54+
55+
<script id="asciicast-549701" src="https://asciinema.org/a/549701.js" async></script>
56+
57+
## 5 检查结果
58+
59+
运行以下命令,可以看到 Argo CD 已经安装成功:
60+
61+
```shell
62+
kubectl get pods -n argocd
63+
```
64+
65+
<script id="asciicast-549703" src="https://asciinema.org/a/549703.js" async></script>
66+
67+
## 6 更进一步
68+
69+
DevStream 除了通过提供默认配置来简化应用部署,还提供了完整的 Helm values 文件的配置能力,详见[自定义Chart配置](../plugins/helm-installer/helm-installer.zh.md#22-chart)

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ nav:
129129
- GitOps:
130130
- use-cases/gitops/*.md
131131
- Reference:
132-
- use-cases/reference/*.md
132+
- use-cases/reference/*.md
133+
- use-cases/helm-installer*.md
133134
- Plugins:
134135
- plugins/plugins-list*.md
135136
- Helm Installer:

0 commit comments

Comments
 (0)