From 7aa11e850a4b02f6f77e783e2917766df703c3ea Mon Sep 17 00:00:00 2001 From: Zheng Xi Zhou Date: Mon, 21 Mar 2022 15:25:33 +0800 Subject: [PATCH] Add offline installation guide (#517) * Add offline installation guide Add a guide on how to install KubeVela in a private cloud without internet. Signed-off-by: Zheng Xi Zhou * package helm chart Signed-off-by: Zheng Xi Zhou * add links Signed-off-by: Zheng Xi Zhou * address comments Signed-off-by: Zheng Xi Zhou * address comments Signed-off-by: Zheng Xi Zhou --- docs/install.mdx | 1 + .../system-operation/offline-installation.md | 60 +++++++++++++++++++ .../current/install.mdx | 3 +- .../system-operation/offline-installation.md | 60 +++++++++++++++++++ .../version-v1.2/install.mdx | 3 +- .../system-operation/offline-installation.md | 60 +++++++++++++++++++ versioned_docs/version-v1.2/install.mdx | 1 + .../system-operation/offline-installation.md | 60 +++++++++++++++++++ 8 files changed, 246 insertions(+), 2 deletions(-) create mode 100644 docs/platform-engineers/system-operation/offline-installation.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/system-operation/offline-installation.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/version-v1.2/platform-engineers/system-operation/offline-installation.md create mode 100644 versioned_docs/version-v1.2/platform-engineers/system-operation/offline-installation.md diff --git a/docs/install.mdx b/docs/install.mdx index 7876c443..1f05fac1 100644 --- a/docs/install.mdx +++ b/docs/install.mdx @@ -19,6 +19,7 @@ KubeVela relies on Kubernetes as a control plane. The control plane could be any For local deployment and test, you could use `kind` or `minikube`. > For production usage, you could use your Kubernetes cluster or Kubernetes services provided by cloud providers. +> For offline installation, please refer to [KubeVela Offline Installation Guide](./platform-engineers/system-operation/offline-installation). 如果是要升级现有的 KubeVela,请直接阅读 [升级指南](./platform-engineers/advanced-install#升级). +> 如果是要升级现有的 KubeVela,请直接阅读 [升级指南](./platform-engineers/advanced-install#升级)。 +> 如果需要离线安装,请参考 [KubeVela 离线部署手册](./platform-engineers/system-operation/offline-installation)。 ## 1. 准备控制平面的 Kubernetes 集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/system-operation/offline-installation.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/system-operation/offline-installation.md new file mode 100644 index 00000000..5c2d75a8 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/system-operation/offline-installation.md @@ -0,0 +1,60 @@ + + +# KubeVela Offline Installation Guide + +KubeVela 离线部署包含 KubeVela Core 和 KubeVela Addon 的离线部署。 + +## KubeVela Core 离线部署 + +### KubeVela chart + +- 下载 vela-core Helm Chart 包 + +通过 [Helm Chart 安装 KubeVela Core](../../install)文档下载您希望的 vela-core Chart 包,并解压。 + +- 修改 values 里可配置的镜像 + +拉取以下镜像并导入离线环境的镜像仓库, 在 `helm install` 安装命令里通过 `--set` 覆盖每个镜像对应的离线环境镜像仓库里每个镜像的信息。 + +```shell +$ kubevela git:(master) grep -r repository charts/vela-core/values.yaml -A 1 +charts/vela-core/values.yaml: repository: oamdev/vela-core +charts/vela-core/values.yaml- tag: latest +-- +charts/vela-core/values.yaml: repository: oamdev/kube-webhook-certgen +charts/vela-core/values.yaml- tag: v2.3 +-- +charts/vela-core/values.yaml: repository: oamdev/cluster-gateway +charts/vela-core/values.yaml- tag: v1.1.7 +-- +charts/vela-core/values.yaml: repository: oamdev/hello-world +charts/vela-core/values.yaml- tag: v1 +-- +charts/vela-core/values.yaml: repository: oamdev/alpine-k8s +charts/vela-core/values.yaml- tag: 1.18.2 +``` + +- 修改无法配置的镜像 + +Chart 参数 `enableFluxcdAddon` 决定是否默认安装 addon FluxCD, 如果参数 `enableFluxcdAddon` 为 true,拉取以下镜像并导入离线环境的镜像仓库, +更改各个文件中的镜像 registry 地址为离线环境镜像仓库地址。 + +```shell +$ kubevela git:(master) grep -r -i image: charts/vela-core/templates/addon +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/helm-controller:v0.11.1 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/image-automation-controller:v0.14.0 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/image-reflector-controller:v0.11.0 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/kustomize-controller:v0.13.1 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/source-controller:v0.15.3 + + +$ kubevela git:(master) grep -r -i image: charts/vela-core --exclude-dir=charts/vela-core/templates/addon | grep -v .Values +charts/vela-core/templates/defwithtemplate/nocalhost.yaml: image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest" +``` + +- 重新打包 vela-core Helm Chart 包 + +重新打包上面修改好的 Helm Chart 包,直接安装或者传入离线环境的 Helm Chart 仓库。 + + +## KubeVela Addon 离线部署 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/install.mdx b/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/install.mdx index f371c4a9..ff909096 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/install.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/install.mdx @@ -5,7 +5,8 @@ title: 快速安装 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -> 如果是要升级现有的 KubeVela,请直接阅读 [升级指南](./platform-engineers/advanced-install#升级). +> 如果是要升级现有的 KubeVela,请直接阅读 [升级指南](./platform-engineers/advanced-install#升级)。 +> 如果需要离线安装,请参考 [KubeVela 离线部署手册](./platform-engineers/system-operation/offline-installation)。 ## 1. 准备控制平面的 Kubernetes 集群 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/platform-engineers/system-operation/offline-installation.md b/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/platform-engineers/system-operation/offline-installation.md new file mode 100644 index 00000000..5c2d75a8 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v1.2/platform-engineers/system-operation/offline-installation.md @@ -0,0 +1,60 @@ + + +# KubeVela Offline Installation Guide + +KubeVela 离线部署包含 KubeVela Core 和 KubeVela Addon 的离线部署。 + +## KubeVela Core 离线部署 + +### KubeVela chart + +- 下载 vela-core Helm Chart 包 + +通过 [Helm Chart 安装 KubeVela Core](../../install)文档下载您希望的 vela-core Chart 包,并解压。 + +- 修改 values 里可配置的镜像 + +拉取以下镜像并导入离线环境的镜像仓库, 在 `helm install` 安装命令里通过 `--set` 覆盖每个镜像对应的离线环境镜像仓库里每个镜像的信息。 + +```shell +$ kubevela git:(master) grep -r repository charts/vela-core/values.yaml -A 1 +charts/vela-core/values.yaml: repository: oamdev/vela-core +charts/vela-core/values.yaml- tag: latest +-- +charts/vela-core/values.yaml: repository: oamdev/kube-webhook-certgen +charts/vela-core/values.yaml- tag: v2.3 +-- +charts/vela-core/values.yaml: repository: oamdev/cluster-gateway +charts/vela-core/values.yaml- tag: v1.1.7 +-- +charts/vela-core/values.yaml: repository: oamdev/hello-world +charts/vela-core/values.yaml- tag: v1 +-- +charts/vela-core/values.yaml: repository: oamdev/alpine-k8s +charts/vela-core/values.yaml- tag: 1.18.2 +``` + +- 修改无法配置的镜像 + +Chart 参数 `enableFluxcdAddon` 决定是否默认安装 addon FluxCD, 如果参数 `enableFluxcdAddon` 为 true,拉取以下镜像并导入离线环境的镜像仓库, +更改各个文件中的镜像 registry 地址为离线环境镜像仓库地址。 + +```shell +$ kubevela git:(master) grep -r -i image: charts/vela-core/templates/addon +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/helm-controller:v0.11.1 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/image-automation-controller:v0.14.0 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/image-reflector-controller:v0.11.0 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/kustomize-controller:v0.13.1 +charts/vela-core/templates/addon/fluxcd.yaml: image: fluxcd/source-controller:v0.15.3 + + +$ kubevela git:(master) grep -r -i image: charts/vela-core --exclude-dir=charts/vela-core/templates/addon | grep -v .Values +charts/vela-core/templates/defwithtemplate/nocalhost.yaml: image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest" +``` + +- 重新打包 vela-core Helm Chart 包 + +重新打包上面修改好的 Helm Chart 包,直接安装或者传入离线环境的 Helm Chart 仓库。 + + +## KubeVela Addon 离线部署 diff --git a/versioned_docs/version-v1.2/install.mdx b/versioned_docs/version-v1.2/install.mdx index d832702b..f2378e2c 100644 --- a/versioned_docs/version-v1.2/install.mdx +++ b/versioned_docs/version-v1.2/install.mdx @@ -19,6 +19,7 @@ KubeVela relies on Kubernetes as a control plane. The control plane could be any For local deployment and test, you could use `kind` or `minikube`. > For production usage, you could use your Kubernetes cluster or Kubernetes services provided by cloud providers. +> For offline installation, please refer to [KubeVela Offline Installation Guide](./platform-engineers/system-operation/offline-installation).