Update Docs: Deploy GitLab

Signed-off-by: Felixnoo <felixliu@yunify.com>
This commit is contained in:
Felixnoo 2021-08-11 13:02:58 +08:00
parent 908bb6dd23
commit c80de44f9b
56 changed files with 60 additions and 68 deletions

View File

@ -13,63 +13,61 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
## Prerequisites
- You need to enable [the OpenPitrix system](../../../pluggable-components/app-store/).
- You need to create a workspace, a project, and two user accounts (`ws-admin` and `project-regular`) for this tutorial. The account `ws-admin` must be granted the role of `workspace-admin` in the workspace, and the account `project-regular` must be invited to the project with the role of `operator`. If they are not ready, refer to [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/).
- You need to create a workspace, a project, and two accounts (`ws-admin` and `project-regular`) for this tutorial. The account `ws-admin` must be granted the role of `workspace-admin` in the workspace, and the account `project-regular` must be invited to the project with the role of `operator`. If they are not ready, refer to [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/).
## Hands-on Lab
### Step 1: Add an app repository
1. Log in to KubeSphere as `ws-admin`. In your workspace, go to **App Repos** under **Apps Management**, and then click **Add Repo**.
1. Log in to KubeSphere as `ws-admin`. In your workspace, go to **App Repositories** under **App Management**, and then click **Add**.
![add-repo](/images/docs/appstore/external-apps/deploy-gitlab/add-repo.PNG)
![add-repo](/images/docs/appstore/external-apps/deploy-gitlab/add_repo.png)
2. In the dialog that appears, enter `main` for the app repository name and `https://charts.kubesphere.io/main` for the app repository URL. Click **Validate** to verify the URL and you will see a green check mark next to the URL if it is available. Click **OK** to continue.
2. In the displayed dialog box, enter `main` for the app repository name and `https://charts.kubesphere.io/main` for the app repository URL. Click **Validate** to verify the URL and you will see a green check mark next to the URL if it is available. Click **OK** to continue.
![add-main-repo](/images/docs/appstore/external-apps/deploy-gitlab/add-main-repo.PNG)
![add-main-repo](/images/docs/appstore/external-apps/deploy-gitlab/add-main_repo.png)
3. The repository displays in the list after successfully imported to KubeSphere.
3. The repository is displayed in the list after successfully imported to KubeSphere.
![added-main-repo](/images/docs/appstore/external-apps/deploy-gitlab/added-main-repo.PNG)
![added-main-repo](/images/docs/appstore/external-apps/deploy-gitlab/added-main_repo.png)
### Step 2: Deploy GitLab
1. Log out of KubeSphere and log back in as `project-regular`. In your project, go to **Applications** under **Application Workloads** and click **Deploy New Application**.
1. Log out of KubeSphere and log back in as `project-regular`. In your project, go to **Apps** under **Application Workloads** and click **Deploy New App**.
![deploy-app](/images/docs/appstore/external-apps/deploy-gitlab/deploy-app.PNG)
![deploy-app](/images/docs/appstore/external-apps/deploy-gitlab/deploy_app.png)
2. In the dialog that appears, select **From App Templates**.
2. In the displayed dialog box, select **From App Templates**.
![from-app-templates](/images/docs/appstore/external-apps/deploy-gitlab/from-app-templates.PNG)
![from-app-templates](/images/docs/appstore/external-apps/deploy-gitlab/from-app_templates.png)
3. Select `main` from the drop-down list, then click **gitlab**.
![click-gitlab](/images/docs/appstore/external-apps/deploy-gitlab/click-gitlab.PNG)
![click-gitlab](/images/docs/appstore/external-apps/deploy-gitlab/click_gitlab.png)
4. On the **App Info** tab and the **Chart Files** tab, you can view the default configuration from the console. Click **Deploy** to continue.
4. On the **App Information** tab and the **Chart Files** tab, you can view the default configuration from the console. Click **Deploy** to continue.
![view-config](/images/docs/appstore/external-apps/deploy-gitlab/view-config.PNG)
![view-config](/images/docs/appstore/external-apps/deploy-gitlab/view_config.png)
5. On the **Basic Info** page, you can view the app name, app version, and deployment location. Click **Next** to continue.
5. On the **Basic Information** page, you can view the app name, app version, and deployment location. This tutorial uses the version `4.2.3 [13.2.2]`. Click **Next** to continue.
![basic-info](/images/docs/appstore/external-apps/deploy-gitlab/basic-info.PNG)
![basic-info](/images/docs/appstore/external-apps/deploy-gitlab/basic_info.png)
6. On the **App Config** page, use the following configurations to replace the default configurations, and then click **Deploy**.
6. On the **App Configurations** page, use the following configurations to replace the default configurations, and then click **Deploy**.
```yaml
global:
hosts:
domain: demo-project.svc.cluster.local
gitlab-runner:
install: false
gitlab:
webservice:
helmTests:
enabled: false
gitlab-runner:
install: false
gitlab:
webservice:
helmTests:
enabled: false
```
![change-value](/images/docs/appstore/external-apps/deploy-gitlab/change-value.PNG)
![change-value](/images/docs/appstore/external-apps/deploy-gitlab/change_value.png)
{{< notice note >}}
@ -79,13 +77,13 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
7. Wait for GitLab to be up and running.
![gitlab-running](/images/docs/appstore/external-apps/deploy-gitlab/gitlab-running.PNG)
![gitlab-running](/images/docs/appstore/external-apps/deploy-gitlab/gitlab_running.png)
8. Go to **Workloads**, and you can see all the Deployments and StatefulSets created for GitLab.
![deployments-running](/images/docs/appstore/external-apps/deploy-gitlab/deployments-running.PNG)
![deployments-running](/images/docs/appstore/external-apps/deploy-gitlab/deployments_running.png)
![statefulsets-running](/images/docs/appstore/external-apps/deploy-gitlab/statefulsets-running.PNG)
![statefulsets-running](/images/docs/appstore/external-apps/deploy-gitlab/statefulsets_running.png)
{{< notice note >}}
@ -95,15 +93,13 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
### Step 3: Get the root user's password
1. Go to **Secrets** under **Configurations**, enter `gitlab-initial-root-password` in the search bar, and then press **Enter** on your keyboard to search the Secret.
1. Go to **Secrets** under **Configurations**, enter `gitlab-initial-root-password` in the search box, and then press **Enter** on your keyboard to search the Secret.
![search-secret](/images/docs/appstore/external-apps/deploy-gitlab/search-secret.PNG)
![search-secret](/images/docs/appstore/external-apps/deploy-gitlab/search_secret.png)
2. Click the Secret to go to its detail page, and then click the eye icon in the upper-right corner to view the password. Make sure you copy it.
2. Click the Secret to go to its detail page, and then click <img src="/images/docs/appstore/external-apps/deploy-gitlab/eye-icon.png" width="20px" /> in the upper-right corner to view the password. Make sure you copy it.
![click-eye-icon](/images/docs/appstore/external-apps/deploy-gitlab/click-eye-icon.PNG)
![password](/images/docs/appstore/external-apps/deploy-gitlab/password.PNG)
![password](/images/docs/appstore/external-apps/deploy-gitlab/initial_password.png)
### Step 4: Edit the hosts file
@ -130,9 +126,9 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
### Step 5: Access GitLab
1. Go to **Services** under **Application Workloads**, enter `nginx-ingress-controller` in the search bar, and then press **Enter** on your keyboard to search the Service. You can see the Service is being exposed through port `32618`, which you can use to access GitLab.
1. Go to **Services** under **Application Workloads**, enter `nginx-ingress-controller` in the search box, and then press **Enter** on your keyboard to search the Service. You can see the Service is being exposed through port `31246`, which you can use to access GitLab.
![search-service](/images/docs/appstore/external-apps/deploy-gitlab/search-service.PNG)
![search-service](/images/docs/appstore/external-apps/deploy-gitlab/search_service.png)
{{< notice note >}}
@ -140,11 +136,11 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
{{</ notice >}}
2. Access GitLab through `http://gitlab.demo-project.svc.cluster.local:32618` using the root account and its initial password (`root/LAtonWwrzFvbAW560gaZ0oty6slpkCcywzzCCpeqql9bxIjJBMSGys43zSwq3d9I`).
2. Access GitLab through `http://gitlab.demo-project.svc.cluster.local:31246` using the root account and its initial password (`root/ojPWrWECLWN0XFJkGs7aAqtitGMJlVfS0fLEDE03P9S0ji34XDoWmxs2MzgZRRWF`).
![access-gitlab](/images/docs/appstore/external-apps/deploy-gitlab/access-gitlab.PNG)
![access-gitlab](/images/docs/appstore/external-apps/deploy-gitlab/access_gitlab.png)
![gitlab-console](/images/docs/appstore/external-apps/deploy-gitlab/gitlab-console.PNG)
![gitlab-console](/images/docs/appstore/external-apps/deploy-gitlab/gitlab_console.png)
{{< notice note >}}

View File

@ -43,15 +43,15 @@ weight: 14310
3. 从下拉菜单中选择 `main`,然后点击 **gitlab**
![click-gitlab](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/click-gitlab.png)
![click-gitlab](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/click_gitlab.png)
4. 在**应用信息**选项卡和**配置文件**选项卡,可以看到控制台的默认配置。点击**部署**继续。
![view-config](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/view-config.png)
![view-config](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/view_config.png)
5. 在**基本信息**页面,可以看到应用名称、应用版本以及部署位置。点击**下一步**继续。
5. 在**基本信息**页面,可以看到应用名称、应用版本以及部署位置。本教程使用 `4.2.3 [13.2.2]` 版本。点击**下一步**继续。
![basic-info](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/basic-info.png)
![basic-info](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/basic_info.png)
6. 在**应用配置**页面,使用以下配置替换默认配置,然后点击**部署**。
@ -59,17 +59,15 @@ weight: 14310
global:
hosts:
domain: demo-project.svc.cluster.local
gitlab-runner:
install: false
gitlab:
webservice:
helmTests:
enabled: false
gitlab-runner:
install: false
gitlab:
webservice:
helmTests:
enabled: false
```
![change-value](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/change-value.png)
![change-value](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/change_value.png)
{{< notice note >}}
@ -79,13 +77,13 @@ weight: 14310
7. 等待 GitLab 正常运行。
![gitlab-running](/images/docs/appstore/external-apps/deploy-gitlab/gitlab-running.PNG)
![gitlab-running](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/gitlab-running.png)
8. 访问**工作负载**,可以看到为 GitLab 创建的所有部署和有状态副本集。
![deployments-running](/images/docs/appstore/external-apps/deploy-gitlab/deployments-running.PNG)
![deployments-running](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/deployments-running.png)
![statefulsets-running](/images/docs/appstore/external-apps/deploy-gitlab/statefulsets-running.PNG)
![statefulsets-running](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/statefulsets-running.png)
{{< notice note >}}
@ -97,13 +95,11 @@ weight: 14310
1. 访问**配置中心**的密钥,在搜索栏输入 `gitlab-initial-root-password`,然后按下键盘上的**回车键**来搜索密钥。
![search-secret](/images/docs/appstore/external-apps/deploy-gitlab/search-secret.PNG)
![search-secret](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/search-secret.png)
2. 点击密钥访问其详情页,然后点击右上角的眼睛图标查看密码。请确保将密码进行复制。
2. 点击密钥访问其详情页,然后点击右上角的 <img src="/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/eye-icon.png" width="20px" /> 查看密码。请确保将密码进行复制。
![click-eye-icon](/images/docs/appstore/external-apps/deploy-gitlab/click-eye-icon.PNG)
![password](/images/docs/appstore/external-apps/deploy-gitlab/password.PNG)
![password](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/initial-password.png)
### 步骤 4编辑 hosts 文件
@ -130,9 +126,9 @@ weight: 14310
### 步骤 5访问 GitLab
1. 访问**应用负载**下的**服务**,在搜索栏输入 `nginx-ingress-controller`,然后按下键盘上的**回车键**搜索该服务,可以看到通过端口 `32618` 暴露的服务,您可以使用该端口访问 GitLab。
1. 访问**应用负载**下的**服务**,在搜索栏输入 `nginx-ingress-controller`,然后按下键盘上的**回车键**搜索该服务,可以看到通过端口 `31246` 暴露的服务,您可以使用该端口访问 GitLab。
![search-service](/images/docs/appstore/external-apps/deploy-gitlab/search-service.PNG)
![search-service](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/search-service.png)
{{< notice note >}}
@ -140,11 +136,11 @@ weight: 14310
{{</ notice >}}
2. 通过 `http://gitlab.demo-project.svc.cluster.local:32618` 使用 root 帐户及其初始密码 (`root/LAtonWwrzFvbAW560gaZ0oty6slpkCcywzzCCpeqql9bxIjJBMSGys43zSwq3d9I`) 访问 GitLab。
2. 通过 `http://gitlab.demo-project.svc.cluster.local:31246` 使用 root 帐户及其初始密码 (`root/ojPWrWECLWN0XFJkGs7aAqtitGMJlVfS0fLEDE03P9S0ji34XDoWmxs2MzgZRRWF`) 访问 GitLab。
![access-gitlab](/images/docs/appstore/external-apps/deploy-gitlab/access-gitlab.PNG)
![access-gitlab](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/access_gitlab.png)
![gitlab-console](/images/docs/appstore/external-apps/deploy-gitlab/gitlab-console.PNG)
![gitlab-console](/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/gitlab_console.png)
{{< notice note >}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 KiB