Skip to content

Commit

Permalink
Merge pull request #1325 from windsonsea/cmdr
Browse files Browse the repository at this point in the history
[docs] remove $ from only-command to reduce actions
  • Loading branch information
ErikJiang authored Jul 31, 2024
2 parents e1a311e + 8fca16e commit 7da6188
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 72 deletions.
4 changes: 2 additions & 2 deletions docs/en/usage/airgap.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ sslverify=0
As the process of creating a source involves all the nodes in the cluster, manual scripting is relatively tedious, so a playbook solution is provided here:

``` yaml
```yaml
apiVersion: kubean.io/v1alpha1
kind: ClusterOperation
metadata:
Expand Down Expand Up @@ -234,7 +234,7 @@ spec:
Offline settings need to be referred to [`kubespray`](https://github.com/kubernetes-sigs/kubespray)
Located in `kubespray/inventory/sample/group_vars/all/offline.yml` configuration file:

``` yaml
```yaml
---
## Global offline configuration
### Configure the address of the private container image repository service
Expand Down
23 changes: 11 additions & 12 deletions docs/en/usage/airgap_patch_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ To meet users' needs for components of certain versions, Kubean provides the scr
3. Run the following command to generate an incremental offline package in the `data` folder

```bash
$ docker run \
-v $(pwd)/data:/data \
-v $(pwd)/manifest.yml:/manifest.yml \
ghcr.io/kubean-io/airgap-patch:v0.11.1
docker run \
-v $(pwd)/data:/data \
-v $(pwd)/manifest.yml:/manifest.yml \
ghcr.io/kubean-io/airgap-patch:v0.11.1
```

| Environment Variables | Optional Value Description (:material-checkbox-marked-circle: is default value) |
Expand All @@ -43,7 +43,6 @@ To meet users' needs for components of certain versions, Kubean provides the scr
| MODE | :material-checkbox-marked-circle: `INCR`: Build only the offline resources for the components specified in the configuration (i.e.: incremental packages)|
| | :material-checkbox-blank-circle-outline: `FULL`: Building offline resources includes the components specified in the configuration along with the components necessary for cluster deployment (i.e.: full packages)|


## Use the incremental offline package

The directory structure of the incremental package is as follows:
Expand Down Expand Up @@ -71,23 +70,23 @@ data
1. Write file data into MinIO

```bash
$ cd data/airgap_patch/amd64/files
cd data/airgap_patch/amd64/files
$ MINIO_USER=${username} MINIO_PASS=${password} ./import_files.sh ${minio_address}
MINIO_USER=${username} MINIO_PASS=${password} ./import_files.sh ${minio_address}
```

`minio_address` is the `minio API Server` address, typically on port 9000, for example: `http://1.2.3.4:9000`.

2. Write image data to the docker registry (recommended version 2.6.2) or harbor

```bash
$ cd data/airgap_patch/amd64/images
cd data/airgap_patch/amd64/images
# 1. password-free mode
$ REGISTRY_SCHEME=http REGISTRY_ADDR=${registry_address} ./import_images.sh
REGISTRY_SCHEME=http REGISTRY_ADDR=${registry_address} ./import_images.sh
# 2. Username password mode
$ REGISTRY_SCHEME=https REGISTRY_ADDR=${registry_address} REGISTRY_USER=${username} REGISTRY_PASS=${password} ./import_images.sh
REGISTRY_SCHEME=https REGISTRY_ADDR=${registry_address} REGISTRY_USER=${username} REGISTRY_PASS=${password} ./import_images.sh
```

* `REGISTRY_ADDR` is the address of the mirror repository, e.g. `1.2.3.4:5000`
Expand All @@ -96,8 +95,8 @@ data
3. Write `localartifactset.cr.yaml` to the k8s cluster

```bash
$ cd data/airgap_patch
$ kubectl apply -f localartifactset.cr.yaml
cd data/airgap_patch
kubectl apply -f localartifactset.cr.yaml
```

> This step is to inform the kubean-operator of the new software version available for offline use.
18 changes: 9 additions & 9 deletions docs/en/usage/all_in_one_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
4. The [kubean project](https://github.com/kubean-io/kubean) has been cloned to your local machine. If you haven't cloned kubean yet, you can execute the following command to clone it:

```bash
$ git clone https://github.com/kubean-io/kubean.git
git clone https://github.com/kubean-io/kubean.git
```

---
Expand All @@ -19,14 +19,14 @@ In this tutorial, we will use the `kubean/example` file cloned to your local mac

With the help of the example template, we can use kubean to complete the deployment of a single-node cluster in just two steps.

#### 1. Configure the AllInOne.yml parameters
### 1. Configure the AllInOne.yml parameters

Navigate to the `kubean/examples/install/1.minimal` file path, edit the AllInOne.yml template for single-node mode deployment, and replace the following parameters with your actual parameters.

- `<IP1>`: Node IP.
- `<USERNAME>`: The username for logging into the node. It is recommended to use root or a user with root privileges to log in.
- `<PASSWORD>`: The password for logging into the node.
- `<TAG>`: kubean image version, it is recommended to use the latest version, [Refer to the kubean version list](https://github.com/kubean-io/kubean/tags).
- `<IP1>`: Node IP.
- `<USERNAME>`: The username for logging into the node. It is recommended to use root or a user with root privileges to log in.
- `<PASSWORD>`: The password for logging into the node.
- `<TAG>`: kubean image version, it is recommended to use the latest version, [Refer to the kubean version list](https://github.com/kubean-io/kubean/tags).

For example, the following shows an example of AllInOne.yml:
<details>
Expand Down Expand Up @@ -115,15 +115,15 @@ postHook:
Execute the following command to edit the AllInOne.yml configuration template:
```bash
$ vi kubean/examples/install/1.minimal/AllInOne.yml
vi kubean/examples/install/1.minimal/AllInOne.yml
```

#### 2.Apply the AllInOne.yml configuration
### 2. Apply the AllInOne.yml configuration

After completing the above steps and saving the AllInOne.yml file, execute the following command:

```bash
$ kubectl apply -f examples/install/1.minimal/AllInOne.yml
kubectl apply -f examples/install/1.minimal/AllInOne.yml
```

At this point, you have completed the deployment of a simple single-node cluster.
25 changes: 12 additions & 13 deletions docs/en/usage/helm_install_kubean.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,51 @@

## Deployment

#### 1. Add kubean Helm repository
### 1. Add kubean Helm repository

Add the kubean Helm repository to your local Helm repository by executing the following command on your existing cluster control node or cloud terminal.

```bash
helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/
```
$ helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/
```

After completing the previous step, check if the kubean repository has been added correctly to your local Helm repository.

```bash
$ helm repo list
# Expected output:

NAME URL
kubean-io https://kubean-io.github.io/kubean-helm-chart/
```

#### 2. Install kubean
### 2. Install kubean

Check the available charts and their versions in the kubean Helm repository by executing the following command, which will list all the charts available in the kubean Helm repository.

```bash
helm search repo kubean
$ helm search repo kubean

# Expected output:
NAME CHART VERSION APP VERSION DESCRIPTION
kubean-io/kubean v0.5.2 v0.5.2 A Helm chart for kubean
```

After completing the above steps, execute the following command to install kubean.

```bash
$ helm install kubean kubean-io/kubean --create-namespace -n kubean-system
helm install kubean kubean-io/kubean --create-namespace -n kubean-system
```

!!!note
!!! note

You can also use the "--version" parameter to specify the version of kubean.

#### 3. View installed kubean release
### 3. View installed kubean release

You have now completed the deployment of the kubean Helm chart. You can execute the following command to view the helm release in the kubean-system namespace.

```bash
$ helm ls -n kubean-system

# Expected output:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
kubean kubean-system 1 2023-05-15 00:24:32.719770617 -0400 -0400 deployed kubean-v0.4.9-rc1 v0.4.9-rc1

```
```
25 changes: 12 additions & 13 deletions docs/zh/usage/airgap_patch_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
3. 使用镜像,等待运行退出后,在 `data` 文件夹中生成增量离线包

```bash
$ docker run \
-v $(pwd)/data:/data \
-v $(pwd)/manifest.yml:/manifest.yml \
-e ZONE=CN \
ghcr.io/kubean-io/airgap-patch:v0.11.1
docker run \
-v $(pwd)/data:/data \
-v $(pwd)/manifest.yml:/manifest.yml \
-e ZONE=CN \
ghcr.io/kubean-io/airgap-patch:v0.11.1
```

| 环境变量 | 可选值描述 (:material-checkbox-marked-circle: :表示默认值) |
Expand All @@ -45,7 +45,6 @@
| MODE | :material-checkbox-marked-circle: `INCR`: 仅构建配置中指定组件的离线资源(即:增量包)|
| | :material-checkbox-blank-circle-outline: `FULL`: 将构建配置中指定的组件以及集群部署必要其他组件的离线资源(即:全量包)|


## 使用增量离线包

增量包的目录结构如下:
Expand Down Expand Up @@ -73,23 +72,23 @@ data
1. 向 MinIO 中写入文件数据

```bash
$ cd data/airgap_patch/amd64/files
cd data/airgap_patch/amd64/files
$ MINIO_USER=${username} MINIO_PASS=${password} ./import_files.sh ${minio_address}
MINIO_USER=${username} MINIO_PASS=${password} ./import_files.sh ${minio_address}
```

`minio_address` 是 `minio API Server` 地址,端口一般为 9000,比如 `http://1.2.3.4:9000`。

2. 向 Docker Registry(推荐使用 2.6.2 版本)或者 Harbor 写入镜像数据

```bash
$ cd data/airgap_patch/amd64/images
cd data/airgap_patch/amd64/images
# 1. 免密模式
$ REGISTRY_SCHEME=http REGISTRY_ADDR=${registry_address} ./import_images.sh
REGISTRY_SCHEME=http REGISTRY_ADDR=${registry_address} ./import_images.sh
# 2. 用户名口令模式
$ REGISTRY_SCHEME=https REGISTRY_ADDR=${registry_address} REGISTRY_USER=${username} REGISTRY_PASS=${password} ./import_images.sh
REGISTRY_SCHEME=https REGISTRY_ADDR=${registry_address} REGISTRY_USER=${username} REGISTRY_PASS=${password} ./import_images.sh
```

* `REGISTRY_ADDR` 是镜像仓库的地址,比如`1.2.3.4:5000`
Expand All @@ -98,8 +97,8 @@ data
3. 将 `localartifactset.cr.yaml` 写入到 K8s 集群

```bash
$ cd data/airgap_patch
$ kubectl apply -f localartifactset.cr.yaml
cd data/airgap_patch
kubectl apply -f localartifactset.cr.yaml
```

> 这一步是为了将新的可离线使用的软件版本信息告知 kubean-operator。
20 changes: 10 additions & 10 deletions docs/zh/usage/all_in_one_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
4. [kubean 项目](https://github.com/kubean-io/kubean)已经克隆至您本地,如果您还未克隆 kubean,可以执行执行如下命令进行克隆:

```bash
$ git clone https://github.com/kubean-io/kubean.git
git clone https://github.com/kubean-io/kubean.git
```

---
Expand All @@ -19,14 +19,14 @@ $ git clone https://github.com/kubean-io/kubean.git

借助案例模板,仅需两步我们就能使用 kubean 完成一个单节点集群的部署。

#### 1. 配置 AllInOne.yml 参数
### 1. 配置 AllInOne.yml 参数

进入 `kubean/examples/install/1.minimal` 文件路径下,编辑单节点模式部署模板 AllInOne.yml,将下列参数替换为您的真实参数。

- `<IP1>`:节点 IP。
- `<USERNAME>`:登陆节点的用户名,建议使用 root 或具有 root 权限的用户登陆。
- `<PASSWORD>`:登陆节点的密码。
- `<TAG>`:kubean 镜像版本,推荐使用最新版本,[参阅 kubean 版本列表](https://github.com/kubean-io/kubean/tags)
- `<IP1>`:节点 IP。
- `<USERNAME>`:登陆节点的用户名,建议使用 root 或具有 root 权限的用户登陆。
- `<PASSWORD>`:登陆节点的密码。
- `<TAG>`:kubean 镜像版本,推荐使用最新版本,[参阅 kubean 版本列表](https://github.com/kubean-io/kubean/tags)

例如,下面展示了一个 AllInOne.yml 示例:
<details>
Expand Down Expand Up @@ -115,15 +115,15 @@ postHook:
执行如下命令编辑 AllInOne.yml 配置模板:
```bash
$ vi kubean/examples/install/1.minimal/AllInOne.yml
vi kubean/examples/install/1.minimal/AllInOne.yml
```

#### 2.应用 AllInOne.yml 配置
### 2. 应用 AllInOne.yml 配置

完成上述步骤并保存 AllInOne.yml 文件后,执行如下命令:

```bash
$ kubectl apply -f examples/install/1.minimal/AllInOne.yml
kubectl apply -f examples/install/1.minimal/AllInOne.yml
```

至此,您已经完成了一个简单的单节点集群的部署。
至此,您已经完成了一个简单的单节点集群的部署。
24 changes: 11 additions & 13 deletions docs/zh/usage/helm_install_kubean.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,50 @@

## 开始部署

#### 1. 添加 kubean Helm 仓库
### 1. 添加 kubean Helm 仓库

将 kubean Helm 仓库添加到本地 Helm 仓库,在现有集群控制节点或云终端上执行如下命令。

```bash
helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/
```
$ helm repo add kubean-io https://kubean-io.github.io/kubean-helm-chart/
```

完成上一步后检查 kubean 仓库是否已经正确添加至本地 Helm 仓库。

```
```bash
$ helm repo list
# 预期输出如下:

NAME URL
kubean-io https://kubean-io.github.io/kubean-helm-chart/
```

#### 2. 安装 kubean
### 2. 安装 kubean

检查 kubean Helm 仓库中可用的 Chart 及其版本,执行下面命令将列出 kubean Helm 仓库内所有的 Chart 列表。

```bash
helm search repo kubean
$ helm search repo kubean

# 预期输出如下:
NAME CHART VERSION APP VERSION DESCRIPTION
kubean-io/kubean v0.5.2 v0.5.2 A Helm chart for kubean
```

完成上述步骤后,,执行如下命令安装 kubean。

```bash
$ helm install kubean kubean-io/kubean --create-namespace -n kubean-system
helm install kubean kubean-io/kubean --create-namespace -n kubean-system
```

!!!note
您还可以使用 "--version" 参数来指定 kubean 的版本。

#### 3. 查看已安装的 kubean release
### 3. 查看已安装的 kubean release

至此,您已经完成了 kubean helm chart 的部署,您可以执行如下命令查看 kubean-system 命名空间下的 helm release。

```bash
$ helm ls -n kubean-system

# 预期输出如下:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
kubean kubean-system 1 2023-05-15 00:24:32.719770617 -0400 -0400 deployed kubean-v0.4.9-rc1 v0.4.9-rc1

```
```

0 comments on commit 7da6188

Please sign in to comment.