mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
Merge pull request #2120 from Felixnoo/update-zh-devops
Unify Wording in 3.2.0 DevOps ZH Docs
This commit is contained in:
commit
a363682d62
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: "构建和部署 Maven 工程"
|
||||
title: "构建和部署 Maven 项目"
|
||||
keywords: 'Kubernetes, Docker, DevOps, Jenkins, Maven'
|
||||
description: '学习如何使用 KubeSphere 流水线构建并部署 Maven 工程。'
|
||||
linkTitle: "构建和部署 Maven 工程"
|
||||
description: '学习如何使用 KubeSphere 流水线构建并部署 Maven 项目。'
|
||||
linkTitle: "构建和部署 Maven 项目"
|
||||
weight: 11430
|
||||
---
|
||||
|
||||
|
|
@ -12,9 +12,9 @@ weight: 11430
|
|||
- 您需要有一个 [Docker Hub](http://www.dockerhub.com/) 帐户。
|
||||
- 您需要创建一个企业空间、一个 DevOps 项目和一个用户,并需要邀请该用户至 DevOps 项目中并赋予 `operator` 角色。有关更多信息,请参见[创建企业空间、项目、用户和角色](../../../quick-start/create-workspace-and-project/)。
|
||||
|
||||
## Maven 工程的工作流
|
||||
## Maven 项目的工作流
|
||||
|
||||
KubeSphere DevOps 中有针对 Maven 工程的工作流,如下图所示,它使用 Jenkins 流水线来构建和部署 Maven 工程。所有步骤均在流水线中进行定义。
|
||||
KubeSphere DevOps 中有针对 Maven 项目的工作流,如下图所示,它使用 Jenkins 流水线来构建和部署 Maven 项目。所有步骤均在流水线中进行定义。
|
||||
|
||||

|
||||
|
||||
|
|
@ -54,11 +54,11 @@ kubectl get cm -n kubesphere-devops-system ks-devops-agent -o yaml
|
|||
|
||||
## Maven 流水线示例
|
||||
|
||||
### Maven 工程准备工作
|
||||
### Maven 项目准备工作
|
||||
|
||||
- 确保您在开发设备上成功构建 Maven 工程。
|
||||
- 添加 Dockerfile 至工程仓库以构建镜像。有关更多信息,请参考 <https://github.com/kubesphere/devops-maven-sample/blob/master/Dockerfile-online>。
|
||||
- 添加 YAML 文件至工程仓库以部署工作负载。有关更多信息,请参考 <https://github.com/kubesphere/devops-maven-sample/tree/master/deploy/dev-ol>。如果有多个不同环境,您需要准备多个部署文件。
|
||||
- 确保您在开发设备上成功构建 Maven 项目。
|
||||
- 添加 Dockerfile 至项目仓库以构建镜像。有关更多信息,请参考 <https://github.com/kubesphere/devops-maven-sample/blob/master/Dockerfile-online>。
|
||||
- 添加 YAML 文件至项目仓库以部署工作负载。有关更多信息,请参考 <https://github.com/kubesphere/devops-maven-sample/tree/master/deploy/dev-ol>。如果有多个不同环境,您需要准备多个部署文件。
|
||||
|
||||
### 创建凭证
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ kubectl get cm -n kubesphere-devops-system ks-devops-agent -o yaml
|
|||
|
||||
在本示例中,所有工作负载都部署在 `kubesphere-sample-dev` 项目中。您必须事先创建 `kubesphere-sample-dev` 项目。
|
||||
|
||||
### 为 Maven 工程创建一个流水线
|
||||
### 为 Maven 项目创建一个流水线
|
||||
|
||||
1. 在您的 DevOps 项目中,转到**流水线**页面并点击**创建**,创建一个名为 `maven` 的流水线。有关更多信息,请参见[使用图形编辑面板创建流水线](../../how-to-use/create-a-pipeline-using-graphical-editing-panel)。
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: "构建和部署 Go 工程"
|
||||
title: "构建和部署 Go 项目"
|
||||
keywords: 'Kubernetes, docker, devops, jenkins, go, KubeSphere'
|
||||
description: '学习如何使用 KubeSphere 流水线构建并部署 Go 工程。'
|
||||
linkTitle: "构建和部署 Go 工程"
|
||||
description: '学习如何使用 KubeSphere 流水线构建并部署 Go 项目。'
|
||||
linkTitle: "构建和部署 Go 项目"
|
||||
weight: 11410
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ kubectl -n kubesphere-system rollout restart deploy ks-apiserver
|
|||
kubectl -n kubesphere-system rollout restart deploy ks-console
|
||||
```
|
||||
|
||||
## 为新工程创建 SonarQube Token
|
||||
## 为新项目创建 SonarQube Token
|
||||
|
||||
您需要一个 SonarQube 令牌,以便您的流水线可以在运行时与 SonarQube 通信。
|
||||
|
||||
|
|
@ -252,11 +252,11 @@ kubectl -n kubesphere-system rollout restart deploy ks-console
|
|||
|
||||

|
||||
|
||||
2. 输入工程密钥,例如 `java-demo`,然后点击 **Set Up**。
|
||||
2. 输入项目密钥,例如 `java-demo`,然后点击 **Set Up**。
|
||||
|
||||

|
||||
|
||||
3. 输入工程名称,例如 `java-sample`,然后点击 **Generate**。
|
||||
3. 输入项目名称,例如 `java-sample`,然后点击 **Generate**。
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ KubeSphere 中的图形编辑面板包含用于 Jenkins [阶段 (Stage)](https:/
|
|||
| dockerhub-id | 用户名和密码 | Docker Hub |
|
||||
| demo-kubeconfig | kubeconfig | Kubernetes |
|
||||
|
||||
2. 您还需要为 SonarQube 创建一个凭证 ID (`sonar-token`),用于上述的阶段 3(代码分析)。请参阅[为新工程创建 SonarQube 令牌 (Token)](../../../devops-user-guide/how-to-integrate/sonarqube/#create-sonarqube-token-for-new-project),在**访问令牌**类型的凭证的**令牌**字段中输入 SonarQube 令牌。点击**确定**完成操作。
|
||||
2. 您还需要为 SonarQube 创建一个凭证 ID (`sonar-token`),用于上述的阶段 3(代码分析)。请参阅[为新项目创建 SonarQube 令牌 (Token)](../../../devops-user-guide/how-to-integrate/sonarqube/#create-sonarqube-token-for-new-project),在**访问令牌**类型的凭证的**令牌**字段中输入 SonarQube 令牌。点击**确定**完成操作。
|
||||
|
||||
3. 您可以在列表中看到已创建的三个凭证。
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ KubeSphere 中的图形编辑面板包含用于 Jenkins [阶段 (Stage)](https:/
|
|||
|
||||
{{< notice note >}}
|
||||
|
||||
在 KubeSphere 3.2.0 中,能够运行流水线的帐户也能够继续或终止该流水线。此外,流水线创建者、拥有该工程管理员角色的用户或者您指定的帐户也有权限继续或终止流水线。
|
||||
在 KubeSphere 3.2.0 中,能够运行流水线的帐户也能够继续或终止该流水线。此外,流水线创建者、拥有该项目管理员角色的用户或者您指定的帐户也有权限继续或终止流水线。
|
||||
|
||||
{{</ notice >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ KubeSphere 中可以创建两种类型的流水线:一种是本教程中介绍
|
|||
| github-id | 帐户凭证 | GitHub |
|
||||
| demo-kubeconfig | kubeconfig | Kubernetes |
|
||||
|
||||
2. 您还需要为 SonarQube 创建一个凭证 (`sonar-token`),用于上述的阶段 3(SonarQube 分析)。请参阅[为新工程创建 SonarQube 令牌 (Token)](../../../devops-user-guide/how-to-integrate/sonarqube/#为新工程创建-sonarqube-token),在**访问令牌**类型的凭证的**令牌**字段中输入 SonarQube 令牌。点击**确定**完成操作。
|
||||
2. 您还需要为 SonarQube 创建一个凭证 (`sonar-token`),用于上述的阶段 3(SonarQube 分析)。请参阅[为新项目创建 SonarQube 令牌 (Token)](../../../devops-user-guide/how-to-integrate/sonarqube/#为新项目创建-sonarqube-token),在**访问令牌**类型的凭证的**令牌**字段中输入 SonarQube 令牌。点击**确定**完成操作。
|
||||
|
||||
3. 您还需要创建具有如下图所示权限的 GitHub 个人访问令牌 (PAT),然后在 DevOps 项目中,使用生成的令牌创建用于 GitHub 认证的帐户凭证(例如,`github-token`)。
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ KubeSphere 中可以创建两种类型的流水线:一种是本教程中介绍
|
|||
|
||||
{{< notice note >}}
|
||||
|
||||
在 KubeSphere 3.2.0 中,如果不指定审核员,那么能够运行流水线的帐户也能够继续或终止该流水线。流水线创建者、在该工程中具有 `admin` 角色的用户或者您指定的帐户也有权限继续或终止流水线。
|
||||
在 KubeSphere 3.2.0 中,如果不指定审核员,那么能够运行流水线的帐户也能够继续或终止该流水线。流水线创建者、在该项目中具有 `admin` 角色的用户或者您指定的帐户也有权限继续或终止流水线。
|
||||
|
||||
{{</ notice >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ weight: 11293
|
|||
## 准备工作
|
||||
|
||||
- [启用 KubeSphere DevOps 系统](../../../pluggable-components/devops/)。
|
||||
- 创建一个企业空间、一个 DevOps工程和一个用户(例如,`project-regular`)。`project-regular` 需要被邀请至 DevOps 项目中并赋予 `operator` 角色。有关更多信息,请参见[创建企业空间、项目、用户和角色](../../../quick-start/create-workspace-and-project/)。
|
||||
- 创建一个企业空间、一个 DevOps 项目和一个用户(例如,`project-regular`)。`project-regular` 需要被邀请至 DevOps 项目中并赋予 `operator` 角色。有关更多信息,请参见[创建企业空间、项目、用户和角色](../../../quick-start/create-workspace-and-project/)。
|
||||
- 通过远程代码仓库创建一个基于 Jenkinsfile 的流水线。有关更多信息,请参见[使用 Jenkinsfile 创建流水线](../create-a-pipeline-using-jenkinsfile/)。
|
||||
|
||||
## 配置 Webhook
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ weight: 11120
|
|||
|
||||
### 成员和角色
|
||||
|
||||
与项目相似,DevOps 项目也需要为用户授予不同的角色,然后用户才能在 DevOps 项目中工作。工程管理员(例如 `project-admin`)负责邀请租户并授予他们不同的角色。有关更多信息,请参见[角色和成员管理](../role-and-member-management/)。
|
||||
与项目相似,DevOps 项目也需要为用户授予不同的角色,然后用户才能在 DevOps 项目中工作。项目管理员(例如 `project-admin`)负责邀请租户并授予他们不同的角色。有关更多信息,请参见[角色和成员管理](../role-and-member-management/)。
|
||||
|
||||
## 编辑或删除 DevOps 项目
|
||||
|
||||
1. 点击 **DevOps 项目设置**下的**基本信息**,您可以查看当前 DevOps 项目的概述,包括工程角色和工程成员的数量、工程名称和工程创建者。
|
||||
1. 点击 **DevOps 项目设置**下的**基本信息**,您可以查看当前 DevOps 项目的概述,包括项目角色和项目成员的数量、项目名称和项目创建者。
|
||||
|
||||
2. 点击右侧的 **DevOps 管理**,您可以编辑此 DevOps 项目的基本信息或删除 DevOps 项目。
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue