diff --git a/docs/best-practices/air-gapped-deployment.zh.md b/docs/best-practices/air-gapped-deployment.zh.md index ac55f8060..67611623a 100644 --- a/docs/best-practices/air-gapped-deployment.zh.md +++ b/docs/best-practices/air-gapped-deployment.zh.md @@ -1,5 +1,7 @@ # 离线部署 +// TODO(daniel-hutao): to update according helm-installer plugin added. + 本文将和你介绍如何在离线环境中使用 DevStream。 !!! info "提醒" @@ -51,8 +53,8 @@ harbor-linux-amd64_0.9.1.md5 harbor-linux-amd64_0.9.1.so jenkins-linux-amd64_0 如果 DevStream 的某个插件是使用容器化方式部署一个应用,那么其在支持离线部署的时候,就一定会提供镜像列表。比如 Jenkins 和 Harbor 的镜像列表分别如下: -1. [Jenkins images](../plugins/jenkins/jenkins-images.txt) -2. [Harbor images](../plugins/harbor/harbor-images.txt) +1. [Jenkins images](../plugins/helm-installer/jenkins/jenkins-images.txt) +2. [Harbor images](../plugins/helm-installer/harbor/harbor-images.txt) 你可以通过如下命令将镜像列表下载到本地: @@ -171,7 +173,7 @@ harbor-1.10.0.tgz jenkins-4.2.5.tgz tag: 0.2.0 ``` - 关于 jenkins 插件的详细文档可以看[ jenkins 插件文档](../plugins/jenkins.zh.md)。 + 关于 jenkins 插件的详细文档可以看[ jenkins 插件文档](../plugins/helm-installer/helm-installer.zh.md)。 === "harbor 插件" @@ -274,7 +276,7 @@ harbor-1.10.0.tgz jenkins-4.2.5.tgz accessMode: ReadWriteOnce size: 1Gi ``` - 关于 harbor 插件的详细文档可以看[ harbor 插件文档](../plugins/harbor.zh.md)。 + 关于 harbor 插件的详细文档可以看[ harbor 插件文档](../plugins/helm-installer/helm-installer.zh.md)。 ### 4.2、编写主配置和变量配置 diff --git a/docs/best-practices/gitlab-jenkins-harbor.zh.md b/docs/best-practices/gitlab-jenkins-harbor.zh.md index b4c1e0c1b..2710ccb9d 100644 --- a/docs/best-practices/gitlab-jenkins-harbor.zh.md +++ b/docs/best-practices/gitlab-jenkins-harbor.zh.md @@ -1,5 +1,7 @@ # 本地部署 GitLab + Jenkins + Harbor 工具链 +// TODO(daniel-hutao): to update according helm-installer plugin added. + !!! abstract "概述" 本文将介绍如何通过 DevStream 在本地部署 `GitLab + Jenkins + Harbor` 工具链,并且以 Java Spring Boot 项目为例, @@ -22,8 +24,8 @@ - **工具链搭建** - [`gitlab-ce-docker`](../plugins/gitlab-ce-docker.zh.md):本地部署 GitLab 环境; - - [`jenkins`](../plugins/jenkins.zh.md):本地部署 Jenkins 环境; - - [`harbor`](../plugins/harbor.zh.md):本地部署 Harbor 环境。 + - [`jenkins`](../plugins/helm-installer/helm-installer.zh.md):本地部署 Jenkins 环境; + - [`harbor`](../plugins/helm-installer/helm-installer.zh.md):本地部署 Harbor 环境。 - **工具链使用** - [`repo-scaffolding`](../plugins/repo-scaffolding.zh.md):创建 Java Spring Boot 项目脚手架; - [`jenkins-pipeline`](../plugins/jenkins-pipeline.zh.md):在 Jenkins 上创建 Pipeline,并打通 GitLab 与 Jenkins,实现 GitLab 上发生 Push/Merge 等事件时触发 Jenkins Pipeline 运行,并且让 Pipeline 状态能够回写到 GitLab。 @@ -114,7 +116,7 @@ === "jenkins 插件" - jenkins 插件的配置如下(该插件的详细文档参见[ jenkins 插件文档](../plugins/jenkins.zh.md)): + jenkins 插件的配置如下(该插件的详细文档参见[ jenkins 插件文档](../plugins/helm-installer/helm-installer.zh.md)): ```yaml title="Plugin Config with jenkins" - name: jenkins @@ -161,7 +163,7 @@ === "harbor 插件" - harbor 插件的配置如下(该插件的详细文档参见[ harbor 插件文档](../plugins/harbor.zh.md)): + harbor 插件的配置如下(该插件的详细文档参见[ harbor 插件文档](../plugins/helm-installer/helm-installer.zh.md)): ```yaml title="Plugin Config with harbor" - name: harbor diff --git a/docs/best-practices/gitops.md b/docs/best-practices/gitops.md index dd2ad8577..d0e6f1e6a 100644 --- a/docs/best-practices/gitops.md +++ b/docs/best-practices/gitops.md @@ -1,5 +1,7 @@ # GitOps Toolchain +// TODO(daniel-hutao): to update according helm-installer plugin added. + If you are interested in watching a video demo, see the youtube video below: @@ -19,7 +21,7 @@ For Chinese readers, watch this one instead: 1. [repo-scaffolding](../plugins/repo-scaffolding.md) 2. [jira-github](../plugins/jira-github-integ.md) 3. [githubactions-golang](../plugins/githubactions-golang.md) -4. [argocd](../plugins/argocd.md) +4. [argocd](../plugins/helm-installer/helm-installer.md) 5. [argocdapp](../plugins/argocdapp.md) The dependencies of these plugins are(`a -> b` means for `a depends on b`): diff --git a/docs/best-practices/gitops.zh.md b/docs/best-practices/gitops.zh.md index a283e1283..3973c1c55 100644 --- a/docs/best-practices/gitops.zh.md +++ b/docs/best-practices/gitops.zh.md @@ -1,5 +1,7 @@ # GitOps 工具链 +// TODO(daniel-hutao): to update according helm-installer plugin added. + 请参考视频demo来快速熟悉用DevStream来实施GitOps工具链的部署和整合: - YouTube @@ -11,7 +13,7 @@ 1. [repo-scaffolding](../plugins/repo-scaffolding.zh.md) 2. [jira-github](../plugins/jira-github-integ.zh.md) 3. [githubactions-golang](../plugins/githubactions-golang.zh.md) -4. [argocd](../plugins/argocd.zh.md) +4. [argocd](../plugins/helm-installer/helm-installer.zh.md) 5. [argocdapp](../plugins/argocdapp.zh.md) 这些插件的依赖关系如下(`a -> b`意味着`a依赖b`): diff --git a/docs/plugins/argocdapp.md b/docs/plugins/argocdapp.md index 8c1ee6930..a9b67aea3 100644 --- a/docs/plugins/argocdapp.md +++ b/docs/plugins/argocdapp.md @@ -5,7 +5,7 @@ This plugin creates an [ArgoCD Application](https://argo-cd.readthedocs.io/en/st **Notes:** - ArgoCD itself must have been already installed before the usage of this plugin. - To install ArgoCD, use the [argocd plugin](./argocd.md). + To install ArgoCD, use the [helm-installer plugin](./helm-installer/argocd.md). Or you can use both plugins(argocd+argocdapp) at the same time. See [GitOps Toolchain](../best-practices/gitops.md) for more info. - Currently, only the Helm chart is supported when creating the ArgoCD application. diff --git a/docs/plugins/helm-installer/argocd.md b/docs/plugins/helm-installer/argocd.md index d0ba2aefb..6994bef37 100644 --- a/docs/plugins/helm-installer/argocd.md +++ b/docs/plugins/helm-installer/argocd.md @@ -1,3 +1,16 @@ # Install Argo CD with DevStream -//TODO(daniel-hutao): to be updated +## Default Configs + +| key | default value | description | +| ---------------- | ------------------------------------ | ------------------------------------------------ | +| chart.chartPath | "" | local chart path | +| chart.chartName | argo/argo-cd | chart name | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 10 minutes to deploy Argo CD | +| chart.upgradeCRDs | true | default update CRD config | +| chart.releaseName | argocd | helm release name | +| chart.namespace | argocd | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | +| repo.url | https://argoproj.github.io/argo-helm | helm official repo address | +| repo.name | argo | helm repo name | diff --git a/docs/plugins/helm-installer/argocd.zh.md b/docs/plugins/helm-installer/argocd.zh.md index c8e9320dd..975680b37 100644 --- a/docs/plugins/helm-installer/argocd.zh.md +++ b/docs/plugins/helm-installer/argocd.zh.md @@ -1,3 +1,16 @@ # 使用 DevStream 部署 Argo CD -//TODO(daniel-hutao): to be updated +## 默认配置 + +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | argo/argo-cd | chart 包名称 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | +| chart.releaseName | argocd | helm 发布名称 | +| chart.namespace | argocd | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://argoproj.github.io/argo-helm | helm 仓库地址 | +| repo.name | argo | helm 仓库名 | diff --git a/docs/plugins/helm-installer/artifactory.md b/docs/plugins/helm-installer/artifactory.md index 2da82aad5..b5e614fda 100644 --- a/docs/plugins/helm-installer/artifactory.md +++ b/docs/plugins/helm-installer/artifactory.md @@ -1,12 +1,20 @@ # Install Artifactory with DevStream -//TODO(daniel-hutao): to be updated +## Default Configs -This plugin installs [artifactory](https://jfrog.com/artifactory/) in an existing Kubernetes cluster using the Helm chart. - -## Usage +| key | default value | description | +| ---- | ---- | ---- | +| chart.chartPath | "" | local chart path | +| chart.chartName | jfrog/artifactory | chart name | +| chart.timeout | 10m | this config will wait 10 minutes to deploy | +| chart.releaseName | artifactory | helm release name | +| chart.upgradeCRDs | true | default update CRD config | +| chart.wait | true | whether to wait until installation is complete | +| chart.namespace | artifactory | namespace where helm to deploy | +| repo.url | https://charts.jfrog.io | offical helm repo address | +| repo.name | jfrog | helm repo name | -### Test/Local Dev Environment +## Test/Local Dev Environment If you want to **test the plugin locally**, The following `valuesYaml` configuration can be used @@ -26,41 +34,16 @@ In this configuration - local disks on machines in the cluster are defaulted used for data mounting. - Using `nodePort` to expose service, You can access `artifactory` by domain `http://{{k8s node IP}}:30002`. The default account name and password are admin/password (please replace the default account password in the production environment). -### Production Environment +## Production Environment -#### External Storage +### External Storage - PostgreSQL: Set the `database.url` to Postgresql's address. More info can be found in [Config](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Database). -#### Disk Storage +### Disk Storage You can set `customVolumes` and `customVolumeMounts` for this service. More info can be found in [Config](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Filestore). -#### Network Config - -This plugin support`Ingress`, `ClusterIP`, `NodePort` and `LoadBalancer` , You can give choice to your needs. - -### Config - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). +### Network Config -```yaml ---8<-- "artifactory.yaml" -``` - -#### Default Configs - -| key | default value | description | -| ---- | ---- | ---- | -| chart.chartPath | "" | local chart path | -| chart.chartName | jfrog/artifactory | chart name | -| chart.timeout | 10m | this config will wait 10 minutes to deploy | -| chart.releaseName | artifactory | helm release name | -| chart.upgradeCRDs | true | default update CRD config | -| chart.wait | true | whether to wait until installation is complete | -| chart.namespace | artifactory | namespace where helm to deploy | -| repo.url | https://charts.jfrog.io | offical helm repo address | -| repo.name | jfrog | helm repo name | -Currently, except for `valuesYaml` and default configs, all the parameters in the example above are mandatory. +This plugin support `Ingress`, `ClusterIP`, `NodePort` and `LoadBalancer` , You can give choice to your needs. diff --git a/docs/plugins/helm-installer/artifactory.zh.md b/docs/plugins/helm-installer/artifactory.zh.md index 8fad5435c..48e504f19 100644 --- a/docs/plugins/helm-installer/artifactory.zh.md +++ b/docs/plugins/helm-installer/artifactory.zh.md @@ -1,12 +1,21 @@ # 使用 DevStream 部署 Artifactory -//TODO(daniel-hutao): to be updated +## 默认配置 -这个插件使用 helm 在已有的 k8s 集群上安装 [artifactory](https://jfrog.com/artifactory/)。 - -## 使用方法 +| key | default value | description | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | jfrog/artifactory | chart 名称 | +| chart.version | "" | chart 版本 | +| chart.timeout | 10m | 等待部署成功的时间 | +| chart.upgradeCRDs | true | 默认更新 CRD 配置(如果存在的话) | +| chart.releaseName | artifactory | helm 发布名称 | +| chart.namespace | artifactory | helm 部署的命名空间名称 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://charts.jfrog.io | helm 官方仓库地址 | +| repo.name | jfrog | helm 仓库名 | -### 测试环境 +## 测试环境 如果你想在**本地测试插件**, 可以使用如下 `valuesYaml` 配置。 @@ -26,42 +35,16 @@ valuesYaml: | - 数据挂载的磁盘默认会使用集群上机器的本地磁盘; - 通过 `NodePort` 对外暴露服务,可使用 `http://{{k8s 节点ip}}:30002` 域名来访问,默认账号名密码为 admin/password (生产环境请替换默认账号密码)。 -### 生产环境 +## 生产环境 -#### 外部存储 +### 外部存储 - PostgreSQL:设置 `database.url` 来设置数据库地址,具体配置可参考 [Config](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Database) 中的选项。 -#### 磁盘存储 +### 磁盘存储 可以设置 `customVolumes` 和 `customVolumeMounts` 来配置挂载磁盘,具体配置可参考 [Config](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Filestore)。 -#### 网络层配置 +### 网络层配置 该插件支持 `Ingress`, `ClusterIP`, `NodePort`, `LoadBalancer` 对外暴露的模式,可以基于需求进行选择。 - -### 配置 - -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - -```yaml ---8<-- "artifactory.yaml" -``` - -#### 默认配置 - -| key | default value | description | -| ---- | ---- | ---- | -| chart.chartPath | "" | 本地 chart 包路径 | -| chart.chartName | jfrog/artifactory | helm 包名称 | -| chart.timeout | 10m | 等待部署成功的时间 | -| chart.upgradeCRDs | true | 默认更新 CRD 配置(如果存在的话) | -| chart.releaseName | artifactory | helm 发布名称 | -| chart.wait | true | 是否等待部署完成 | -| chart.namespace | artifactory | helm 部署的命名空间名称 | -| repo.url | https://charts.jfrog.io | helm 官方仓库地址 | -| repo.name | jfrog | helm 仓库名 | - -目前除了 `valuesYaml` 字段和默认配置,其它所有示例参数均为必填项。 diff --git a/docs/plugins/helm-installer/devlake.md b/docs/plugins/helm-installer/devlake.md index dafe0fb83..7a120d733 100644 --- a/docs/plugins/helm-installer/devlake.md +++ b/docs/plugins/helm-installer/devlake.md @@ -1,13 +1,16 @@ # Install DevLake with DevStream -//TODO(daniel-hutao): to be updated +## Default Configs -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -``` yaml ---8<-- "devlake.yaml" -``` +| key | default value | description | +| ---------------- | ------------------------------------ | ------------------------------------------------ | +| chart.chartPath | "" | local chart path | +| chart.chartName | "devlake/devlake | chart name | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 10 minutes to deploy DevLake | +| chart.upgradeCRDs | true | default update CRD config | +| chart.releaseName | devlake | helm release name | +| chart.namespace | devlake | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | +| repo.url | https://merico-dev.github.io/devlake-helm-chart | helm official repo address | +| repo.name | devlake | helm repo name | diff --git a/docs/plugins/helm-installer/devlake.zh.md b/docs/plugins/helm-installer/devlake.zh.md index f9c76513c..8bd1f27d6 100644 --- a/docs/plugins/helm-installer/devlake.zh.md +++ b/docs/plugins/helm-installer/devlake.zh.md @@ -1,13 +1,16 @@ # 使用 DevStream 部署 DevLake -//TODO(daniel-hutao): to be updated +## 默认配置 -## 用例 - -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - -``` yaml ---8<-- "devlake.yaml" -``` +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | devlake/devlake | chart 包名称 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | +| chart.releaseName | devlake | helm 发布名称 | +| chart.namespace | devlake | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://merico-dev.github.io/devlake-helm-chart | helm 仓库地址 | +| repo.name | devlake | helm 仓库名 | diff --git a/docs/plugins/helm-installer/harbor.md b/docs/plugins/helm-installer/harbor.md index 57ba2d82a..6a43b19ca 100644 --- a/docs/plugins/helm-installer/harbor.md +++ b/docs/plugins/helm-installer/harbor.md @@ -1,15 +1,5 @@ # Install Harbor with DevStream -//TODO(daniel-hutao): to be updated - -The `harbor` plugin is used to deploy and manage [Harbor](https://goharbor.io/). - -Currently, two popular ways to deploy Harbor are using _docker compose_or _helm_. - -There are also two DevStream plugins, `harbor-docker` (docker-compose deployment) and `harbor` (helm deployment.) They will be merged into one soon, but we mainly use the helm one at the moment. - -In this doc, we will do a development environment deploy with minikube/kind. You can do the same in any Kubernetes cluster, but some steps need adjustment. - ## 1 Prerequisites - An existing Kubernetes cluster, version > 1.10 @@ -29,41 +19,34 @@ Examples: ## 2 Harbor Architecture -![Harbor Architecture](./harbor/ha.png) +![Harbor Architecture](../harbor/ha.png) ## 3 Using the Harbor Plugin with DevStream ### 3.1 Quickstart -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - For a local testing and developing purpose, we can deploy Harbor quickly using the minimal config as follows: ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - externalURL: http://127.0.0.1 - expose: - type: nodePort - tls: - enabled: false - chartmuseum: - enabled: false - notary: - enabled: false - trivy: + valuesYaml: | + externalURL: http://127.0.0.1 + expose: + type: nodePort + tls: enabled: false + chartmuseum: + enabled: false + notary: + enabled: false + trivy: + enabled: false ``` -_Note: the config above is the "tool config" of DevStream. For a full DevStream config, we need the core config. See [here](../core-concepts/config.md)._ - After running `dtm apply`, we can see the following resources in the "harbor" namespace: - **Deployment** (`kubectl get deployment -n harbor`) @@ -142,12 +125,11 @@ We can forward the port of the Harbor service and log in: kubectl port-forward -n harbor service/harbor 8080:80 ``` -![Harbor Login](./harbor/login.png) +![Harbor Login](../harbor/login.png) And the default login user/pwd is: `admin/Harbor12345`. You will see the dashboard after a successful login: -![Harbor Dashboard](./harbor/dashboard.png) - +![Harbor Dashboard](../harbor/dashboard.png) ### 3.3 Default Config @@ -157,16 +139,11 @@ The `harbor` plugin provides default values for many options: | ---- | ---- | ---- | | chart.chartPath | "" | local chart path | | chart.chartName | harbor/harbor | helm chart name | +| chart.version | "" | chart version | | chart.timeout | 10m | timeout for helm install | | chart.upgradeCRDs | true | update CRDs or not (if any) | | chart.releaseName | harbor | helm release name | -| chart.wait | true | wait till deployment finishes | | chart.namespace | harbor | namespace | +| chart.wait | true | wait till deployment finishes | | repo.url | https://helm.goharbor.io | helm repo URL | | repo.name | harbor | helm repo name | - -A maximum config is as follows: - -```yaml ---8<-- "harbor.yaml" -``` diff --git a/docs/plugins/helm-installer/harbor.zh.md b/docs/plugins/helm-installer/harbor.zh.md index f75f16ff2..b632d21b6 100644 --- a/docs/plugins/helm-installer/harbor.zh.md +++ b/docs/plugins/helm-installer/harbor.zh.md @@ -1,13 +1,5 @@ # 使用 DevStream 部署 Harbor -//TODO(daniel-hutao): to be updated - -`harbor` 插件用于部署、管理 [Harbor](https://goharbor.io/) 应用。 - -Harbor 的主流部署方式有2种:**docker compose** 和 **helm**。 -现在 DevStream 有2个插件 `harbor-docker` 和 `harbor` 来分别支持这2种部署方式,但是目前以 helm 方式为主。 -在不久的将来,这两个插件将会被合并成一个。 - ## 1、前置要求 **必须满足** @@ -26,7 +18,7 @@ Harbor 本身并不关注如何实现存储高可用,所以 Harbor 通过 PVCs Harbor 部署架构整体如下图所示(图片来自 Harbor 官网): -![Harbor Architecture](./harbor/ha.png) +![Harbor Architecture](../harbor/ha.png) ## 3、开始部署 @@ -41,35 +33,28 @@ minikube 方式部署的 k8s 集群自带一个默认的 StorageClass,另外 ### 3.1、快速开始 -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - 如果仅是用于开发、测试等目的,希望快速完成 Harbor 的部署,可以使用如下配置快速开始: ```yaml title="config.yaml" -tools: # (1) -- name: harbor - instanceID: default +tools: +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - externalURL: http://127.0.0.1 - expose: - type: nodePort - tls: - enabled: false - chartmuseum: - enabled: false - notary: - enabled: false - trivy: + valuesYaml: | + externalURL: http://127.0.0.1 + expose: + type: nodePort + tls: enabled: false + chartmuseum: + enabled: false + notary: + enabled: false + trivy: + enabled: false ``` -1. 注意:这个配置示例仅是 tool config,完整的 DevStream 配置文件还需要补充 core config 等内容,具体参考[这个文档](../core-concepts/config.zh.md)。 - 在成功执行 `dtm apply` 命令后,我们可以在 harbor 命名空间下看到下述主要资源: - **Deployment** (`kubectl get deployment -n harbor`) @@ -145,11 +130,11 @@ standard (default) k8s.io/minikube-hostpath Delete Immediate 到这里,我们就可以通过 http://127.0.0.1:3002 访问到 Harbor 登录页面了,如下: -![Harbor Login](./harbor/login.png) +![Harbor Login](../harbor/login.png) 默认登录账号/密码是 `admin/Harbor12345`。登录后,可以看到默认首页如下: -![Harbor Dashboard](./harbor/dashboard.png) +![Harbor Dashboard](../harbor/dashboard.png) 如果是在云主机上部署的 Harbor,可以通过 `kubectl port-forward` 命令来暴露服务: @@ -162,11 +147,9 @@ kubectl port-forward -n harbor service/harbor --address=${ip} 80 ### 3.2、默认配置 -`harbor` 插件的配置项多数都有默认值,具体默认值信息如下表: - | 配置项 | 默认值 | 描述 | | ---- | ---- | ---- | -| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartPath | "" | 本地 chart 包路径 | | chart.chartName | harbor/harbor | helm chart 包名称 | | chart.timeout | 10m | helm install 的超时时间 | | chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | @@ -178,12 +161,6 @@ kubectl port-forward -n harbor service/harbor --address=${ip} 80 因此完整的配置文件应该是这样: -```yaml ---8<-- "harbor.yaml" -``` - -目前除了 `valuesYaml` 字段和默认配置,其它所有示例参数均为必填项。 - ### 3.3、持久化存储数据 前面我们已经看到了如果不指定 StorageClass,Harbor 会使用集群内的 default StorageClass。 @@ -227,30 +204,29 @@ registry、jobservice、chartmuseum、database、redis、trivy 等组件都可 ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - persistence: - persistentVolumeClaim: - registry: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 5Gi - jobservice: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - database: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - redis: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi + valuesYaml: | + persistence: + persistentVolumeClaim: + registry: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 5Gi + jobservice: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + database: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + redis: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi ``` ### 3.4、服务暴露 @@ -259,35 +235,33 @@ Harbor 可以以 ClusterIP、LoadBalancer、NodePort 和 Ingress 等方式对外 ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - externalURL: http://127.0.0.1 - expose: - type: nodePort + valuesYaml: | + externalURL: http://127.0.0.1 + expose: + type: nodePort ``` 接下来我们再介绍一下如何使用 Ingress 方式暴露服务: ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - externalURL: http://core.harbor.domain - expose: - type: ingress - tls: - enabled: false - ingress: - hosts: - core: core.harbor.domain + valuesYaml: | + externalURL: http://core.harbor.domain + expose: + type: ingress + tls: + enabled: false + ingress: + hosts: + core: core.harbor.domain ``` 注意:如果没有开启 TLS,这种方式暴露 Harbor 服务后 docker push/pull 命令必须带上端口。 @@ -330,44 +304,43 @@ TODO(daniel-hutao): 本节待细化 ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: - chart: - valuesYaml: | - externalURL: http://core.harbor.domain - expose: - type: ingress - tls: - enabled: false - ingress: - hosts: - core: core.harbor.domain - chartmuseum: - enabled: false - notary: + valuesYaml: | + externalURL: http://core.harbor.domain + expose: + type: ingress + tls: enabled: false - trivy: - enabled: false - persistence: - persistentVolumeClaim: - registry: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 5Gi - jobservice: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - database: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - redis: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi + ingress: + hosts: + core: core.harbor.domain + chartmuseum: + enabled: false + notary: + enabled: false + trivy: + enabled: false + persistence: + persistentVolumeClaim: + registry: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 5Gi + jobservice: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + database: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + redis: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi ``` 部署完成后,可以看到 Ingress 配置如下(`kubectl get ingress -n harbor): @@ -420,8 +393,8 @@ helm pull harbor/harbor --version=1.10.0 ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: chart: @@ -492,7 +465,7 @@ valuesYaml: | tag: v2.5.3 ``` -这段配置中留了一个变量 `[[ imageRepo ]]`,你可以在[变量配置](../core-concepts/variables.zh.md)中定义这个变量,变量值设置成你的镜像仓库地址,例如: +这段配置中留了一个变量 `[[ imageRepo ]]`,你可以在[变量配置](../../core-concepts/variables.zh.md)中定义这个变量,变量值设置成你的镜像仓库地址,例如: ```yaml imageRepo: harbor.example.com:9000 @@ -517,7 +490,7 @@ export IMAGE_REPO_ADDR=harbor.devstream.io ./image-pull-push.sh -f harbor-images.txt -r ${IMAGE_REPO_ADDR} -l -u ``` -如果你还没有一个私有镜像仓库,可以参考[这篇文章](../best-practices/image-registry.zh.md)快速部署一个 Docker Registry。 +如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../best-practices/image-registry.zh.md)快速部署一个 Docker Registry。 ### 5.3、参考配置 @@ -531,98 +504,98 @@ imageRepo: harbor.example.com:9000 --- # plugin config tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: harbor-001 dependsOn: [ ] options: chart: chartPath: "~/devstream-test/harbor-1.10.0.tgz" - valuesYaml: | - externalURL: http://core.harbor.domain - expose: - type: ingress - tls: - enabled: false - ingress: - hosts: - core: core.harbor.domain - nginx: - image: - repository: [[ imageRepo ]]/goharbor/nginx-photon - tag: v2.5.3 - portal: + valuesYaml: | + externalURL: http://core.harbor.domain + expose: + type: ingress + tls: + enabled: false + ingress: + hosts: + core: core.harbor.domain + nginx: + image: + repository: [[ imageRepo ]]/goharbor/nginx-photon + tag: v2.5.3 + portal: + image: + repository: [[ imageRepo ]]/goharbor/harbor-portal + tag: v2.5.3 + core: + image: + repository: [[ imageRepo ]]/goharbor/harbor-core + tag: v2.5.3 + jobservice: + image: + repository: [[ imageRepo ]]/goharbor/harbor-jobservice + tag: v2.5.3 + registry: + registry: image: - repository: [[ imageRepo ]]/goharbor/harbor-portal + repository: [[ imageRepo ]]/goharbor/registry-photon tag: v2.5.3 - core: + controller: image: - repository: [[ imageRepo ]]/goharbor/harbor-core + repository: [[ imageRepo ]]/goharbor/harbor-registryctl tag: v2.5.3 - jobservice: + chartmuseum: + enabled: false + image: + repository: [[ imageRepo ]]/goharbor/chartmuseum-photon + tag: v2.5.3 + trivy: + enabled: false + image: + repository: [[ imageRepo ]]/goharbor/trivy-adapter-photon + tag: v2.5.3 + notary: + enabled: false + server: image: - repository: [[ imageRepo ]]/goharbor/harbor-jobservice + repository: [[ imageRepo ]]/goharbor/notary-server-photon tag: v2.5.3 - registry: - registry: - image: - repository: [[ imageRepo ]]/goharbor/registry-photon - tag: v2.5.3 - controller: - image: - repository: [[ imageRepo ]]/goharbor/harbor-registryctl - tag: v2.5.3 - chartmuseum: - enabled: false + signer: image: - repository: [[ imageRepo ]]/goharbor/chartmuseum-photon + repository: [[ imageRepo ]]/goharbor/notary-signer-photon tag: v2.5.3 - trivy: - enabled: false + database: + internal: image: - repository: [[ imageRepo ]]/goharbor/trivy-adapter-photon + repository: [[ imageRepo ]]/goharbor/harbor-db tag: v2.5.3 - notary: - enabled: false - server: - image: - repository: [[ imageRepo ]]/goharbor/notary-server-photon - tag: v2.5.3 - signer: - image: - repository: [[ imageRepo ]]/goharbor/notary-signer-photon - tag: v2.5.3 - database: - internal: - image: - repository: [[ imageRepo ]]/goharbor/harbor-db - tag: v2.5.3 - redis: - internal: - image: - repository: [[ imageRepo ]]/goharbor/redis-photon - tag: v2.5.3 - exporter: + redis: + internal: image: - repository: [[ imageRepo ]]/goharbor/harbor-exporter + repository: [[ imageRepo ]]/goharbor/redis-photon tag: v2.5.3 - persistence: - persistentVolumeClaim: - registry: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 5Gi - jobservice: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - database: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi - redis: - storageClass: "nfs" - accessMode: ReadWriteOnce - size: 1Gi + exporter: + image: + repository: [[ imageRepo ]]/goharbor/harbor-exporter + tag: v2.5.3 + persistence: + persistentVolumeClaim: + registry: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 5Gi + jobservice: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + database: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi + redis: + storageClass: "nfs" + accessMode: ReadWriteOnce + size: 1Gi ``` 在这个参考配置里包含了全部可能用到的镜像,在部分组件不启用的情况下你完全可以移除相关的镜像配置项。不过保留在这里也不会有什么影响。 diff --git a/docs/plugins/harbor/dashboard.png b/docs/plugins/helm-installer/harbor/dashboard.png similarity index 100% rename from docs/plugins/harbor/dashboard.png rename to docs/plugins/helm-installer/harbor/dashboard.png diff --git a/docs/plugins/harbor/ha.png b/docs/plugins/helm-installer/harbor/ha.png similarity index 100% rename from docs/plugins/harbor/ha.png rename to docs/plugins/helm-installer/harbor/ha.png diff --git a/docs/plugins/harbor/harbor-images.txt b/docs/plugins/helm-installer/harbor/harbor-images.txt similarity index 100% rename from docs/plugins/harbor/harbor-images.txt rename to docs/plugins/helm-installer/harbor/harbor-images.txt diff --git a/docs/plugins/harbor/login.png b/docs/plugins/helm-installer/harbor/login.png similarity index 100% rename from docs/plugins/harbor/login.png rename to docs/plugins/helm-installer/harbor/login.png diff --git a/docs/plugins/helm-installer/helm-installer.md b/docs/plugins/helm-installer/helm-installer.md index 2a17efc3c..76b663c49 100644 --- a/docs/plugins/helm-installer/helm-installer.md +++ b/docs/plugins/helm-installer/helm-installer.md @@ -1,24 +1,3 @@ # helm-installer Plugin -## Usage - -``` yaml ---8<-- "helm-installer.yaml" -``` - -### Argo CD - -#### Default Configs - -| key | default value | description | -| ---------------- | ------------------------------------ | ------------------------------------------------ | -| chart.chartPath | "" | local chart path | -| chart.chartName | argo/argo-cd | chart name | -| chart.version | "" | chart version -| chart.timeout | 5m | this config will wait 5 minutes to deploy Argo CD | -| chart.upgradeCRDs | true | default update CRD config | -| chart.releaseName | argocd | helm release name | -| chart.namespace | argocd | namespace where helm to deploy | -| chart.wait | true | whether to wait until installation is complete | -| repo.url | https://argoproj.github.io/argo-helm | helm official repo address | -| repo.name | argo | helm repo name | +//TODO(daniel-hutao): write later diff --git a/docs/plugins/helm-installer/helm-installer.zh.md b/docs/plugins/helm-installer/helm-installer.zh.md index e21582018..bc1379817 100644 --- a/docs/plugins/helm-installer/helm-installer.zh.md +++ b/docs/plugins/helm-installer/helm-installer.zh.md @@ -2,7 +2,7 @@ `helm-installer` 插件实现了比 `helm` 更加简单和容易上手的方式来快速部署提供了 Helm Chart 的应用。 -## 快速开始 +## 1、快速开始 只需要一个最小化配置,你就可以快速使用默认配置部署一个 Helm Chart。你可以将如下配置内容保存到本地 config.yaml 文件中: @@ -34,11 +34,93 @@ tools: ./dtm apply -f config.yaml -y ``` -## DevStream vs Helm +## 2、插件介绍 -// TODO(daniel-hutao): add document here later. +`helm-installer` 插件的完整配置格式如下: -## 当前支持的工具 +```yaml +tools: +- name: helm-installer + instanceID: argocd-001 + dependsOn: [ ] + options: + repo: + name: "" + url: "" + chart: + chartPath: "" + chartName: "" + version: "" + namespace: "" + wait: true + timeout: 10m + upgradeCRDs: true + valuesYaml: "" +``` + +这里有一些细节需要注意,下述几个小节将详细为你介绍。 + +### 2.1、instanceID 使用技巧 + +instanceID 的前缀如果能够匹配到某个已经被支持的工具(详见文末列表),那么 DevStream 会为你设置一系列的默认值。 +比如 "argocd-001" 的前缀 "argocd-" 能够匹配到 "argocd" + "-",因此 Argo CD 的默认 Chart 配置会被应用,于是如下最小化配置: + +```yaml +tools: +- name: helm-installer + instanceID: argocd-001 +``` + +将会被 DevStream 直接补全成: + +```yaml +- name: helm-installer + instanceID: argocd-001 + dependsOn: [ ] + options: + repo: + name: "" + url: "" + chart: + chartPath: "" + chartName: "" + version: "" + namespace: "" + wait: true + timeout: 10m + upgradeCRDs: true + valuesYaml: "" +``` + +### 2.2、自定义 Chart 配置 + +如果你想使用自定义 Chart 的 values.yaml 配置,只需要将 values.yaml 的文件路径或者内容直接加到 helm-installer 插件配置 options 部分的 chart.valuesYaml 里。 +两种配置方式分别如下: + +- 使用本地 values.yaml 文件 + +```yaml +- name: helm-installer + instanceID: argocd-001 + dependsOn: [ ] + options: + valuesYaml: "./values.yaml" +``` + +- 直接使用 values.yaml 文件内容 + +```yaml +- name: helm-installer + instanceID: argocd-001 + dependsOn: [ ] + options: + valuesYaml: | + foo: bar +``` + +## 3、当前支持的工具列表 + +当前 DevStream 支持使用"极简配置"部署如下应用(也就是能够根据 instanceID 配置识别到 Chart 地址等信息,并设置一系列默认值,直接开始部署流程): - [Install Argo CD with DevStream](./argocd.zh.md) - [Install Artifactory with DevStream](./artifactory.zh.md) diff --git a/docs/plugins/helm-installer/jenkins.md b/docs/plugins/helm-installer/jenkins.md index 1971ee7e6..a955ae7dd 100644 --- a/docs/plugins/helm-installer/jenkins.md +++ b/docs/plugins/helm-installer/jenkins.md @@ -6,27 +6,18 @@ This plugin installs [Jenkins](https://jenkins.io) in an existing Kubernetes clu It also installs [GitHub Pull Request Builder(ghprb)](https://plugins.jenkins.io/ghprb/) and [OWASP Markup Formatter](https://plugins.jenkins.io/antisamy-markup-formatter/) plugins. Then enable HTML parsing using OWASP Markup Formatter Plugin , useful with ghprb plugin. -## Config - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -```yaml ---8<-- "jenkins.yaml" -``` - ## Default Configs | key | default value | description | | ---- | ---- | ---- | | chart.chartPath | "" | local chart path | | chart.chartName | jenkins/jenkins | chart name | +| chart.version | "" | chart version | | chart.timeout | 5m | this config will wait 5 minutes to deploy | | chart.upgradeCRDs | true | default update CRD config | | chart.releaseName | jenkins | helm release name | -| chart.wait | true | whether to wait until installation is complete | | chart.namespace | jenkins | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | | repo.url | https://charts.jenkins.io | helm official repo address | | repo.name | jenkins | helm repo name | diff --git a/docs/plugins/helm-installer/jenkins.zh.md b/docs/plugins/helm-installer/jenkins.zh.md index ef0b05ad6..df6c743c8 100644 --- a/docs/plugins/helm-installer/jenkins.zh.md +++ b/docs/plugins/helm-installer/jenkins.zh.md @@ -1,12 +1,5 @@ # 使用 DevStream 部署 Jenkins -//TODO(daniel-hutao): to be updated - -`jenkins` 插件用于部署、管理 [Jenkins](https://www.jenkins.io) 应用。 - -Jenkins 的部署方式有很多种,比如 Docker、Kubernetes、Jar 包等等,本插件使用 helm 方式实现 Jenkins 在 Kubernetes 之上的部署逻辑, -使用 Jenkins 官方提供的 [chart 包](https://github.com/jenkinsci/helm-charts)。 - ## 1、前置要求 **必须满足** @@ -28,36 +21,26 @@ Jenkins 的部署方式有很多种,比如 Docker、Kubernetes、Jar 包等等 ## 2.1、快速开始 -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - 如果仅是用于开发、测试等目的,希望快速完成 Jenkins 的部署,可以使用如下配置快速开始: ```yaml tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] - # options for the plugin options: - chart: - # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - valuesYaml: | - serviceAccount: - create: true - name: jenkins - controller: - adminUser: "admin" - adminPassword: "changeme" - serviceType: NodePort - nodePort: 32000 + valuesYaml: | + serviceAccount: + create: true + name: jenkins + controller: + adminUser: "admin" + adminPassword: "changeme" + serviceType: NodePort + nodePort: 32000 ``` -*注意:这个配置示例仅是 tool config,完整的 DevStream 配置文件还需要补充 core config 等内容,具体参考[这个文档](../core-concepts/config.zh.md)。* +*注意:这个配置示例仅是 tool config,完整的 DevStream 配置文件还需要补充 core config 等内容,具体参考[这个文档](../../core-concepts/config.zh.md)。* 在成功执行 `dtm apply` 命令后,我们可以在 jenkins 命名空间下看到下述主要资源: @@ -120,13 +103,13 @@ standard (default) k8s.io/minikube-hostpath Delete Immediate 这时候 minikube 会自动打开浏览器,跳转到 http://127.0.0.1:65398 页面(如果没有自动跳转,可以手动打开浏览器,输入这个 url;注意:根据你的命令行输出内容修改 url 中的端口号): -![Jenkins Login](./jenkins/login.png) +![Jenkins Login](../jenkins/login.png) - **登录** 如果你浏览过前面我们使用的"最小化配置文件",肯定已经注意到了里面和用户名、密码相关的配置,没错,通过 admin/changeme 就可以登录 Jenkins 了! -![Jenkins Dashboard](./jenkins/dashboard.png) +![Jenkins Dashboard](../jenkins/dashboard.png) 最后,记得修改密码哦! @@ -136,24 +119,17 @@ standard (default) k8s.io/minikube-hostpath Delete Immediate | 配置项 | 默认值 | 描述 | | ---- | ---- | ---- | -| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartPath | "" | 本地 chart 包路径 | | chart.chartName | jenkins/jenkins | helm chart 包名称 | -| chart.timeout | 5m | helm install 的超时时间 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | | chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | | chart.releaseName | jenkins | helm 发布名称 | -| chart.wait | true | 是否等待部署完成 | | chart.namespace | jenkins | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | | repo.url | https://charts.jenkins.io | helm 仓库地址 | | repo.name | jenkins | helm 仓库名 | -因此完整的配置文件应该是这样: - -```yaml ---8<-- "jenkins.yaml" -``` - -目前除了 `valuesYaml` 字段和默认配置,其它所有示例参数均为必填项。 - ### 2.3、持久化存储 前面"快速开始"中我们使用了 default StorageClass 来分配 pv 完成了 Jenkins 数据落到本地磁盘的过程。 @@ -161,27 +137,21 @@ standard (default) k8s.io/minikube-hostpath Delete Immediate ```yaml tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] - # options for the plugin options: - chart: - # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - valuesYaml: | - serviceAccount: - create: true - name: jenkins - persistence: - storageClass: nfs - controller: - adminUser: "admin" - adminPassword: "changeme" - serviceType: NodePort - nodePort: 32000 + valuesYaml: | + serviceAccount: + create: true + name: jenkins + persistence: + storageClass: nfs + controller: + adminUser: "admin" + adminPassword: "changeme" + serviceType: NodePort + nodePort: 32000 ``` 上述配置以 nfs StorageClass 为例,请记得将 `persistence.storageClass` 修改成你的环境中真实 StorageClass 的名字。 @@ -192,28 +162,22 @@ tools: ```yaml tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] - # options for the plugin options: - chart: - # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - valuesYaml: | - serviceAccount: - create: true - name: jenkins - persistence: - storageClass: "" - controller: - adminUser: "admin" - adminPassword: "changeme" - ingress: - enabled: true - hostName: jenkins.example.com + valuesYaml: | + serviceAccount: + create: true + name: jenkins + persistence: + storageClass: "" + controller: + adminUser: "admin" + adminPassword: "changeme" + ingress: + enabled: true + hostName: jenkins.example.com ``` 使用当前配置成功执行 `dtm apply` 命令后,可以看到环境里的 Ingress 资源如下: @@ -238,67 +202,59 @@ jenkins jenkins nginx jenkins.example.com 192.168.49.2 80 9m13s ```yaml tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] - # options for the plugin options: - chart: - # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - valuesYaml: | - serviceAccount: - create: true - name: jenkins - persistence: - storageClass: "" - controller: - adminUser: "admin" - adminPassword: "changeme" - ingress: - enabled: true - hostName: jenkins.example.com - installPlugins: - - kubernetes:3600.v144b_cd192ca_a_ - - workflow-aggregator:581.v0c46fa_697ffd - - git:4.11.3 - - configuration-as-code:1512.vb_79d418d5fc8 - additionalPlugins: - # install "GitHub Pull Request Builder" plugin, see https://plugins.jenkins.io/ghprb/ for more details - - ghprb - # install "OWASP Markup Formatter" plugin, see https://plugins.jenkins.io/antisamy-markup-formatter/ for more details - - antisamy-markup-formatter - # Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with ghprb plugin. - enableRawHtmlMarkupFormatter: true - # Jenkins Configuraction as Code, refer to https://plugins.jenkins.io/configuration-as-code/ for more details - # notice: All configuration files that are discovered MUST be supplementary. They cannot overwrite each other's configuration values. This creates a conflict and raises a ConfiguratorException. - JCasC: - defaultConfig: true + valuesYaml: | + serviceAccount: + create: true + name: jenkins + persistence: + storageClass: "" + controller: + adminUser: "admin" + adminPassword: "changeme" + ingress: + enabled: true + hostName: jenkins.example.com + installPlugins: + - kubernetes:3600.v144b_cd192ca_a_ + - workflow-aggregator:581.v0c46fa_697ffd + - git:4.11.3 + - configuration-as-code:1512.vb_79d418d5fc8 + additionalPlugins: + # install "GitHub Pull Request Builder" plugin, see https://plugins.jenkins.io/ghprb/ for more details + - ghprb + # install "OWASP Markup Formatter" plugin, see https://plugins.jenkins.io/antisamy-markup-formatter/ for more details + - antisamy-markup-formatter + # Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with ghprb plugin. + enableRawHtmlMarkupFormatter: true + # Jenkins Configuraction as Code, refer to https://plugins.jenkins.io/configuration-as-code/ for more details + # notice: All configuration files that are discovered MUST be supplementary. They cannot overwrite each other'sconfiguration values. This creates a conflict and raises a ConfiguratorException. + JCasC: + defaultConfig: true ``` ## 3、状态管理 -DevStream 的默认状态文件为 devstream.state,可以通过配置文件中的 state.options 字段来自定义。 -jenkins 插件会保存如下状态: +DevStream 的默认状态文件为 devstream.state,可以通过配置文件中的 state.options 字段来自定义: ```yaml -jenkins_default: - name: jenkins - instanceID: default +helm-installer_jenkins-001: + name: helm-installer + instanceID: jenkins-001 dependsOn: [] options: - chart: - valuesYaml: | - serviceAccount: - create: true - name: jenkins - controller: - adminUser: "admin" - ingress: - enabled: true - hostName: jenkins.example.com + valuesYaml: | + serviceAccount: + create: true + name: jenkins + controller: + adminUser: "admin" + ingress: + enabled: true + hostName: jenkins.example.com resourceStatus: outputs: jenkins_url: http://jenkins.jenkins:8080 @@ -347,7 +303,7 @@ workflows: | 在上一小节我们看到了 jenkins 插件的状态中保存了一个 outputs 字段,内容是 `jenkins_url: http://jenkins.jenkins:8080`, 所以其他插件的配置中可以通过`${{jenkins.default.outputs.jenkins_url}}` 的语法读取到 `http://jenkins.jenkins:8080`。 -更多关于"插件输出"的内容,请阅读[这个文档](../core-concepts/output.zh.md)。 +更多关于"插件输出"的内容,请阅读[这个文档](../../core-concepts/output.zh.md)。 ## 5、离线环境部署 @@ -368,8 +324,8 @@ helm pull jenkins/jenkins --version=4.2.5 ```yaml tools: -- name: jenkins - instanceID: default +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] options: chart: @@ -398,7 +354,7 @@ valuesYaml: | tag: 0.2.0 ``` -这段配置中留了一个变量 `[[ imageRepo ]]`,你可以在[变量配置](../core-concepts/variables.zh.md)中定义这个变量,变量值设置成你的镜像仓库地址,例如: +这段配置中留了一个变量 `[[ imageRepo ]]`,你可以在[变量配置](../../core-concepts/variables.zh.md)中定义这个变量,变量值设置成你的镜像仓库地址,例如: ```yaml imageRepo: harbor.example.com:9000 @@ -406,7 +362,7 @@ imageRepo: harbor.example.com:9000 当然,你需要保证需要的镜像都在你的镜像仓库中存在。 -你可以下载[镜像列表文件](./jenkins/jenkins-images.txt), +你可以下载[镜像列表文件](../jenkins/jenkins-images.txt), 然后借助["Image Pull Push"](https://raw.githubusercontent.com/devstream-io/devstream/main/hack/image-pull-push.sh)工具脚本来准备镜像。 ```shell @@ -423,11 +379,11 @@ export IMAGE_REPO_ADDR=harbor.devstream.io ./image-pull-push.sh -f jenkins-images.txt -r ${IMAGE_REPO_ADDR} -l -u ``` -如果你还没有一个私有镜像仓库,可以参考[这篇文章](../best-practices/image-registry.zh.md)快速部署一个 Docker Registry。 +如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../best-practices/image-registry.zh.md)快速部署一个 Docker Registry。 ### 5.3、参考配置 -可能你已经注意到前面的[镜像列表](./jenkins/jenkins-images.txt)里有一个 DevStream 自定义镜像 `devstreamdev/jenkins:2.361.1-jdk11-dtm-0.1`, +可能你已经注意到前面的[镜像列表](../jenkins/jenkins-images.txt)里有一个 DevStream 自定义镜像 `devstreamdev/jenkins:2.361.1-jdk11-dtm-0.1`, 在这个镜像里 DevStream 为离线部署场景做了增强,所以对应的配置文件我们也需要做一些调整,如下: ```yaml @@ -436,46 +392,41 @@ export IMAGE_REPO_ADDR=harbor.devstream.io imageRepo: harbor.example.com:9000 --- -# plugin config tools: -# name of the tool -- name: jenkins - # id of the tool instance - instanceID: default - # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool. +- name: helm-installer + instanceID: jenkins-001 dependsOn: [ ] - # options for the plugin options: chart: chartPath: "~/devstream-test/jenkins-4.2.5.tgz" # custom configuration. You can refer to [Jenkins values.yaml](https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml) - valuesYaml: | - serviceAccount: - create: true - name: jenkins - controller: - image: [[ imageRepo ]]/devstreamdev/jenkins - tag: 2.361.1-jdk11-dtm-0.1 - imagePullPolicy: "IfNotPresent" - sidecars: - configAutoReload: - image: [[ imageRepo ]]/kiwigrid/k8s-sidecar:1.15.0 - adminUser: "admin" - adminPassword: "changeme" - ingress: - enabled: true - hostName: jenkins.example.com - # Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with ghprb plugin. - enableRawHtmlMarkupFormatter: true - # Jenkins Configuraction as Code, refer to https://plugins.jenkins.io/configuration-as-code/ for more details - # notice: All configuration files that are discovered MUST be supplementary. They cannot overwrite each other's configuration values. This creates a conflict and raises a ConfiguratorException. - JCasC: - defaultConfig: true - agent: - image: [[ imageRepo ]]/jenkins/inbound-agent - tag: 4.11.2-4 - backup: - image: - repository: [[ imageRepo ]]/maorfr/kube-tasks - tag: 0.2.0 + valuesYaml: | + serviceAccount: + create: true + name: jenkins + controller: + image: [[ imageRepo ]]/devstreamdev/jenkins + tag: 2.361.1-jdk11-dtm-0.1 + imagePullPolicy: "IfNotPresent" + sidecars: + configAutoReload: + image: [[ imageRepo ]]/kiwigrid/k8s-sidecar:1.15.0 + adminUser: "admin" + adminPassword: "changeme" + ingress: + enabled: true + hostName: jenkins.example.com + # Enable HTML parsing using OWASP Markup Formatter Plugin (antisamy-markup-formatter), useful with ghprb plugin. + enableRawHtmlMarkupFormatter: true + # Jenkins Configuraction as Code, refer to https://plugins.jenkins.io/configuration-as-code/ for more details + # notice: All configuration files that are discovered MUST be supplementary. They cannot overwrite each other's configuration values. This creates a conflict and raises a ConfiguratorException. + JCasC: + defaultConfig: true + agent: + image: [[ imageRepo ]]/jenkins/inbound-agent + tag: 4.11.2-4 + backup: + image: + repository: [[ imageRepo ]]/maorfr/kube-tasks + tag: 0.2.0 ``` diff --git a/docs/plugins/jenkins/dashboard.png b/docs/plugins/helm-installer/jenkins/dashboard.png similarity index 100% rename from docs/plugins/jenkins/dashboard.png rename to docs/plugins/helm-installer/jenkins/dashboard.png diff --git a/docs/plugins/jenkins/jenkins-images.txt b/docs/plugins/helm-installer/jenkins/jenkins-images.txt similarity index 100% rename from docs/plugins/jenkins/jenkins-images.txt rename to docs/plugins/helm-installer/jenkins/jenkins-images.txt diff --git a/docs/plugins/jenkins/login.png b/docs/plugins/helm-installer/jenkins/login.png similarity index 100% rename from docs/plugins/jenkins/login.png rename to docs/plugins/helm-installer/jenkins/login.png diff --git a/docs/plugins/helm-installer/kube-prometheus.md b/docs/plugins/helm-installer/kube-prometheus.md index 4dcf693a3..1063e5047 100644 --- a/docs/plugins/helm-installer/kube-prometheus.md +++ b/docs/plugins/helm-installer/kube-prometheus.md @@ -1,31 +1,16 @@ # Install kube-prometheus with DevStream -//TODO(daniel-hutao): to be updated - -This plugin installs [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) in an existing Kubernetes cluster using the Helm chart. - -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -```yaml ---8<-- "kube-prometheus.yaml" -``` - -### Default Configs - -| key | default value | description | -| ---- | ---- | ---- | -| chart.chartPath | "" | local chart path | -| chart.chartName | prometheus-community/kube-prometheus-stack | chart name | -| chart.timeout | 5m | this config will wait 5 minutes to deploy | -| chart.releaseName | prometheus | helm release name | -| chart.upgradeCRDs | true | default update CRD config | -| chart.wait | true | whether to wait until installation is complete | -| chart.namespace | prometheus | namespace where helm to deploy | -| repo.url | https://prometheus-community.github.io/helm-charts | helm official repo address | -| repo.name | prometheus-community | helm repo name | - -Currently, except for `valuesYaml` and default configs, all the parameters in the example above are mandatory. +## Default Configs + +| key | default value | description | +| ---------------- | ------------------------------------ | ------------------------------------------------ | +| chart.chartPath | "" | local chart path | +| chart.chartName | prometheus-community/kube-prometheus-stack | chart name | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 10 minutes to deploy Argo CD | +| chart.upgradeCRDs | true | default update CRD config | +| chart.releaseName | prometheus | helm release name | +| chart.namespace | prometheus | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | +| repo.url | https://prometheus-community.github.io/helm-charts | helm official repo address | +| repo.name | prometheus-community | helm repo name | diff --git a/docs/plugins/helm-installer/kube-prometheus.zh.md b/docs/plugins/helm-installer/kube-prometheus.zh.md index b3a2f2d18..01fcc68cd 100644 --- a/docs/plugins/helm-installer/kube-prometheus.zh.md +++ b/docs/plugins/helm-installer/kube-prometheus.zh.md @@ -1,3 +1,17 @@ # 使用 DevStream 部署 kube-prometheus -//TODO(daniel-hutao): to be updated +## 默认配置 + +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | prometheus-community/kube-prometheus-stack | chart 包名称 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | +| chart.releaseName | prometheus | helm 发布名称 | +| chart.namespace | prometheus | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://prometheus-community.github.io/helm-charts | helm 仓库地址 | +| repo.name | prometheus-community | helm 仓库名 | + diff --git a/docs/plugins/helm-installer/openldap.md b/docs/plugins/helm-installer/openldap.md index 65661122d..ca873d3a4 100644 --- a/docs/plugins/helm-installer/openldap.md +++ b/docs/plugins/helm-installer/openldap.md @@ -1,30 +1,17 @@ # Install OpenLDAP with DevStream -//TODO(daniel-hutao): to be updated - -This plugin installs [OpenLDAP](https://www.openldap.org/) in an existing Kubernetes cluster using the Helm chart. Please at least make sure your Kubernetes's version is greater than 1.18. - -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -```yaml ---8<-- "openldap.yaml" -``` - ### Default Configs | key | default value | description | | ---- | ---- | ---- | | chart.chartPath | "" | local chart path | | chart.chartName | helm-openldap/openldap-stack-ha | community chart name | -| chart.timeout | 5m | this config will wait 5 minutes to deploy | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 5 minutes to deploy | | chart.releaseName | openldap | helm release name | | chart.upgradeCRDs | true | default update CRD config | -| chart.wait | true | whether to wait until installation is complete | | chart.namespace | openldap | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | | repo.url | https://jp-gouin.github.io/helm-openldap/ | helm repo address | | repo.name | helm-openldap | helm repo name | diff --git a/docs/plugins/helm-installer/openldap.zh.md b/docs/plugins/helm-installer/openldap.zh.md index 75cc15cb5..0f6c34cb8 100644 --- a/docs/plugins/helm-installer/openldap.zh.md +++ b/docs/plugins/helm-installer/openldap.zh.md @@ -1,3 +1,16 @@ # 使用 DevStream 部署 OpenLDAP -//TODO(daniel-hutao): to be updated +## 默认配置 + +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | helm-openldap/openldap-stack-ha | chart 包名称 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | +| chart.releaseName | openldap | helm 发布名称 | +| chart.namespace | openldap | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://jp-gouin.github.io/helm-openldap/ | helm 仓库地址 | +| repo.name | helm-openldap | helm 仓库名 | diff --git a/docs/plugins/helm-installer/sonarqube.md b/docs/plugins/helm-installer/sonarqube.md index a25dc827f..374144261 100644 --- a/docs/plugins/helm-installer/sonarqube.md +++ b/docs/plugins/helm-installer/sonarqube.md @@ -1,15 +1,16 @@ # Install SonarQube with DevStream -//TODO(daniel-hutao): to be updated +### Default Configs -TODO(jiafeng meng): I will add this document later. - -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -``` yaml ---8<-- "sonarqube.yaml" -``` +| key | default value | description | +| ---- | ---- | ---- | +| chart.chartPath | "" | local chart path | +| chart.chartName | sonarqube/sonarqube | community chart name | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 5 minutes to deploy | +| chart.releaseName | sonarqube | helm release name | +| chart.upgradeCRDs | true | default update CRD config | +| chart.namespace | sonarqube | namespace where helm to deploy | +| chart.wait | true | whether to wait until installation is complete | +| repo.url | https://SonarSource.github.io/helm-chart-sonarqube | helm repo address | +| repo.name | sonarqube | helm repo name | diff --git a/docs/plugins/helm-installer/sonarqube.zh.md b/docs/plugins/helm-installer/sonarqube.zh.md index 78df74a34..7c63a5c2b 100644 --- a/docs/plugins/helm-installer/sonarqube.zh.md +++ b/docs/plugins/helm-installer/sonarqube.zh.md @@ -1,9 +1,5 @@ # 使用 DevStream 部署 SonarQube -//TODO(daniel-hutao): to be updated - -`sonarqube` 插件用于部署、管理 [SonarQube](https://www.sonarqube.org/) 应用。 - ## 1. 前置要求 - 有一个可用的 Kubernetes 集群,版本 1.19+。 @@ -24,41 +20,31 @@ Sonarqube 内部会使用 Elastcisearch 来做搜索的索引,所以生产环 `sonarqube` 插件的配置项多数都有默认值,具体默认值信息如下表: -| 配置项 | 默认值 | 描述 | +| 配置项 | 默认值 | 描述 | |-------------------| ---- | ---- | | chart.chartName | sonarqube/sonarqube | helm chart 包名称 | -| chart.timeout | 20m | helm install 的超时时间 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.version | "" | chart 版本 | | chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | | chart.releaseName | sonarqube | helm 发布名称 | | chart.wait | true | 是否等待部署完成 | | chart.namespace | sonarqube | 部署的命名空间 | -| repo.url | https://SonarSource.github.io/helm-chart-sonarqube| helm 仓库地址 | +| repo.url | https://SonarSource.github.io/helm-chart-sonarqube| helm 仓库地址 | | repo.name | sonarqube | helm 仓库名 | -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - -因此完整的配置文件应该是这样: - -```yaml ---8<-- "sonarqube.yaml" -``` - ### 3.2、测试环境 在测试环境中可以使用如下配置: ```yaml tools: -- name: harbor - instanceID: default +- name: helm-installer + instanceID: sonarqube-001 dependsOn: [ ] options: - chart: - valuesYaml: | - prometheusExporter: - enabled: false + valuesYaml: | + prometheusExporter: + enabled: false ``` 在该配置下: diff --git a/docs/plugins/helm-installer/tekton.md b/docs/plugins/helm-installer/tekton.md index 92ce1117d..2fd9f7b4d 100644 --- a/docs/plugins/helm-installer/tekton.md +++ b/docs/plugins/helm-installer/tekton.md @@ -1,32 +1,16 @@ # Install Tekton with DevStream -//TODO(daniel-hutao): to be updated - -This plugin installs [tekton](https://tekton.dev/) in an existing Kubernetes cluster using the Helm chart. - -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -```yaml ---8<-- "tekton.yaml" -``` - -### Default Configs +## Default Configs | key | default value | description | | ---- | ---- | ---- | | chart.chartPath | "" | local chart path | | chart.chartName | tekton/tekton-pipeline | chart name | -| chart.timeout | 5m | this config will wait 5 minutes to deploy | +| chart.version | "" | chart version | +| chart.timeout | 10m | this config will wait 5 minutes to deploy | | chart.upgradeCRDs | true | default update CRD config | | chart.releaseName | tekton | helm release name | | chart.wait | true | whether to wait until installation is complete | | chart.namespace | tekton | namespace where helm to deploy | | repo.url | https://steinliber.github.io/tekton-helm-chart/ | helm community repo address | | repo.name | tekton | helm repo name | - - -Currently, except for `valuesYaml` and default configs, all the parameters in the example above are mandatory. diff --git a/docs/plugins/helm-installer/tekton.zh.md b/docs/plugins/helm-installer/tekton.zh.md index 8749d3d0d..ee4467799 100644 --- a/docs/plugins/helm-installer/tekton.zh.md +++ b/docs/plugins/helm-installer/tekton.zh.md @@ -1,29 +1,16 @@ # 使用 DevStream 部署 Tekton -//TODO(daniel-hutao): to be updated - -## 用例 - -下面的配置文件展示的是"tool file"的内容。 - -关于更多关于DevStream的主配置、tool file、var file的信息,请阅读[核心概念概览](../core-concepts/core-concepts.zh.md)和[DevStream配置](../core-concepts/config.zh.md). - -```yaml ---8<-- "tekton.yaml" -``` - -### Default Configs - -| key | default value | description | -| ---- | ---- | ---- | -| chart.chartPath | "" | 本地 chart 包路径 | -| chart.chartName | tekton/tekton-pipeline | helm 包名称 | -| chart.timeout | 5m | 等待部署成功的时间 | -| chart.upgradeCRDs | true | 默认更新 CRD 配置(如果存在的话) | -| chart.releaseName | tekton | helm 发布名称 | -| chart.wait | true | 是否等待部署完成 | -| chart.namespace | tekton | helm 部署的命名空间名称 | -| repo.url | https://steinliber.github.io/tekton-helm-chart/ | helm 官方仓库地址 | -| repo.name | tekton | helm 仓库名 | - -目前除了 `valuesYaml` 和默认配置,以上其它配置项均为必填项。 +## 默认配置 + +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | tekton/tekton-pipeline | helm 包名称 | +| chart.version | "" | chart 版本 | +| chart.timeout | 5m | 等待部署成功的时间 | +| chart.upgradeCRDs | true | 默认更新 CRD 配置(如果存在的话) | +| chart.releaseName | tekton | helm 发布名称 | +| chart.wait | true | 是否等待部署完成 | +| chart.namespace | tekton | helm 部署的命名空间名称 | +| repo.url | https://steinliber.github.io/tekton-helm-chart/ | helm 官方仓库地址 | +| repo.name | tekton | helm 仓库名 | diff --git a/docs/plugins/helm-installer/vault.md b/docs/plugins/helm-installer/vault.md index ac7b31875..8efd093a4 100644 --- a/docs/plugins/helm-installer/vault.md +++ b/docs/plugins/helm-installer/vault.md @@ -1,27 +1,12 @@ # Install Vault with DevStream -//TODO(daniel-hutao): to be updated - -This plugin installs [hashicorp-vault](https://www.vaultproject.io/) in an existing Kubernetes cluster using the Helm chart for your tests or develops hashicorp-vault. - -This plugin installs hashicorp-vault with replicas:3 by default value. - -## Usage - -The following content is an example of the "tool file". - -For more information on the main config, the tool file and the var file of DevStream, see [Core Concepts Overview](../core-concepts/core-concepts.md#1-config) and [DevStream Configuration](../core-concepts/config.md). - -```yaml ---8<-- "hashicorp-vault.yaml" -``` - -### Default Configs +## Default Configs | key | default value | description | | ---- | ---- | ---- | | chart.chartPath | "" | local chart path | | chart.chartName | hashicorp/vault | chart name | +| chart.version | "" | chart version | | chart.timeout | 5m | this config will wait 5 minutes to deploy | | chart.releaseName | vault | helm release name | | chart.upgradeCRDs | true | default update CRD config | diff --git a/docs/plugins/helm-installer/vault.zh.md b/docs/plugins/helm-installer/vault.zh.md index 269c0e075..42e196eda 100644 --- a/docs/plugins/helm-installer/vault.zh.md +++ b/docs/plugins/helm-installer/vault.zh.md @@ -1,3 +1,16 @@ # 使用 DevStream 部署 Vault -//TODO(daniel-hutao): to be updated +## 默认配置 + +| 配置项 | 默认值 | 描述 | +| ---- | ---- | ---- | +| chart.chartPath | "" | 本地 chart 包路径 | +| chart.chartName | hashicorp/vault | chart 包名称 | +| chart.version | "" | chart 包版本 | +| chart.timeout | 10m | helm install 的超时时间 | +| chart.upgradeCRDs | true | 是否更新 CRDs(如果有) | +| chart.releaseName | vault | helm 发布名称 | +| chart.namespace | vault | 部署的命名空间 | +| chart.wait | true | 是否等待部署完成 | +| repo.url | https://helm.releases.hashicorp.com | helm 仓库地址 | +| repo.name | hashicorp | helm 仓库名 | diff --git a/docs/plugins/plugins-list.md b/docs/plugins/plugins-list.md index c396c8edd..eb2ed0db3 100644 --- a/docs/plugins/plugins-list.md +++ b/docs/plugins/plugins-list.md @@ -8,7 +8,6 @@ | Issue Tracking | zentao | Zentao installation | [doc](zentao.md) | | Source Code Management | repo-scaffolding | App scaffolding | [doc](repo-scaffolding.md) | | Source Code Management | gitlab-ce-docker | GitLab CE version installation | [doc](gitlab-ce-docker.md) | -| CI | jenkins | Jenkins installation | [doc](jenkins.md) | | CI | jenkins-pipeline | Jenkins pipeline creation | [doc](jenkins-pipeline.md) | | CI | githubactions-golang | GitHub Actions CI for Golang | [doc](githubactions-golang.md) | | CI | githubactions-python | GitHub Actions CI for Python | [doc](githubactions-python.md) | @@ -17,26 +16,17 @@ | CI | gitlabci-java | GitLab CI for Java | [doc](gitlabci-java.md) | | CI | gitlabci-generic | Generic GitLab CI | [doc](gitlabci-generic.md) | | CI | ci-generic | Generic CI plugin | [doc](ci-generic.md) | -| CI | tekton | Tekton CI installation | [doc](tekton.md) | -| Code Quality/Security | sonarqube | SonarQube | [doc](sonarqube.md) | CD/GitOps | argocdapp | ArgoCD Application creation | [doc](argocdapp.md) | -| Image Repository | artifactory | Artifactory installation | [doc](artifactory.md) | -| Image Repository | harbor | Harbor helm installation | [doc](harbor.md) | | Image Repository | harbor-docker | Harbor Docker compose install | [doc](harbor-docker.md) | -| Deployment | helm-installer | Helm chart install | [doc](helm-installer.md) | -| Monitoring | kube-prometheus | Prometheus/Grafana K8s install | [doc](kube-prometheus.md) | -| Observability | devlake | DevLake installation | [doc](devlake.md) | -| LDAP | openldap | OpenLDAP installation | [doc](openldap.md) | -| Secrets/Credentials Management | hashicorp-vault | Hashicorp Vault installation | [doc](hashicorp-vault.md) | +| Deployment | helm-installer | Helm chart install | [doc](helm-installer/helm-installer.md) | Or, to get a list of plugins, run: ```shell $ dtm list plugins argocdapp -artifactory ci-generic -devlake +devlake-config githubactions-golang githubactions-nodejs githubactions-python @@ -44,18 +34,11 @@ gitlab-ce-docker gitlabci-generic gitlabci-golang gitlabci-java -harbor harbor-docker -hashicorp-vault -helm-generic -jenkins +helm-installer jenkins-pipeline jira-github-integ -kube-prometheus -openldap repo-scaffolding -sonarqube -tekton trello trello-github-integ zentao