Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update jenkins plugin doc #784

Merged
merged 2 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions docs/plugins/jenkins.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
# jenkins Plugin

This plugin installs [jenkins](https://jenkins.io) in an existing Kubernetes cluster using the Helm chart.
This plugin installs [Jenkins](https://jenkins.io) in an existing Kubernetes cluster using the Helm chart.

## Usage

### NOTICE
### Production Environment

#### Production Environments
Please be sure to change the `storageClass` in the configuration item to an existing StorageClass.
Please be sure to change the `storageClass` in the options of the config to an existing StorageClass.

### Test/Local Dev Environment

#### Test Environments
If you want to **test** the plugin in a **local environment**:

1. Please change the `test_env` to `true` in the config file.
2. Create the data directory manually in the host where kubernetes is running:
2. Create the data directory manually in the host where Kubernetes is running. Here's how:
IronCore864 marked this conversation as resolved.
Show resolved Hide resolved

If you run Kubernetes and `dtm` on the same host:

```bash
# If you run k8s and dtm in the same host
mkdir -p ~/data/jenkins-volume/
chown -R 1000:1000 ~/data/jenkins-volume/
```

-------------------------
Or, if you run Kubernetes and `dtm` on different "hosts," such as running Kubernetes in an VM or a Docker container:

# If you run k8s and dtm in different hosts, such as run k8s in docker
# 1 Get the home directory of the user who runs dtm
```bash
# 1 get the home directory of the user who runs dtm
cd ~ && pwd
# 2 Copy the result of the above command
# 3 Enter the host on which k8s is running
# 2 copy the result of the above command
# 3 enter the host on which k8s is running
# 3.1 for minikube
minikube ssh
# 3.2 for kind
docker exec -it <kind-container-name-or-id> bash
# 4 Create the data directory manually in the host where kubernetes is running:
# 4 Create the data directory manually in the host where k8s is running:
mkdir -p <your-dtm-home-dir>/data/jenkins-volume/
chown -R 1000:1000 <your-dtm-home-dir>/data/jenkins-volume/
```
Expand Down
18 changes: 10 additions & 8 deletions docs/plugins/jenkins.zh.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# jenkins 插件

本插件使用 helm 在已有的 k8s 集群上安装 [jenkins](https://jenkins.io)。
本插件使用 helm 在已有的 k8s 集群上安装 [Jenkins](https://jenkins.io)。

## 使用方法

### 注意
### 生产环境

#### 生产环境
请将配置中的 `storageClass` 修改为已存在的 StorageClass.

#### 测试环境
### 测试环境

如果你想**在本地测试插件**:

1. 请将配置文件中的 `test_env` 改为 `true`。
2. 在运行 k8s 的主机上创建数据目录并修改权限,命令如下:
2. 在运行 Kubernetes 的主机上创建数据目录并修改权限,命令如下:

如果 Kubernetes 和 dtm 运行在同一个主机上:

```bash
# 如果 k8s 和 dtm 运行在同一个主机上
mkdir -p ~/data/jenkins-volume/
chown -R 1000:1000 ~/data/jenkins-volume/
```

-------------------------
如果 Kubernetes 和 dtm 运行在不同的主机上,比如 Kubernetes 运行在 虚拟机或者 Docker 容器中:

# 如果 k8s 和 dtm 运行在不同的主机上,比如 k8s 运行在 docker 中
```bash
# 1 获取 dtm 运行的主机的用户的 home 目录
cd ~ && pwd
# 2 复制上面的命令结果
Expand Down