From 8fca16e7fb04b8c1fbdf0ab42fc87c1c9bc69f61 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Fri, 26 Jul 2024 14:39:41 +0800 Subject: [PATCH] remove $ from only-command to reduce actions Signed-off-by: windsonsea --- docs/en/usage/airgap.md | 4 ++-- docs/en/usage/airgap_patch_usage.md | 23 +++++++++++------------ docs/en/usage/all_in_one_install.md | 18 +++++++++--------- docs/en/usage/helm_install_kubean.md | 25 ++++++++++++------------- docs/zh/usage/airgap_patch_usage.md | 25 ++++++++++++------------- docs/zh/usage/all_in_one_install.md | 20 ++++++++++---------- docs/zh/usage/helm_install_kubean.md | 24 +++++++++++------------- 7 files changed, 67 insertions(+), 72 deletions(-) diff --git a/docs/en/usage/airgap.md b/docs/en/usage/airgap.md index cd3b10200..17dded85a 100644 --- a/docs/en/usage/airgap.md +++ b/docs/en/usage/airgap.md @@ -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: @@ -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 diff --git a/docs/en/usage/airgap_patch_usage.md b/docs/en/usage/airgap_patch_usage.md index fbb6d41e9..f4f9f9994 100644 --- a/docs/en/usage/airgap_patch_usage.md +++ b/docs/en/usage/airgap_patch_usage.md @@ -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) | @@ -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: @@ -71,9 +70,9 @@ 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`. @@ -81,13 +80,13 @@ data 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` @@ -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. diff --git a/docs/en/usage/all_in_one_install.md b/docs/en/usage/all_in_one_install.md index b523322f9..5c6f14c9b 100644 --- a/docs/en/usage/all_in_one_install.md +++ b/docs/en/usage/all_in_one_install.md @@ -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 ``` --- @@ -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. - - ``: Node IP. - - ``: The username for logging into the node. It is recommended to use root or a user with root privileges to log in. - - ``: The password for logging into the node. - - ``: kubean image version, it is recommended to use the latest version, [Refer to the kubean version list](https://github.com/kubean-io/kubean/tags). +- ``: Node IP. +- ``: The username for logging into the node. It is recommended to use root or a user with root privileges to log in. +- ``: The password for logging into the node. +- ``: 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:
@@ -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. diff --git a/docs/en/usage/helm_install_kubean.md b/docs/en/usage/helm_install_kubean.md index 98c4c36e2..be9237acb 100644 --- a/docs/en/usage/helm_install_kubean.md +++ b/docs/en/usage/helm_install_kubean.md @@ -9,30 +9,30 @@ ## 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 ``` @@ -40,21 +40,20 @@ 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 - -``` \ No newline at end of file +``` diff --git a/docs/zh/usage/airgap_patch_usage.md b/docs/zh/usage/airgap_patch_usage.md index 4ca3ae6b7..fc6be838b 100644 --- a/docs/zh/usage/airgap_patch_usage.md +++ b/docs/zh/usage/airgap_patch_usage.md @@ -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: :表示默认值) | @@ -45,7 +45,6 @@ | MODE | :material-checkbox-marked-circle: `INCR`: 仅构建配置中指定组件的离线资源(即:增量包)| | | :material-checkbox-blank-circle-outline: `FULL`: 将构建配置中指定的组件以及集群部署必要其他组件的离线资源(即:全量包)| - ## 使用增量离线包 增量包的目录结构如下: @@ -73,9 +72,9 @@ 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`。 @@ -83,13 +82,13 @@ data 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` @@ -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。 diff --git a/docs/zh/usage/all_in_one_install.md b/docs/zh/usage/all_in_one_install.md index fb9fd4843..027e68f68 100644 --- a/docs/zh/usage/all_in_one_install.md +++ b/docs/zh/usage/all_in_one_install.md @@ -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 ``` --- @@ -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,将下列参数替换为您的真实参数。 - - ``:节点 IP。 - - ``:登陆节点的用户名,建议使用 root 或具有 root 权限的用户登陆。 - - ``:登陆节点的密码。 - - ``:kubean 镜像版本,推荐使用最新版本,[参阅 kubean 版本列表](https://github.com/kubean-io/kubean/tags)。 +- ``:节点 IP。 +- ``:登陆节点的用户名,建议使用 root 或具有 root 权限的用户登陆。 +- ``:登陆节点的密码。 +- ``:kubean 镜像版本,推荐使用最新版本,[参阅 kubean 版本列表](https://github.com/kubean-io/kubean/tags)。 例如,下面展示了一个 AllInOne.yml 示例:
@@ -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 ``` -至此,您已经完成了一个简单的单节点集群的部署。 \ No newline at end of file +至此,您已经完成了一个简单的单节点集群的部署。 diff --git a/docs/zh/usage/helm_install_kubean.md b/docs/zh/usage/helm_install_kubean.md index 7a00d7730..f316c01f2 100644 --- a/docs/zh/usage/helm_install_kubean.md +++ b/docs/zh/usage/helm_install_kubean.md @@ -9,30 +9,30 @@ ## 开始部署 -#### 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 ``` @@ -40,21 +40,19 @@ 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 - -``` \ No newline at end of file +```