Skip to content

Commit

Permalink
Merge pull request #1416 from merico-dev/docs-ht
Browse files Browse the repository at this point in the history
docs: reorganize the use cases directory
  • Loading branch information
daniel-hutao authored Jan 5, 2023
2 parents 97b0ffe + 80818d7 commit caf3be9
Show file tree
Hide file tree
Showing 21 changed files with 111 additions and 35 deletions.
2 changes: 1 addition & 1 deletion docs/plugins/argocdapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This plugin creates an [Argo CD Application](https://argo-cd.readthedocs.io/en/s
- Argo CD itself must have been already installed before the usage of this plugin.
To install Argo CD, use the [helm-installer plugin](./helm-installer/argocd.md).
Or you can use both plugins(argocd+argocdapp) at the same time.
See [GitOps Toolchain](../use-cases/gitops.md) for more info.
See [GitOps Toolchain](../use-cases/gitops/2-gitops-tools.md) for more info.
- Currently, only the Helm chart is supported when creating the Argo CD application.

## Usage
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/helm-installer/harbor.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export IMAGE_REPO_ADDR=harbor.devstream.io
./image-pull-push.sh -f harbor-images.txt -r ${IMAGE_REPO_ADDR} -l -u
```

如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../use-cases/image-registry.zh.md)快速部署一个 Docker Registry。
如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../use-cases/reference/image-registry.zh.md)快速部署一个 Docker Registry。

### 5.3、参考配置

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/helm-installer/jenkins.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export IMAGE_REPO_ADDR=harbor.devstream.io
./image-pull-push.sh -f jenkins-images.txt -r ${IMAGE_REPO_ADDR} -l -u
```

如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../use-cases/image-registry.zh.md)快速部署一个 Docker Registry。
如果你还没有一个私有镜像仓库,可以参考[这篇文章](../../use-cases/reference/image-registry.zh.md)快速部署一个 Docker Registry。

### 5.3、参考配置

Expand Down
2 changes: 1 addition & 1 deletion docs/understanding_the_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Go through the online Docker and Kubernetes tutorials. You can search for:
## Getting Started

- [Quick Start](./quickstart.md)
- [Best Pratices - GitOps Toolchain](./use-cases/gitops.md)
- [Use Case - GitOps Toolchain](./use-cases/gitops/2-gitops-tools.md)
2 changes: 1 addition & 1 deletion docs/understanding_the_basics.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
## 让我们开始吧!

- [快速入门](./quickstart.zh.md)
- [最佳实践 - GitOps工具链](./use-cases/gitops.zh.md)
- [应用场景 - GitOps 工具链](./use-cases/gitops/2-gitops-tools.zh.md)
1 change: 1 addition & 0 deletions docs/use-cases/case-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Case Overview
66 changes: 66 additions & 0 deletions docs/use-cases/case-overview.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 场景概览

你可以从不同的维度筛选适合自己的使用场景:

=== "DevOps 工具集"

## GitLab,Jenkins 和 Harbor

1. [从0到1在自建(On-Premise)环境通过 DevStream 部署完整的 GitLab + Jenkins + Harbor 工具链](./gitlab-jenkins-harbor/2-gitlab-jenkins-harbor.zh.md);
2. [用 DevStream 部署 Jenkins 并且一键打通其与你的企业内自建 GitLab](./gitlab-jenkins-harbor/4-jenkins-gitlab-integ.zh.md);
3. [通过 DevStream 实现 Java Spring Boot 项目脚手架的快速创建与 Jenkins CI 流水线的自动化配置](./gitlab-jenkins-harbor/5-java-springboot-pipeline-with-gitlab-jenkins-harbor.zh.md);
4. [用 DevStream 部署 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程](./gitlab-jenkins-harbor/6-gitlab-jenkins-harbor-java-springboot.zh.md);

## GitLab,Jenkins 和 Harbor(离线环境)

1. [在离线环境通过 DevStream 部署 GitLab + Jenkins + Harbor 工具链](./gitlab-jenkins-harbor/3-gitlab-jenkins-harbor-air-gapped.zh.md);
2. [在离线环境使用 DevStream 搭建 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程](./gitlab-jenkins-harbor/7-java-springboot-pipeline-with-gitlab-jenkins-harbor-air-gapped.zh.md)。

## GitOps(Argo CD)

1. [用 DTM 实现基于 Argo CD 的 GitOps 流程](./gitops/2-gitops-tools.zh.md)
2. [用 DTM Apps 管理能力实现基于 Argo CD 的 GitOps 流程](./gitops/3-gitops-apps.zh.md)
3. [用 DTM Apps 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/2-github-dtm-apps.zh.md)
4. [用 DTM Tools 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/3-github-dtm-tools.zh.md)
5. [用 DevStream 搭建 Gitlab CI + Argo CD 工具链,管理 Python Flask 项目](./gitops-python-flask/4-gitlab-dtm-apps.zh.md)


=== "开发语言和框架"

## Python + Flask

1. [用 DTM 实现基于 Argo CD 的 GitOps 流程](./gitops/2-gitops-tools.zh.md)
2. [用 DTM Apps 管理能力实现基于 Argo CD 的 GitOps 流程](./gitops/3-gitops-apps.zh.md)
3. [用 DTM Apps 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/2-github-dtm-apps.zh.md)
4. [用 DTM Tools 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/3-github-dtm-tools.zh.md)
5. [用 DevStream 搭建 Gitlab CI + Argo CD 工具链,管理 Python Flask 项目](./gitops-python-flask/4-gitlab-dtm-apps.zh.md)

## Java + Spring Boot

1. [通过 DevStream 实现 Java Spring Boot 项目脚手架的快速创建与 Jenkins CI 流水线的自动化配置](./gitlab-jenkins-harbor/5-java-springboot-pipeline-with-gitlab-jenkins-harbor.zh.md);
2. [用 DevStream 部署 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程](./gitlab-jenkins-harbor/6-gitlab-jenkins-harbor-java-springboot.zh.md);

=== "用户状态或阶段"

## 工具从0到1

1. [从0到1在自建(On-Premise)环境通过 DevStream 部署完整的 GitLab + Jenkins + Harbor 工具链](./gitlab-jenkins-harbor/2-gitlab-jenkins-harbor.zh.md);
2. [在离线环境通过 DevStream 部署 GitLab + Jenkins + Harbor 工具链](./gitlab-jenkins-harbor/3-gitlab-jenkins-harbor-air-gapped.zh.md);

## 工具新增或替换

1. [用 DevStream 部署 Jenkins 并且一键打通其与你的企业内自建 GitLab](./gitlab-jenkins-harbor/4-jenkins-gitlab-integ.zh.md);

## 应用从0到1

1. [通过 DevStream 实现 Java Spring Boot 项目脚手架的快速创建与 Jenkins CI 流水线的自动化配置](./gitlab-jenkins-harbor/5-java-springboot-pipeline-with-gitlab-jenkins-harbor.zh.md);

## 工具和应用从0到1

1. [用 DTM 实现基于 Argo CD 的 GitOps 流程](./gitops/2-gitops-tools.zh.md)
2. [用 DTM Apps 管理能力实现基于 Argo CD 的 GitOps 流程](./gitops/3-gitops-apps.zh.md)
3. [用 DTM Apps 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/2-github-dtm-apps.zh.md)
4. [用 DTM Tools 实现基于 GitHub,Argo CD 和 GitHub Actions 的 CICD 流程](./gitops-python-flask/3-github-dtm-tools.zh.md)
5. [用 DevStream 搭建 Gitlab CI + Argo CD 工具链,管理 Python Flask 项目](./gitops-python-flask/4-gitlab-dtm-apps.zh.md)
6. [用 DevStream 部署 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程](./gitlab-jenkins-harbor/6-gitlab-jenkins-harbor-java-springboot.zh.md);
7. [在离线环境使用 DevStream 搭建 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程](./gitlab-jenkins-harbor/7-java-springboot-pipeline-with-gitlab-jenkins-harbor-air-gapped.zh.md)。
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ curl -o image-pull-push.sh https://raw.githubusercontent.com/devstream-io/devstr
chmod +x image-pull-push.sh
```

如果你还没有一个私有镜像仓库,可以参考[这篇文章](../image-registry.zh.md)快速部署一个 Docker Registry。
如果你还没有一个私有镜像仓库,可以参考[这篇文章](../reference/image-registry.zh.md)快速部署一个 Docker Registry。

接下来,你就可以通过下述命令快速完成镜像的下载和上传了:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 搭建 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程(to be translated
# to be translated

// TODO(daniel-hutao): Chinese version first
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 在离线环境搭建 GitLab + Jenkins + Harbor 工具链,管理 Java Spring Boot 项目开发生命周期全流程(to be translated
# to be translated

// TODO(daniel-hutao): Chinese version first
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ curl -o image-pull-push.sh https://raw.githubusercontent.com/devstream-io/devstr
chmod +x image-pull-push.sh
```

如果你还没有一个私有镜像仓库,可以参考[这篇文章](../image-registry.zh.md)快速部署一个 Docker Registry。
如果你还没有一个私有镜像仓库,可以参考[这篇文章](../reference/image-registry.zh.md)快速部署一个 Docker Registry。

接下来,你就可以通过下述命令快速完成镜像的下载和上传了:

Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases/gitops-python-flask/4-gitlab-dtm-apps.zh.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 用 DevStream 搭建 Gitlab CI + Argo CD 工具链,管理 Python Flask 项目(GitLab + GitLab CI with DTM Apps)
# 用 DevStream 搭建 Gitlab CI + Argo CD 工具链,管理 Python Flask 项目

## 0 目标

Expand Down
1 change: 1 addition & 0 deletions docs/use-cases/gitops/1-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Overview
1 change: 1 addition & 0 deletions docs/use-cases/gitops/1-overview.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 概览
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ However, if you are like us, who prefer to do things hands-on and get their hand

DevStream will use the following plugins to achieve the goal described in [Section 0](#0-goal):

1. [repo-scaffolding](../plugins/repo-scaffolding.md)
2. [github-actions](../plugins/github-actions.md)
3. [helm-installer](../plugins/helm-installer/helm-installer.md)
4. [argocdapp](../plugins/argocdapp.md)
1. [repo-scaffolding](../../plugins/repo-scaffolding.md)
2. [github-actions](../../plugins/github-actions.md)
3. [helm-installer](../../plugins/helm-installer/helm-installer.md)
4. [argocdapp](../../plugins/argocdapp.md)

However, you do not have to worry about these plugins because DevStream will manage them automatically for you.

Expand Down Expand Up @@ -113,7 +113,7 @@ Use "dtm [command] --help" for more information about a command.
> Optional: you can move `dtm` to a directory which is in your $PATH. For example: `mv dtm /usr/local/bin/`. This will allow you to run `dtm` directly without having to prefix it with the dot and slash (`./dtm`).
>
> For more methods on how to install DevStream, see [install dtm](../install.md).
> For more methods on how to install DevStream, see [install dtm](../../install.md).
---
Expand Down Expand Up @@ -214,13 +214,13 @@ Let's continue to look at the results of the `apply` command.
The repository is created automatically by DevStream with scaffolding code:
![](../images/gitops-a.png)
![](../../images/gitops-a.png)
### 8.2 CI Pipelines with GitHub Actions
GitHub Actions pipelines are created and executed:
![](../images/gitops-b.png)
![](../../images/gitops-b.png)
### 8.3 Argo CD Installation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# GitOps

## 0 目标

在本教程中,我们将尝试通过 DevStream 来实现以下目标:

1. 创建一个 Python Web 应用程序仓库,基于 [Flask](https://flask.palletsprojects.com/en/2.2.x/) 框架;
Expand Down Expand Up @@ -39,10 +40,10 @@

DevStream 将使用下面的插件来实现[第 0 节](#)中描述的目标:

1. [repo-scaffolding](../plugins/repo-scaffolding.md)
2. [github-actions](../plugins/github-actions.md)
3. [helm-installer](../plugins/helm-installer/helm-installer.md)
4. [argocdapp](../plugins/argocdapp.md)
1. [repo-scaffolding](../../plugins/repo-scaffolding.md)
2. [github-actions](../../plugins/github-actions.md)
3. [helm-installer](../../plugins/helm-installer/helm-installer.md)
4. [argocdapp](../../plugins/argocdapp.md)

不过,你不需要担心这些插件,因为 DevStream 会帮你自动管理它们。

Expand Down Expand Up @@ -112,7 +113,7 @@ Use "dtm [command] --help" for more information about a command.
> 可选:你可以把 `dtm` 移动到 $PATH 环境变量中的某个目录下。例如:`mv dtm /usr/local/bin/`。这样,你就可以直接运行 `dtm` 而不需要再加上 `./` 前缀了。
>
> 更多安装方式详见[安装 dtm](../install.zh.md)。
> 更多安装方式详见[安装 dtm](../../install.zh.md)。
---
Expand Down Expand Up @@ -210,13 +211,13 @@ export IMAGE_REPO_PASSWORD="YOUR_DOCKERHUB_TOKEN_HERE"
DevStream 已经通过 `repo-scaffolding` 插件自动创建了一个仓库:
![](../images/gitops-a.png)
![](../../images/gitops-a.png)
### 8.2 基于 GitHub Actions 的 CI 流水线
GitHub Actions 流水线已经被创建并运行:
![](../images/gitops-b.png)
![](../../images/gitops-b.png)
### 8.3 Argo CD 的安装
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0 Goal

In this tutorial, we will try to use DevStream's new feature "Apps" to achieve similar result to the [GitOps](./gitops.md), but using much less configuration, to show the power of "Apps" in the config. If you haven't read the original GitOps best practice, click the above link first.
In this tutorial, we will try to use DevStream's new feature "Apps" to achieve similar result to the [GitOps](./2-gitops-tools.md), but using much less configuration, to show the power of "Apps" in the config. If you haven't read the original GitOps best practice, click the above link first.

Two applications will be created (one Python, one Golang), CI/CD pipelines will be set up for both, and both apps will be deployed via Argo CD, just like the GitOps best practice.

Expand All @@ -23,7 +23,7 @@ mkdir test
cd test/
```

Download dtm (see the [GitOps](./gitops.md) best practice if you haven't).
Download dtm (see the [GitOps](./2-gitops-tools.md) best practice if you haven't).

Then generate the config file by running:

Expand Down Expand Up @@ -108,7 +108,7 @@ tiexin@mbp ~/work/devstream-io/test $ ./dtm apply -f config.yaml -y
Let's continue to look at the results of the `apply` command.

Similar to what we did in the [GitOps](./gitops.md) best practice, we can check that repositories for two applications are created, CI pipelins are created for both apps too, Argo CD is installed, and both apps are deployed by Argo CD into our Kubernetes cluster.
Similar to what we did in the [GitOps](./2-gitops-tools.md) best practice, we can check that repositories for two applications are created, CI pipelins are created for both apps too, Argo CD is installed, and both apps are deployed by Argo CD into our Kubernetes cluster.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0 目标

在本教程中,我们会使用 DevStream 的新特性 应用(Apps),来达到与 [GitOps](gitops.zh.md) 相似的效果。但它的配置更短,来展示 应用 的强大能力。如果你还没有读过原始的 GitOps 最佳实践,可以先点击前面的链接。
在本教程中,我们会使用 DevStream 的新特性 应用(Apps),来达到与 [GitOps](2-gitops-tools.zh.md) 相似的效果。但它的配置更短,来展示 应用 的强大能力。如果你还没有读过原始的 GitOps 最佳实践,可以先点击前面的链接。

我们会创建两个应用程序(一个基于 Python,另一个是 Go 语言),并且创建共用的 CI/CD 流水线,即两个应用程序都会通过 Argo CD 来部署,就像前面的 GitOps 做到的那样。

Expand All @@ -23,7 +23,7 @@ mkdir test
cd test/
```

下载 dtm(详见 [GitOps](./gitops.zh.md) 最佳实践,如果你还没有下载过的话)
下载 dtm(详见 [GitOps](./2-gitops-tools.zh.md) 最佳实践,如果你还没有下载过的话)

运行以下命令以生成配置文件:

Expand Down Expand Up @@ -106,7 +106,7 @@ tiexin@mbp ~/work/devstream-io/test $ ./dtm apply -f config.yaml -y
让我们来继续看看 `apply` 命令的结果:
与我们在[GitOps](./gitops.zh.md)最佳实践中所做的类似,我们可以检查 dtm 是否为两个应用程序创建了代码仓库并为其创建了 CI 流水线,同时安装了 Argo CD,而且两个应用程序都使用了 Argo CD 来部署到了 Kubernetes 集群中。
与我们在[GitOps](./2-gitops-tools.zh.md)最佳实践中所做的类似,我们可以检查 dtm 是否为两个应用程序创建了代码仓库并为其创建了 CI 流水线,同时安装了 Argo CD,而且两个应用程序都使用了 Argo CD 来部署到了 Kubernetes 集群中。
---
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 11 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ plugins:
DTM Commands Explained in Depth: "DTM Commands Explained in Depth"
Plugins: "Plugins"
Use Cases: "Use Cases"
Overview: "Overview"
Reference: "Reference"
Developer Guide: "Developer Guide"
Core Concepts: "Core Concepts"
Commands: "Commands"
Contributor Ladder: "Contributor Ladder"
Road Map: "Road Map"
Code Review Guide: "Code Review Guide"
Overview: "Overview"
Case Overview: "Case Overview"
Contribute Workflow: "Contribute Workflow"
DevStream Architecture: "DevStream Architecture"
Environment Setup and Development: "Environment Setup and Development"
Expand All @@ -86,13 +88,15 @@ plugins:
DTM Commands Explained in Depth: "DTM 命令详解"
Plugins: "插件"
Use Cases: "应用场景"
Overview: "概览"
Reference: "参考实践"
Developer Guide: "开发指导"
Core Concepts: "核心概念"
Commands: "命令"
Contributor Ladder: "贡献者成长阶梯"
Road Map: "路线图"
Code Review Guide: "代码 review 指导"
Overview: "概览"
Case Overview: "场景概览"
Contribute Workflow: "贡献与协作流程"
DevStream Architecture: "DevStream 架构"
Environment Setup and Development: "环境搭建与开发"
Expand All @@ -117,13 +121,15 @@ nav:
- commands/develop*.md
- commands/verify*.md
- Use Cases:
- use-cases/case-overview*.md
- GitLab + Jenkins + Harbor Toolchain Management:
- use-cases/gitlab-jenkins-harbor/*.md
- GitOps with Python Flask:
- use-cases/gitops-python-flask/*.md
- use-cases/gitops*.md
- use-cases/apps*.md
- use-cases/image-registry*.md
- GitOps:
- use-cases/gitops/*.md
- Reference:
- use-cases/reference/*.md
- Plugins:
- plugins/plugins-list*.md
- Helm Installer:
Expand Down

0 comments on commit caf3be9

Please sign in to comment.