Update Docs: Deploy GitLab
Signed-off-by: Felixnoo <felixliu@yunify.com>
|
|
@ -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**.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
### 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**.
|
||||
|
||||

|
||||

|
||||
|
||||
2. In the dialog that appears, select **From App Templates**.
|
||||
2. In the displayed dialog box, select **From App Templates**.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Select `main` from the drop-down list, then click **gitlab**.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
@ -79,13 +77,13 @@ This tutorial demonstrates how to deploy GitLab on KubeSphere.
|
|||
|
||||
7. Wait for GitLab to be up and running.
|
||||
|
||||

|
||||

|
||||
|
||||
8. Go to **Workloads**, and you can see all the Deployments and StatefulSets created for GitLab.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
{{< 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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### 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.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< 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`).
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,15 +43,15 @@ weight: 14310
|
|||
|
||||
3. 从下拉菜单中选择 `main`,然后点击 **gitlab**。
|
||||
|
||||

|
||||

|
||||
|
||||
4. 在**应用信息**选项卡和**配置文件**选项卡,可以看到控制台的默认配置。点击**部署**继续。
|
||||
|
||||

|
||||

|
||||
|
||||
5. 在**基本信息**页面,可以看到应用名称、应用版本以及部署位置。点击**下一步**继续。
|
||||
5. 在**基本信息**页面,可以看到应用名称、应用版本以及部署位置。本教程使用 `4.2.3 [13.2.2]` 版本。点击**下一步**继续。
|
||||
|
||||

|
||||

|
||||
|
||||
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
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
@ -79,13 +77,13 @@ weight: 14310
|
|||
|
||||
7. 等待 GitLab 正常运行。
|
||||
|
||||

|
||||

|
||||
|
||||
8. 访问**工作负载**,可以看到为 GitLab 创建的所有部署和有状态副本集。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
@ -97,13 +95,11 @@ weight: 14310
|
|||
|
||||
1. 访问**配置中心**的密钥,在搜索栏输入 `gitlab-initial-root-password`,然后按下键盘上的**回车键**来搜索密钥。
|
||||
|
||||

|
||||

|
||||
|
||||
2. 点击密钥访问其详情页,然后点击右上角的眼睛图标查看密码。请确保将密码进行复制。
|
||||
2. 点击密钥访问其详情页,然后点击右上角的 <img src="/images/docs/zh-cn/appstore/external-apps/deploy-gitlab/eye-icon.png" width="20px" /> 查看密码。请确保将密码进行复制。
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### 步骤 4:编辑 hosts 文件
|
||||
|
||||
|
|
@ -130,9 +126,9 @@ weight: 14310
|
|||
|
||||
### 步骤 5:访问 GitLab
|
||||
|
||||
1. 访问**应用负载**下的**服务**,在搜索栏输入 `nginx-ingress-controller`,然后按下键盘上的**回车键**搜索该服务,可以看到通过端口 `32618` 暴露的服务,您可以使用该端口访问 GitLab。
|
||||
1. 访问**应用负载**下的**服务**,在搜索栏输入 `nginx-ingress-controller`,然后按下键盘上的**回车键**搜索该服务,可以看到通过端口 `31246` 暴露的服务,您可以使用该端口访问 GitLab。
|
||||
|
||||

|
||||

|
||||
|
||||
{{< 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。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 549 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 423 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 772 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 672 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 294 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 635 KiB |
|
After Width: | Height: | Size: 655 KiB |
|
After Width: | Height: | Size: 471 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 541 KiB |
|
After Width: | Height: | Size: 665 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 575 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 636 KiB |
|
After Width: | Height: | Size: 549 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 418 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 782 KiB |
|
After Width: | Height: | Size: 330 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 614 KiB |
|
After Width: | Height: | Size: 573 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 266 KiB |
|
After Width: | Height: | Size: 673 KiB |
|
Before Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 654 KiB |