Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Provide an offline installation method for Helm. (#7729) #7730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chaojidage
Copy link

@chaojidage chaojidage commented Jul 4, 2024

fixed #7729

In production environment, k8s clusters are typically not connected to the internet and require offline installation. Here, the documentation has been improved to provide an offline installation method.

@CLAassistant
Copy link

CLAassistant commented Jul 4, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines. label Jul 4, 2024
@apecloud-bot apecloud-bot added the pre-approve Fork PR Pre Approve Test label Jul 4, 2024
@chaojidage chaojidage changed the title doc: Provide an offline installation method for Helm. (#7729) docs: Provide an offline installation method for Helm. (#7729) Jul 4, 2024
@michelle-0808
Copy link
Contributor

Hi @chaojidage,
It is recommended to move the offline installation part to the folder kubeblocks/i18n/zh-cn as a single doc instead of directly adding them to the current installation doc for further doc management.

@chaojidage
Copy link
Author

Hi @chaojidage, It is recommended to move the offline installation part to the folder kubeblocks/i18n/zh-cn as a single doc instead of directly adding them to the current installation doc for further doc management.

I believe that the offline installation method for Helm is just one of the Helm installation methods, so I included it under the previous Helm installation methods. Additionally, I noticed that the overall documentation does not specifically distinguish between offline and online installation methods. I'm not sure how to set up the structure and hyperlinks in the documentation if I were to add a new offline installation method. If you still think I need to write a separate document for the offline installation method, I will make the changes.

@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Jul 8, 2024
@apecloud-bot apecloud-bot added pre-approve Fork PR Pre Approve Test and removed pre-approve Fork PR Pre Approve Test labels Jul 8, 2024
Copy link
Contributor

@dingshun-cmss dingshun-cmss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also recommend put the air-gapped installation steps in a separate document, and add a link refering to the document here.


1. 下载crd并安装
1. 办公电脑访问下面地址,会自动下载 crd 文件
```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a bash command

1. 下载crd并安装
1. 办公电脑访问下面地址,会自动下载 crd 文件
```bash
https://github.com/apecloud/kubeblocks/releases/download/v0.8.4-beta.11/kubeblocks_crds.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version is hard-coded here

**离线安装 KubeBlocks**

在生产环境中,K8S 集群一般是不能连接外网的,只会允许办公环境的电脑通过 VPN 连接 K8S 集群。在线安装方式不可用,需要进行离线安装。
## 环境准备
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading level here is problematic: this level is the same as the previous 安装步骤, but the content is a sub-section of 离线安装 KubeBlocks , which is only a bold text

The correct hierarchy should be 安装步骤/离线安装 KubeBlocks/环境准备

</table>
总得来说就是将在线的crd , helm-charts,公有云镜像下载下来,然后helm install安装

1. 下载crd并安装
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's recommended to first introduce on a manifest of files that needs to be downloaded from the Internet and how to get them, then the rest of the steps only manipulate on these downloaded files.

@@ -95,6 +95,125 @@ KubeBlocks 是基于 Kubernetes 的原生应用,你可以使用 Helm 来进行

:::

**离线安装 KubeBlocks**

在生产环境中,K8S 集群一般是不能连接外网的,只会允许办公环境的电脑通过 VPN 连接 K8S 集群。在线安装方式不可用,需要进行离线安装。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The situation described here may not be accurate, so it is recommended to delete the relevant content.

4. 将需要的远程镜像重新 tag 推到 K8S 的镜像仓库
1. 基本需要的镜像是下面这几个
```bash
infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-datascript:0.8.4-beta.11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image tag hard-coded

infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/snapshot-controller:v6.2.1
infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-charts:0.8.4-beta.11
```
2. 将他们重新 tag 后推到远端(以kubeblocks:0.8.4-beta.11举例)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better put these steps at the download phase

```
2. 将他们重新 tag 后推到远端(以kubeblocks:0.8.4-beta.11举例)
```bash
docker pull infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks:0.8.4-beta.11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version hard-coded


5. 可以将部分自动安装的 addon 关闭,只保留需要的

在kubeblocks/templates/addons 文件夹中,将对应的数据库的配置中的 autoInstall 改成 false(以 apecloud-mysql-addon.yaml举例)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shanshanying Are there any settings in KubeBlocks' values.yaml that control which addons are auto-installed when KubeBlocks is installed? This way, we wouldn't need to manually edit the addon objects in the templates to remove the addons we don't need.


将原本的 kubeblocks 文件夹打包上传至集群部署节点
```bash
tar czvf kb0.8.4beta11.tgz kubeblocks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first command is executed in your local machine that can access the Internet; the second command is executed in your server in the air-gapped environment. They shouldn't be put into the same code block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pre-approve Fork PR Pre Approve Test size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] provide offline install steps in document
7 participants