diff --git a/docs/plugins/helm-installer/argocd.md b/docs/plugins/helm-installer/argocd.md index 6994bef37..0718c6bff 100644 --- a/docs/plugins/helm-installer/argocd.md +++ b/docs/plugins/helm-installer/argocd.md @@ -1,5 +1,15 @@ # Install Argo CD with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `argocd`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: argocd +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/argocd.zh.md b/docs/plugins/helm-installer/argocd.zh.md index 975680b37..d2cb41c9e 100644 --- a/docs/plugins/helm-installer/argocd.zh.md +++ b/docs/plugins/helm-installer/argocd.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 Argo CD +## 前缀匹配 + +`instanceID` 的前缀需要是 `argocd`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: argocd +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/plugins/helm-installer/artifactory.md b/docs/plugins/helm-installer/artifactory.md index b5e614fda..3c8f3578c 100644 --- a/docs/plugins/helm-installer/artifactory.md +++ b/docs/plugins/helm-installer/artifactory.md @@ -1,5 +1,15 @@ # Install Artifactory with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `artifactory`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: artifactory +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/artifactory.zh.md b/docs/plugins/helm-installer/artifactory.zh.md index 48e504f19..3bc0c9d48 100644 --- a/docs/plugins/helm-installer/artifactory.zh.md +++ b/docs/plugins/helm-installer/artifactory.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 Artifactory +## 前缀匹配 + +`instanceID` 的前缀需要是 `artifactory`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: artifactory +``` + ## 默认配置 | key | default value | description | diff --git a/docs/plugins/helm-installer/devlake.md b/docs/plugins/helm-installer/devlake.md index 7a120d733..f1217d845 100644 --- a/docs/plugins/helm-installer/devlake.md +++ b/docs/plugins/helm-installer/devlake.md @@ -1,5 +1,15 @@ # Install DevLake with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `devlake`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: devlake +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/devlake.zh.md b/docs/plugins/helm-installer/devlake.zh.md index 8bd1f27d6..5bd4eff96 100644 --- a/docs/plugins/helm-installer/devlake.zh.md +++ b/docs/plugins/helm-installer/devlake.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 DevLake +## 前缀匹配 + +`instanceID` 的前缀需要是 `devlake`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: devlake +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/plugins/helm-installer/helm-installer.zh.md b/docs/plugins/helm-installer/helm-installer.zh.md index e5d02af9c..163fc7397 100644 --- a/docs/plugins/helm-installer/helm-installer.zh.md +++ b/docs/plugins/helm-installer/helm-installer.zh.md @@ -18,7 +18,7 @@ tools: ``` 在这个配置文件里,和插件相关的配置 name 和 instanceID,前者表示你将使用 `helm-installer` 插件,后者表示插件实例名。 -请注意这个 instanceID 使用了 "argocd-" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。 +请注意这个 instanceID 使用了 "argocd" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。 你可以在 [Install Argo CD with DevStream](./argocd.zh.md) 中查看 DevStream 为你设置了哪些默认值。 @@ -47,6 +47,7 @@ tools: chartName: "" version: "" namespace: "" + releaseName: "" wait: true timeout: 10m upgradeCRDs: true @@ -58,7 +59,7 @@ tools: ### 2.1、instanceID 使用技巧 instanceID 的前缀如果能够匹配到某个已经被支持的工具(详见文末列表),那么 DevStream 会为你设置一系列的默认值。 -比如 "argocd-001" 的前缀 "argocd-" 能够匹配到 "argocd" + "-",因此 Argo CD 的默认 Chart 配置会被应用,于是如下最小化配置: +比如 "argocd-001" 的前缀 "argocd-" 能够匹配到 "argocd",因此 Argo CD 的默认 Chart 配置会被应用,于是如下最小化配置: ```yaml tools: @@ -74,13 +75,14 @@ tools: dependsOn: [ ] options: repo: - name: "" - url: "" + name: "argo" + url: "https://argoproj.github.io/argo-helm" chart: chartPath: "" - chartName: "" + chartName: "argo/argo-cd" version: "" - namespace: "" + namespace: "argocd" + releaseName: "argocd" wait: true timeout: 10m upgradeCRDs: true diff --git a/docs/plugins/helm-installer/kube-prometheus.md b/docs/plugins/helm-installer/kube-prometheus.md index 1063e5047..a55259410 100644 --- a/docs/plugins/helm-installer/kube-prometheus.md +++ b/docs/plugins/helm-installer/kube-prometheus.md @@ -1,5 +1,15 @@ # Install kube-prometheus with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `kube-prometheus`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: kube-prometheus +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/kube-prometheus.zh.md b/docs/plugins/helm-installer/kube-prometheus.zh.md index 01fcc68cd..9b43aa03b 100644 --- a/docs/plugins/helm-installer/kube-prometheus.zh.md +++ b/docs/plugins/helm-installer/kube-prometheus.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 kube-prometheus +## 前缀匹配 + +`instanceID` 的前缀需要是 `kube-prometheus`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: kube-prometheus +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/plugins/helm-installer/openldap.md b/docs/plugins/helm-installer/openldap.md index ca873d3a4..f7ee74428 100644 --- a/docs/plugins/helm-installer/openldap.md +++ b/docs/plugins/helm-installer/openldap.md @@ -1,5 +1,15 @@ # Install OpenLDAP with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `openldap`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: openldap +``` + ### Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/openldap.zh.md b/docs/plugins/helm-installer/openldap.zh.md index 0f6c34cb8..9e48c3556 100644 --- a/docs/plugins/helm-installer/openldap.zh.md +++ b/docs/plugins/helm-installer/openldap.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 OpenLDAP +## 前缀匹配 + +`instanceID` 的前缀需要是 `openldap`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: openldap +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/plugins/helm-installer/sonarqube.md b/docs/plugins/helm-installer/sonarqube.md index 374144261..4651dd9bf 100644 --- a/docs/plugins/helm-installer/sonarqube.md +++ b/docs/plugins/helm-installer/sonarqube.md @@ -1,5 +1,15 @@ # Install SonarQube with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `sonarqube`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: sonarqube +``` + ### Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/tekton.md b/docs/plugins/helm-installer/tekton.md index 2fd9f7b4d..4b4ed8472 100644 --- a/docs/plugins/helm-installer/tekton.md +++ b/docs/plugins/helm-installer/tekton.md @@ -1,5 +1,15 @@ # Install Tekton with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `tekton`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: tekton +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/tekton.zh.md b/docs/plugins/helm-installer/tekton.zh.md index ee4467799..d283ef2a3 100644 --- a/docs/plugins/helm-installer/tekton.zh.md +++ b/docs/plugins/helm-installer/tekton.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 Tekton +## 前缀匹配 + +`instanceID` 的前缀需要是 `tekton`,最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: tekton +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/plugins/helm-installer/vault.md b/docs/plugins/helm-installer/vault.md index 8efd093a4..0c3fdf818 100644 --- a/docs/plugins/helm-installer/vault.md +++ b/docs/plugins/helm-installer/vault.md @@ -1,5 +1,15 @@ # Install Vault with DevStream +## InstanceID Prefix + +The `instanceID` prefix must be `vault`, the minimum tools configuration example: + +```yaml +tools: +- name: helm-installer + instanceID: vault +``` + ## Default Configs | key | default value | description | diff --git a/docs/plugins/helm-installer/vault.zh.md b/docs/plugins/helm-installer/vault.zh.md index 42e196eda..15fd75f37 100644 --- a/docs/plugins/helm-installer/vault.zh.md +++ b/docs/plugins/helm-installer/vault.zh.md @@ -1,5 +1,15 @@ # 使用 DevStream 部署 Vault +## 前缀匹配 + +`instanceID` 的前缀需要是 `vault`, 最小化 tools 配置示例: + +```yaml +tools: +- name: helm-installer + instanceID: vault +``` + ## 默认配置 | 配置项 | 默认值 | 描述 | diff --git a/docs/use-cases/helm-installer.md b/docs/use-cases/helm-installer.md new file mode 100644 index 000000000..aed4c1515 --- /dev/null +++ b/docs/use-cases/helm-installer.md @@ -0,0 +1 @@ +# Replacing Helm with DevStream Makes Application Deployment Easier diff --git a/docs/use-cases/helm-installer.zh.md b/docs/use-cases/helm-installer.zh.md new file mode 100644 index 000000000..e2e6a12b9 --- /dev/null +++ b/docs/use-cases/helm-installer.zh.md @@ -0,0 +1,69 @@ +# 用 DevStream 替代 Helm 让应用部署更加简单 + +helm-installer 插件实现了比 helm 更加简单和容易上手的方式来快速部署提供了 Helm Chart 的应用。 + +下面以 Argo CD 为例,介绍如何使用 DevStream 部署 Argo CD。 + +## 1 下载 + +进入你的工作目录,运行: + +```shell +sh -c "$(curl -fsSL https://download.devstream.io/download.sh)" +``` + +!!! quote "可选" + 你可以将 `dtm` 移到 PATH 中。例如:`mv dtm /usr/local/bin/`。 + + 更多安装方式详见[安装dtm](../install.zh.md)。 + +## 2 配置 + +创建一个 `config.yaml` 文件,内容如下: + +```yaml title="config.yaml" +config: + state: + backend: local + options: + stateFile: devstream.state +tools: +- name: helm-installer + instanceID: argocd +``` + +其中 `instanceID` 为 "argocd",匹配了 "argocd" 前缀,DevStream 会识别这个前缀,尝试寻找 Argo CD 应用对应的 Chart,并设置一系列默认值,然后开始部署。 + +通过 DevStream 安装 Helm 应用,你不需要搜索/阅读应用的官方文档,也不需要依次运行 `helm repo add` 等命令。你只需要知道应用的名称,将其作为 `instanceID` 的前缀,然后运行即可。这里是 [DevStream 支持的所有应用列表及前缀对应关系](../plugins/helm-installer/helm-installer.zh.md#3)。 + +## 3 初始化 + +运行以下命令以下载相应的插件: + +```shell +./dtm init -f config.yaml +``` + +## 4 应用 + +运行以下命令以安装 Argo CD: + +```shell +./dtm apply -f config.yaml -y +``` + + + +## 5 检查结果 + +运行以下命令,可以看到 Argo CD 已经安装成功: + +```shell +kubectl get pods -n argocd +``` + + + +## 6 更进一步 + +DevStream 除了通过提供默认配置来简化应用部署,还提供了完整的 Helm values 文件的配置能力,详见[自定义Chart配置](../plugins/helm-installer/helm-installer.zh.md#22-chart) diff --git a/mkdocs.yml b/mkdocs.yml index 30656b410..927ae4683 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -129,7 +129,8 @@ nav: - GitOps: - use-cases/gitops/*.md - Reference: - - use-cases/reference/*.md + - use-cases/reference/*.md + - use-cases/helm-installer*.md - Plugins: - plugins/plugins-list*.md - Helm Installer: