Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0696913
feat: docker installer
aFlyBird0 Aug 1, 2022
97776ba
refactor: generic k8s resource status getter and common repo
steinliber Aug 2, 2022
9f34d7a
fix: forget to assign `RmDataAfterDelete`
aFlyBird0 Aug 2, 2022
c0f2d0f
Merge pull request #934 from steinliber/feat-generic-ci-plugin
IronCore864 Aug 3, 2022
6c5dba3
feat: support helm plugin default value
steinliber Aug 3, 2022
044c8f3
fix: repair name error
steinliber Aug 3, 2022
68ad6b2
chore: minor changes in gitlab-ce-docker and docker installer
aFlyBird0 Aug 3, 2022
d001f0f
fix: ues bool type
steinliber Aug 3, 2022
2e99ac2
Merge pull request #933 from aFlyBird0/docker-installer
daniel-hutao Aug 3, 2022
2bf0105
fix: issue template error with documentation type
daniel-hutao Aug 3, 2022
583b2ba
Merge pull request #937 from merico-dev/feat-gitlab
iyear Aug 4, 2022
44f9865
fix: fail to create github webhook automatically
aFlyBird0 Aug 3, 2022
adb0223
docs: gitlab-ce-docker docs enhancement
daniel-hutao Aug 5, 2022
669e853
fix: link checker is failed
daniel-hutao Aug 5, 2022
855ee45
chore: gitignore file enhancement
daniel-hutao Aug 5, 2022
1c2ac7b
Merge pull request #946 from merico-dev/feat-gitlab
daniel-hutao Aug 5, 2022
1dab503
fix: harbor and artifactory doc error
steinliber Aug 5, 2022
5fdfe13
fix: log error
steinliber Aug 5, 2022
ce66f89
ci: use `.lycheeignore` in current pr rather than `main` branch and u…
aFlyBird0 Aug 5, 2022
1c68eea
Merge pull request #949 from aFlyBird0/fix-ci-links-pr
aFlyBird0 Aug 5, 2022
1ff41b5
Merge pull request #951 from steinliber/bugfix-plugin-error
IronCore864 Aug 5, 2022
b3ba2c5
Merge pull request #936 from steinliber/feat-plugin-optimize
IronCore864 Aug 5, 2022
f5019ed
docs: fix artifactory plugin doc format error
aFlyBird0 Aug 5, 2022
fcf4c2b
docs: fix link error in tekton
aFlyBird0 Aug 5, 2022
34b1f9a
Merge pull request #953 from aFlyBird0/fix_arti
daniel-hutao Aug 5, 2022
531a68b
docs: update template of plugin readme file
aFlyBird0 Aug 5, 2022
67047d4
feat: extract file template logic and add test
steinliber Aug 4, 2022
162ffd3
Merge pull request #954 from aFlyBird0/fix-link
daniel-hutao Aug 7, 2022
ccddf7a
refactor: some minor refactoring with plugin gitlab-ce-docker
daniel-hutao Aug 7, 2022
fc4ed5a
feat: gitlab-ce-docker shows the command to get root passwd after ins…
daniel-hutao Aug 7, 2022
aec418a
feat: add defaults logic with gitlab-ce-docker plugin
daniel-hutao Aug 7, 2022
2f33e1f
docs: document enhancement with gitlab-ce-docker plugin
daniel-hutao Aug 7, 2022
c162a83
chore: use util/types to handle *bool type in gitlab-ce-docker plugin
daniel-hutao Aug 7, 2022
7e0dcbb
fix: add token to avoid github api rate limit
csonezp Aug 5, 2022
73240c8
fix: some bugfix according tests
daniel-hutao Aug 7, 2022
34254f7
docs: update gitlab-ce-docker english docs
IronCore864 Aug 8, 2022
e1d5124
Merge pull request #957 from csonezp/fix_quickstart
IronCore864 Aug 8, 2022
944c288
Merge pull request #950 from steinliber/refactor-unify-template-proce…
IronCore864 Aug 8, 2022
8f02a77
chore: fix failed ut
IronCore864 Aug 8, 2022
aee216c
Merge pull request #959 from merico-dev/feat-gitlab
aFlyBird0 Aug 8, 2022
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
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