Skip to content

Commit

Permalink
fix: resolve merge conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hu <tao.hu@merico.dev>
  • Loading branch information
daniel-hutao committed Aug 8, 2022
2 parents 8960db5 + aee216c commit 050af59
Show file tree
Hide file tree
Showing 100 changed files with 2,425 additions and 1,282 deletions.
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ body:
id: terms
attributes:
label: Please read the documents below.
description: |
1. [Creating a Documentation for DevStream](https://docs.devstream.io/en/latest/development/mkdocs/)
2. [Document Translation(Chinese only)](https://docs.devstream.io/en/latest/development/translation.zh/)
options:
- label: I've read the documents above. (If you want to submit a document type contribution.)
- label: I've read the document [Creating a Documentation for DevStream](https://docs.devstream.io/en/latest/development/mkdocs/) and [Document Translation(Chinese only)](https://docs.devstream.io/en/latest/development/translation.zh/). (If you want to submit a document type contribution.)
required: false
5 changes: 1 addition & 4 deletions .github/workflows/link-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ on:
branches: [ main ]
paths:
- '**.md'
- '.lycheeignore'

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Download Exclude Path
run: |
curl https://raw.githubusercontent.com/devstream-io/devstream/main/.lycheeignore --output .lycheeignore
# replace site base url to build MkDocs in local
- name: Replace Base URL
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ e2e-test-local.yaml

# .devstream
.devstream/
devstream.state
*.state

# e2e
testbin/
Expand Down
2 changes: 2 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
https://github.com/.*/pull/[0-9]+.*
https://github.com/.*/issues/[0-9]+.*
https://fonts.gstatic.com/
.*\$\{.*\}.*
.*ssh.*
.*foo.*
.*bar.*
.*xxx.*
Expand Down
13 changes: 12 additions & 1 deletion docs/plugins/argocd.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,15 @@ This plugin installs [ArgoCD](https://argoproj.github.io/cd/) in an existing Kub
--8<-- "argocd.yaml"
```

Currently, except for `values_yaml`, all the parameters in the example above are mandatory.
### Default Configs

| key | default value | description |
| ---- | ---- | ---- |
| chart.chart_name | argo/argo-cd | argocd's official chart name |
| chart.timeout | 5m | this config will wait 5 minutes to deploy argocd |
| upgradeCRDs | true | default update CRD config |
| chart.wait | true | whether to wait until install is complete |
| repo.url | https://argoproj.github.io/argo-helm | helm repo address |
| repo.name | argo | helm repo name |

Currently, except for `values_yaml` and default configs, all the parameters in the example above are mandatory.
15 changes: 8 additions & 7 deletions docs/plugins/artifactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ If you want to **test the plugin locally**, The following `values_yaml` config

```yaml
values_yaml: |
artifactory:
service:
type: NodePort
nodePort: 30002
nginx:
enabled: false
artifactory:
service:
type: NodePort
nodePort: 30002
nginx:
enabled: false
```
In this configuration
- Postgresql dependencies are automatically created.
- 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).
Expand All @@ -43,4 +44,4 @@ This plugin support`Ingress`, `ClusterIP`, `NodePort` and `LoadBalancer` , You c
--8<-- "artifactory.yaml"
```

Currently, except for `values_yaml`, all the parameters in the example above are mandatory.
Currently, except for `values_yaml`, all the parameters in the example above are mandatory.
14 changes: 8 additions & 6 deletions docs/plugins/artifactory.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@

```yaml
values_yaml: |
artifactory:
service:
type: NodePort
nodePort: 30002
nginx:
enabled: false
artifactory:
service:
type: NodePort
nodePort: 30002
nginx:
enabled: false
```
在该配置下
- helm 会自动创建依赖的 Postgresql;
- 数据挂载的磁盘默认会使用集群上机器的本地磁盘;
- 通过 `NodePort` 对外暴露服务,可使用 `http://{{k8s 节点ip}}:30002` 域名来访问,默认账号名密码为 admin/password (生产环境请替换默认账号密码)。
Expand All @@ -34,6 +35,7 @@ values_yaml: |
可以设置 `customVolumes` 和 `customVolumeMounts` 来配置挂载磁盘,具体配置可参考 [Config](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Filestore)。

#### 网络层配置

该插件支持 `Ingress`, `ClusterIP`, `NodePort`, `LoadBalancer` 对外暴露的模式,可以基于需求进行选择。

### 配置
Expand Down
90 changes: 68 additions & 22 deletions docs/plugins/gitlab-ce-docker.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,83 @@
# gitlab-ce-docker plugin
# gitlab-ce-docker Plugin

This plugin installs [Gitlab-CE](https://about.gitlab.com/) in an existing docker, and the container name is `gitlab`.
## Usage
This plugin installs [GitLab](https://about.gitlab.com/) CE(Community Edition) on Docker.

_NOTICE: currently, this plugin support Linux only._

## Background

GitLab officially provides an image [gitlab-ce](https://registry.hub.docker.com/r/gitlab/gitlab-ce). We can use this image to start a container:

```shell
docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ce:rc
```

The variable `$GITLAB_HOME` here pointing to the directory where the configuration, logs, and data files will reside.

We can set this variable by the `export` command:

```shell
export GITLAB_HOME=/srv/gitlab
```

The GitLab container uses host mounted volumes to store persistent data:

| Local location |Container location | Usage |
| --------------------- | ----------------- | ------------------------------------------ |
| `$GITLAB_HOME/data` | `/var/opt/gitlab` | For storing application data |
| `$GITLAB_HOME/logs` | `/var/log/gitlab` | For storing logs |
| `$GITLAB_HOME/config` | `/etc/gitlab` | For storing the GitLab configuration files |

So, we can customize the following configurations:

1. hostname
2. host port
3. persistent data path
4. docker image tag

## Configuration

Note:
1. the user must be `root` or in `docker` group.
2. https not support now(todo).
1. the user you are using must be `root` or in the `docker` group;
2. `https` isn't supported for now.

```yaml

--8<-- "gitlab-ce-docker.yaml"
```

## Some Commands That May Help

- clone code

```shell
export hostname=YOUR_HOSTNAME
export username=YOUR_USERNAME
export project=YOUR_PROJECT_NAME
```

## Next
Here are some commands that may help you:
1. ssh

get password of user root in gitlab-ce-docker
```shell
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
# port is 22
git clone git@${hostname}/${username}/${project}.git
# port is not 22, 2022 as a sample
git clone ssh://git@${hostname}:2022/${username}/${project}.git
```

git clone:
2. http

```shell
#ssh
# 22 port
git clone git@hostname/.../xxx.git
# if not 22 port
git clone ssh://git@hostname:port/.../xxx.git

# http
# 80 port
git clone http://hostname/.../xxx.git
# if not 80 port
git clone http://hostname:port/.../xxx.git
# port is 80
git clone http://${hostname}/${username}/${project}.git
# port is not 80, 8080 as a sample
git clone http://${hostname}:8080/${username}/${project}.git
```
85 changes: 65 additions & 20 deletions docs/plugins/gitlab-ce-docker.zh.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,81 @@
# gitlab-ce-docker 插件

这个插件用来在本机已存在的 Docker 上安装 [Gitlab-CE](https://about.gitlab.com/), 容器名为 `gitlab`
## 使用
这个插件用于以 Docker 的方式安装 [GitLab](https://about.gitlab.com/) CE(社区版)。

_注意:目前本插件仅支持 Linux。_

## 背景知识

GitLab 官方提供了 [gitlab-ce](https://registry.hub.docker.com/r/gitlab/gitlab-ce) 镜像,通过这个镜像我们可以实现类似这样的命令来启动一个 GitLab 容器:

```shell
docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ce:rc
```

其中 $GITLAB_HOME 表示的是本地存储卷路径,比如我们可以通过 export 命令来设置这个变量:

```shell
export GITLAB_HOME=/srv/gitlab
```

在上述命令中,我们可以看到这个容器使用了3个存储卷,含义分别如下:

| 本地路径 | 容器内路径 | 用途 |
| --------------------- | ----------------- | ----------------- |
| `$GITLAB_HOME/data` | `/var/opt/gitlab` | 保存应用数据 |
| `$GITLAB_HOME/logs` | `/var/log/gitlab` | 保存日志 |
| `$GITLAB_HOME/config` | `/etc/gitlab` | 保存 GitLab 配置文件 |

在此基础上,我们可以自定义如下一些配置:

1. hostname
2. 本机端口
3. 存储卷路径
4. 镜像版本

## 配置

注意:
1. 执行本插件的用户,必须在 `docker` 用户组内,或者是 `root`
2. 目前暂不支持 `https` 访问 gitlab
1. 你使用的用户必须是 `root` 或者在 `docker` 用户组里;
2. 目前暂不支持 `https` 方式访问 GitLab。

```yaml

--8<-- "gitlab-ce-docker.yaml"
```

## 一些可能有用的命令

- 克隆项目

```shell
export hostname=YOUR_HOSTNAME
export username=YOUR_USERNAME
export project=YOUR_PROJECT_NAME
```

## 可能会用到的命令
1. ssh 方式

查看 gitlab 的 root 用户的密码:
```shell
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
# port is 22
git clone git@${hostname}/${username}/${project}.git
# port is not 22, 2022 as a sample
git clone ssh://git@${hostname}:2022/${username}/${project}.git
```

克隆项目:
2. http 方式

```shell
#ssh
# 22 port
git clone git@hostname/.../xxx.git
# if not 22 port
git clone ssh://git@hostname:port/.../xxx.git

# http
# 80 port
git clone http://hostname/.../xxx.git
# if not 80 port
git clone http://hostname:port/.../xxx.git
# port is 80
git clone http://${hostname}/${username}/${project}.git
# port is not 80, 8080 as a sample
git clone http://${hostname}:8080/${username}/${project}.git
```
2 changes: 0 additions & 2 deletions docs/plugins/gitlabci-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ This plugin set up Gitlab Pipeline in an existing Gitlab Java repository.
3. If `Deploy` is enabled, you need to offer the Gitlab Kubernetes agent name(see [Gitlab-Kubernetes](https://docs.gitlab.cn/jh/user/clusters/agent/) for more details). This will deploy the new built application to your Kubernetes cluster. This step will use `deployment.yaml` to automatically deploy the application. Please create `manifests` directory in the repository root and create your `deployment.yaml` configuration file in it.

```yaml

--8<-- "gitlabci-java.yaml"

```
2 changes: 0 additions & 2 deletions docs/plugins/gitlabci-java.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@
3. 如果`Deploy`选项被开启,你需要提供Gitlab配置的Kubernetes代理名称(设置详情参照[Gitlab-Kubernetes](https://docs.gitlab.cn/jh/user/clusters/agent/))。这会将新构建的应用部署至上面提供的Kubernetes集群中。该步骤会使用`deployment.yaml`来自动部署应用,请在仓库根目录下创建`manifests`目录,并在其中新建你的`deployment.yaml`配置文件。

```yaml

--8<-- "gitlabci-java.yaml"

```
2 changes: 2 additions & 0 deletions docs/plugins/harbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ If you want to **test the plugin locally**, The following `values_yaml` config

```yaml
values_yaml: |
externalURL: http://127.0.0.1
expose:
type: nodePort
tls:
Expand All @@ -25,6 +26,7 @@ values_yaml: |
```
In this configuration
- Postgresql and Redis dependencies are automatically created.
- local disks on machines in the cluster are defaulted used for data mounting.
- Only the `harbor` main program is installed, not the rest of the plug-ins.
Expand Down
2 changes: 2 additions & 0 deletions docs/plugins/harbor.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

```yaml
values_yaml: |
externalURL: http://127.0.0.1
expose:
type: nodePort
tls:
Expand All @@ -25,6 +26,7 @@ values_yaml: |
```
在该配置下
- helm 会自动创建依赖的 Postgresql 和 Redis;
- 数据挂载的磁盘默认会使用集群上机器的本地磁盘;
- 只安装 `harbor` 主程序而不会安装其余的插件;
Expand Down
2 changes: 0 additions & 2 deletions docs/plugins/jenkins-github-integ.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ TODO(aFlyBird0): Add your document here.
## Usage

```yaml

--8<-- "jenkins-github-integ.yaml"

```
Loading

0 comments on commit 050af59

Please sign in to comment.