Docs: change core concept (#396)
* Docs: change core concept Signed-off-by: barnettZQG <barnett.zqg@gmail.com> * Docs: release version 1.2.0-rc.1 Signed-off-by: barnettZQG <barnett.zqg@gmail.com> * Docs: change core concept Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
This commit is contained in:
parent
e9597b23cf
commit
d5037454ab
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: Core Concept
|
||||
title: Core Concept
|
||||
---
|
||||
|
||||
KubeVela revolves around cloud-native application delivery and management scenarios. The application delivery model behind it is [Open Application Model](../platform-engineers/oam/oam-model), or OAM for short. It describe various components and operation required for application as a unified, and Infrastructure-independent "deployment plan". Thus we can achieve standardized and efficient application delivery in a multi-cloud/hybrid-cloud environment. KubeVela includes the following core concepts:
|
||||
KubeVela revolves around cloud-native application delivery and management scenarios. The application delivery model behind it is [Open Application Model](../platform-engineers/oam/oam-model), or OAM for short. It describe various components and operation required for application as a unified, and Infrastructure-independent "deployment plan". Thus we can achieve standardized and efficient application delivery in a multi-cloud/hybrid-cloud environment. KubeVela includes the following core concepts:
|
||||
|
||||
## Application
|
||||
|
||||
|
@ -27,8 +27,6 @@ Workflow allows you to define critical step in the process of application delive
|
|||
|
||||
Policy defines a strategy of certain aspect for application as to quality assurance, security, firewall rules, SLO and etc. Its type decided by [Policy Definition](../platform-engineers/oam/x-definition#policydefinition), one of its usage:
|
||||
|
||||
- <b>EnvBinding</b> Environment binding strategy. It enables you to ship patches into multi-targets along with exclusive changes for each of them.
|
||||
|
||||
### Revision
|
||||
|
||||
Revision generates each time when the application deployed and holds all infos in one snapshot. You use it for rolling back to whichever version whenever you needed.
|
||||
|
@ -37,11 +35,13 @@ Revision generates each time when the application deployed and holds all infos i
|
|||
|
||||
Project is where you manage all the applications and collaborate with your team member. Project is one stand alone scope that separates it from other project.
|
||||
|
||||
### Environment
|
||||
## Environment
|
||||
|
||||
Environment refers to the environment for development, testing, and production and it can include multiple Targets. We define Environment in each Project and each Project can contain multiple Environments. Applications inside a same environment can visit and share resource with each other.
|
||||
Environment refers to the environment for development, testing, and production and it can include multiple Targets. We define Environment in each Project and each Project can contain multiple Environments. Applications in the same environment can visit and share resource with each other.
|
||||
|
||||
### Target
|
||||
- <b>EnvBinding</b> The application can be bound to multiple Environments, and for each environment, you can set the environment that is the deployment difference.
|
||||
|
||||
## Target
|
||||
|
||||
Target describs the space where we actually host application and its affilicated resources. It bind to a Namespace of Kubernetes cluster.
|
||||
|
||||
|
@ -51,4 +51,4 @@ Import and manage your Kubernetes cluster in KubeVela。Kubernetes cluster is cu
|
|||
|
||||
## Addon
|
||||
|
||||
Addon is where you can freely pull in third-party capability that fulfills your need. This relys on the highly scalable desgin pattern of KubeVela. Each Addon will have its own [X-Definition](../platform-engineers/oam/x-definition).
|
||||
Addon is where you can freely pull in third-party capability that fulfills your need. This relys on the highly scalable desgin pattern of KubeVela. Each Addon will have its own [X-Definition](../platform-engineers/oam/x-definition).
|
||||
|
|
|
@ -24,8 +24,8 @@ className="unique-tabs"
|
|||
defaultValue="kind"
|
||||
values={[
|
||||
{label: 'Kind', value: 'kind'},
|
||||
{label: 'RKE', value: 'rke'},
|
||||
{label: 'Minikube', value: 'minikube'},
|
||||
{label: 'RKE', value: 'rke'},
|
||||
{label: 'Cloud Provider', value: 'cloudprovider'},
|
||||
]}>
|
||||
|
||||
|
@ -156,7 +156,7 @@ helm repo update
|
|||
2. Install KubeVela Core
|
||||
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.2.0-beta.3 --set multicluster.enabled=true --wait
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.2.0-rc.1 --wait
|
||||
```
|
||||
|
||||
3. Verify KubeVela Core installation
|
||||
|
@ -212,7 +212,7 @@ KubeVela CLI provides an easy to engage. We install VelaUX extensions through CL
|
|||
** MacOS/Linux **
|
||||
|
||||
```shell script
|
||||
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.2.0-beta.3
|
||||
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.2.0-rc.1
|
||||
```
|
||||
|
||||
**Windows**
|
||||
|
|
|
@ -26,7 +26,7 @@ helm install --create-namespace -n vela-system --set admissionWebhooks.certManag
|
|||
|
||||
Add flag `--devel` in command `helm search` to choose a pre-release
|
||||
version in format `<next_version>-beta.<version>`. It means a beta version of `<next_version>`,
|
||||
such as `1.2.0-beta.3`.
|
||||
such as `1.2.0-rc.1`.
|
||||
|
||||
```shell script
|
||||
helm search repo kubevela/vela-core -l --devel
|
||||
|
@ -34,6 +34,7 @@ helm search repo kubevela/vela-core -l --devel
|
|||
|
||||
```console
|
||||
NAME CHART VERSION APP VERSION DESCRIPTION
|
||||
kubevela/vela-core 1.2.0-rc.1 1.2.0-rc.1 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.3 1.2.0-beta.3 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.2 1.2.0-beta.2 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.1 1.2.0-beta.1 A Helm chart for KubeVela core
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
---
|
||||
title: Deploy First Application
|
||||
title: Deploy First Application
|
||||
---
|
||||
|
||||
> Before starting, please confirm that you've installed KubeVela Core and VelaUX in the control plane cluster based on [Install from Kubernetes cluster](./install.mdx)
|
||||
> Before starting, please confirm that you've installed KubeVela Core and VelaUX in the control plane cluster based on [Install from Kubernetes cluster](./install.mdx)
|
||||
>
|
||||
> If you want to use KubeVela CLI for application delivery, please check [Deliver First Application](./end-user/quick-start-cli) in the Vela CLI manual.
|
||||
|
||||
|
||||
Welcome to KubeVela! In this section, we show you how to deliver your first app via VelaUX.
|
||||
|
||||
Follow these steps:
|
||||
|
||||
1. Prepare a Docker image. we use [crccheck/hello-world](https://hub.docker.com/r/crccheck/hello-world) for this time. Double-check if you're able to download it properly.
|
||||
2. Create the first `Application`.
|
||||
3. Check out the status of the Application's instance.
|
||||
|
||||
You'll get to know:
|
||||
|
||||
- Get familiar with core concepts as [Application](./getting-started/core-concept#application), [Cluster](getting-started/core-concept#cluster), [Target](getting-started/core-concept#target) and [Project](getting-started/core-concept#project)
|
||||
- Finished an application delivery by operating VelaUX
|
||||
|
||||
## Choosing deployment type and Environment
|
||||
## Choosing deployment type and Environment
|
||||
|
||||
After VelaUX is installed, the first page you enter is for managing the app:
|
||||
|
||||
|
@ -61,11 +63,11 @@ In the process of deploying, you can click `Check the details` to view the statu
|
|||
If you want to delete the application when it's no longer used, simply:
|
||||
|
||||
1. Enter the page of environment, click `Recycle` to reclaim the resources that this environment used.
|
||||
2. Go back to the list of applications and click the drop-down menu to remove it.
|
||||
2. Go back to the list of applications and click the drop-down menu to remove it.
|
||||
|
||||
That's it! You succeed at the first application delivery. Congratulation!
|
||||
|
||||
## Next Step
|
||||
|
||||
- View [Continuous Delivery](./deliver-app/k8s-object.mdx) to look on more of what you can achieve with KubeVela
|
||||
- View [Best Practices](./case-studies/jenkins-cicd) to check out more tutorials
|
||||
- View [Continuous Delivery](./deliver-app/k8s-object) to look on more of what you can achieve with KubeVela
|
||||
- View [Best Practices](./case-studies/jenkins-cicd) to check out more tutorials
|
||||
|
|
|
@ -25,7 +25,7 @@ description: 本文介绍Kubernetes的工作流工程模式,常用操作和适
|
|||
|
||||
## 内置支持的工作流步骤
|
||||
|
||||
在 [交付 Kubernetes 原生资源](./k8s-object.mdx) 文章中,我们使用了人工审核步骤`suspend`。我们再来了解一下其他内置的步骤分别是什么作用:
|
||||
在 [交付 Kubernetes 原生资源](./k8s-object) 文章中,我们使用了人工审核步骤`suspend`。我们再来了解一下其他内置的步骤分别是什么作用:
|
||||
|
||||
- `deploy2env`: 应用交付到指定 Target。该步骤 Vela 会根据环境中配置的 Target 自动生成。
|
||||
- `deploy-cloud-resource`: 云资源应用交付到指定 Target。该步骤 Vela 会为云资源应用,根据环境中配置的 Target 自动生成,需要注意的是,该类型步骤与 deploy2env 的区别在于控制云资源创建的 CR 资源是部署到管控集群的,服务创建完成生成访问密钥(Secret)后,将 Secret 分发到 Target 指定集群和 Namespace。
|
||||
|
|
|
@ -27,8 +27,6 @@ KubeVela 围绕着云原生应用交付和管理场景展开,背后的应用
|
|||
|
||||
应用策略(Policy)负责定义指定应用交付过程中的策略,比如质量保证策略、安全组策略、防火墙规则、SLO 目标、放置策略等。应用策略的类型由 [Policy Definition](../platform-engineers/oam/x-definition#应用策略定义(policydefinition)) 定义,它有以下关键场景:
|
||||
|
||||
- <b>EnvBinding</b> 环境绑定策略, 环境绑定策略定义了将应用发布到某个环境时,当前环境的部署差异和环境中各个 Target 的部署差异。
|
||||
|
||||
### 版本记录 (Revision)
|
||||
|
||||
应用每进行一次部署,生成一个版本记录,版本中快照了应用的完整配置。用户可以在任意时候将应用在某个环境的部署实例回滚到任意部署完成的历史版本。
|
||||
|
@ -37,13 +35,15 @@ KubeVela 围绕着云原生应用交付和管理场景展开,背后的应用
|
|||
|
||||
项目作为在 KubeVela 平台组织人员和资源的业务承载,项目中可以设定成员、权限、应用和分配环境。在项目维度集成外部代码库、制品库,呈现完整 CI/CD Pipeline;集成外部需求管理平台,呈现项目需求管理;集成微服务治理,提供多环境业务联调和统一治理能力。项目提供了业务级的资源隔离能力。
|
||||
|
||||
### 环境(Environment)
|
||||
## 环境(Environment)
|
||||
|
||||
环境指通常意义的开发、测试、生产的环境业务描述,它可以包括多个 Target。环境协调上层应用和底层基础设施的匹配,不同的环境生成不同的 Application 部署实例。环境定义在项目中,每一个项目可以包含多个环境。处在同一个环境中的应用可以具备内部互访和资源共享能力。
|
||||
环境指通常意义的开发、测试、生产的环境业务描述,它可以包括多个交付目标。环境协调上层应用和底层基础设施的匹配,不同的环境对应管控集群的不同 Namespace。环境定义在项目中,每一个项目可以包含多个环境。处在同一个环境中的应用可以具备内部互访和资源共享能力。
|
||||
|
||||
### 交付目标(Target)
|
||||
- <b>EnvBinding</b> 应用环境绑定, 应用可绑定多个环境进行发布,对于每一个环境可设置环境级部署差异。
|
||||
|
||||
交付目标描述应用及相关资源的实际部署空间,它精确到 Kubernetes 集群的 Namespace,对于普通应用,组件渲染生成的 Kubernetes 原生资源即会在 Target 指定的集群和 Namespace 中创建;对于云服务,服务创建时获取 Target 定义的云服务区域参数定义,在管控集群发起云资源创建任务,生成访问密钥后分发到 Target 指定的集群和 Namespace。
|
||||
## 交付目标(Target)
|
||||
|
||||
交付目标描述应用及相关资源的实际部署空间,它精确到 Kubernetes 集群的 Namespace,对于普通应用,组件渲染生成的 Kubernetes 原生资源即会在交付目标指定的集群和 Namespace 中创建;对于云服务,服务创建时获取交付目标定义的云服务区域参数定义,在管控集群发起云资源创建任务,生成访问密钥后分发到交付目标指定的集群和 Namespace。单个环境可关联多个交付目标,代表该环境需要多集群交付。
|
||||
|
||||
## 集群(Cluster)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: 从 Kubernetes 集群安装
|
||||
title: 快速安装
|
||||
---
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
@ -13,6 +13,8 @@ import TabItem from "@theme/TabItem";
|
|||
|
||||
- Kubernetes 集群版本 >= v1.18.0
|
||||
|
||||
> 若你已是 Kubernetes 用户,具有满足上述条件的集群,请直接进入 [下一节](#2-安装-kubevela-core) 。若你没有满足要求的集群,可通过下述方式安装便捷安装。生产场景推荐使用云服务或 RKE 安装方式。
|
||||
|
||||
KubeVela 控制平面依赖 Kubernetes。它可以放置在任何托管 Kubernetes 作为底座的产品或自建 Kubernetes 集群中。
|
||||
|
||||
你可以使用 kind 或 minikube 在本地部署、测试 KubeVela。
|
||||
|
@ -26,7 +28,7 @@ values={[
|
|||
{label: 'Kind', value: 'kind'},
|
||||
{label: 'Minikube', value: 'minikube'},
|
||||
{label: 'RKE', value: 'rke'},
|
||||
{label: 'Cloud Provider', value: 'cloudprovider'},
|
||||
{label: '云服务', value: 'cloudprovider'},
|
||||
]}>
|
||||
|
||||
<TabItem value="minikube">
|
||||
|
@ -160,7 +162,7 @@ helm repo update
|
|||
2. 安装 KubeVela Core
|
||||
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.2.0-beta.3 --set multicluster.enabled=true --wait
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.2.0-rc.1 --wait
|
||||
```
|
||||
|
||||
3. 验证 KubeVela Core 安装是否成功
|
||||
|
@ -216,7 +218,7 @@ KubeVela CLI 提供了便捷的应用终端管理能力,我们通过 CLI 来
|
|||
** MacOS/Linux **
|
||||
|
||||
```shell script
|
||||
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.2.0-beta.3
|
||||
curl -fsSl https://kubevela.io/script/install.sh | bash -s 1.2.0-rc.1
|
||||
```
|
||||
|
||||
**Windows**
|
||||
|
@ -291,12 +293,18 @@ kubectl get service velaux -n vela-system -o jsonpath="{.status.loadBalancer.ing
|
|||
vela addon enable velaux repo=acr.kubevela.net domain=example.doamin.com
|
||||
```
|
||||
|
||||
对于生产环境,请考虑启用 MongoDB 作为 VelaUX 的数据存储。
|
||||
对于生产环境,请考虑启用 MongoDB 作为 VelaUX 的数据存储,使用 MongoDB 作为数据库的配置方式参考如下:
|
||||
|
||||
```shell script
|
||||
vela addon enable velaux dbType=mongodb database=kubevela dbURL=mongodb://<Mongo-Host>:<Mongo-Port>
|
||||
```
|
||||
|
||||
## 4. 卸载
|
||||
|
||||
如果你试用完成后需要卸载 KubeVela,可参考如下操作进行:
|
||||
|
||||
在卸载之前,请先将所有应用删除,所有 addon 禁用。
|
||||
|
||||
1. 卸载 VelaUX
|
||||
|
||||
```
|
||||
|
@ -309,6 +317,14 @@ vela addon disable velaux
|
|||
helm uninstall -n vela-system kubevela
|
||||
```
|
||||
|
||||
3. 卸载 KubeVela 安装的 CRD
|
||||
|
||||
删除前,需要确保所有对应的 CR 资源已删除。
|
||||
|
||||
```
|
||||
kubectl get crd |grep oam | awk '{print $1}' | xargs kubectl delete crd
|
||||
```
|
||||
|
||||
## 下一步
|
||||
|
||||
- 安装完毕 KubeVela,开始 [交付第一个应用](./quick-start)。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
title: 自定义安装
|
||||
title: 自定义安装
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
## 带着证书管理器安装 KubeVela
|
||||
|
||||
|
@ -26,13 +26,15 @@ helm install --create-namespace -n vela-system --set admissionWebhooks.certManag
|
|||
|
||||
## 安装预发布版
|
||||
|
||||
在使用 `helm search` 命令时,添加标记参数 `--devel` 即可搜索出预发布版。预发布版的版本号格式为 `<next_version>-beta.<version>`,例如 `1.2.0-beta.3`,代表的是 `<next_version>` 版本的试验版本。
|
||||
在使用 `helm search` 命令时,添加标记参数 `--devel` 即可搜索出预发布版。预发布版的版本号格式为 `<next_version>-beta.<version>`,例如 `1.2.0-rc.1`,代表的是 `<next_version>` 版本的试验版本。
|
||||
|
||||
```shell script
|
||||
helm search repo kubevela/vela-core -l --devel
|
||||
```
|
||||
|
||||
```console
|
||||
NAME CHART VERSION APP VERSION DESCRIPTION
|
||||
kubevela/vela-core 1.2.0-rc.1 1.2.0-rc.1 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.3 1.2.0-beta.3 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.2 1.2.0-beta.2 A Helm chart for KubeVela core
|
||||
kubevela/vela-core 1.2.0-beta.1 1.2.0-beta.1 A Helm chart for KubeVela core
|
||||
|
@ -43,6 +45,7 @@ kubevela/vela-core 1.2.0-beta.1 1.2.0-beta.1
|
|||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version <next_version>-beta.<version> --set multicluster.enabled=true --wait
|
||||
```
|
||||
|
||||
```console
|
||||
NAME: kubevela
|
||||
LAST DEPLOYED: Thu Apr 1 19:41:30 2021
|
||||
|
@ -52,6 +55,7 @@ REVISION: 1
|
|||
NOTES:
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
```
|
||||
|
||||
## 安装 Kubectl KubeVela CLI 插件
|
||||
|
||||
安装 Kubectl KubeVela CLI 插件,可以更好的进行应用交付操作。
|
||||
|
@ -68,10 +72,13 @@ values={[
|
|||
|
||||
1. [先安装](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) Krew。
|
||||
2. 查看 Krew 上可用的插件:
|
||||
|
||||
```shell
|
||||
kubectl krew update
|
||||
```
|
||||
|
||||
3. 安装 Kubectl KubeVela CLI 插件:
|
||||
|
||||
```shell script
|
||||
kubectl krew install vela
|
||||
```
|
||||
|
@ -81,6 +88,7 @@ kubectl krew install vela
|
|||
<TabItem value="script">
|
||||
|
||||
**macOS/Linux**
|
||||
|
||||
```shell script
|
||||
curl -fsSl https://kubevela.io/script/install-kubectl-vela.sh | bash
|
||||
```
|
||||
|
@ -90,7 +98,6 @@ curl -fsSl https://kubevela.io/script/install-kubectl-vela.sh | bash
|
|||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## 升级
|
||||
|
||||
### 第一步 更新 Helm 仓库
|
||||
|
@ -136,7 +143,6 @@ kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/chart
|
|||
helm upgrade --install --create-namespace --namespace vela-system kubevela kubevela/vela-core --version <the_new_version> --wait
|
||||
```
|
||||
|
||||
|
||||
## 启用多集群管理
|
||||
|
||||
KubeVela 提供了跨集群编排应用的能力。上文的安装命令已经启用了该功能,如果你是从旧版本 KubeVela 升级上来,或是在安装时没有选用多集群管理的能力,你可以运行以下命令启用该能力
|
||||
|
@ -146,24 +152,25 @@ helm upgrade --install kubevela kubevela/vela-core -n vela-system --set multiclu
|
|||
```
|
||||
|
||||
你可以运行以下命令来检查多集群功能是否正常启用。
|
||||
|
||||
```shell
|
||||
> kubectl get APIService v1alpha1.cluster.core.oam.dev
|
||||
NAME SERVICE AVAILABLE AGE
|
||||
v1alpha1.cluster.core.oam.dev vela-system/kubevela-cluster-gateway-service True 7h40m
|
||||
```
|
||||
|
||||
|
||||
## 插件列表
|
||||
|
||||
| 插件 | 简介 | 对应的内置功能 | 插件对应开源项目 |
|
||||
|---------------------|-------------------------------------------------|----------------|-------------------------------------------------|
|
||||
| terraform | 提供云资源 | - | https://github.com/oam-dev/terraform-controller |
|
||||
| fluxcd | 提供 Helm、Kustomize 组件的部署功能 | kustomize、helm | https://fluxcd.io/ |
|
||||
| ocm-cluster-manager | 提供多集群功能的系统插件 | - | http://open-cluster-management.io/ |
|
||||
| velaux | 提供一个KubeVela的一个可视化管理界面 |- |- |
|
||||
| terraform-alibaba | 阿里云 Terraform Controller |- |- |
|
||||
| terraform-azure | Azure 的 Terraform Controller |- |- |
|
||||
| terraform-aws | AWS 的 Terraform Controller |- |- |
|
||||
| 插件 | 简介 | 对应的内置功能 | 插件对应开源项目 |
|
||||
| ------------------- | -------------------------------------- | --------------- | ----------------------------------------------- |
|
||||
| terraform | 提供云资源 | - | https://github.com/oam-dev/terraform-controller |
|
||||
| fluxcd | 提供 Helm、Kustomize 组件的部署功能 | kustomize、helm | https://fluxcd.io/ |
|
||||
| ocm-cluster-manager | 提供多集群功能的系统插件 | - | http://open-cluster-management.io/ |
|
||||
| velaux | 提供一个 KubeVela 的一个可视化管理界面 | - | - |
|
||||
| terraform-alibaba | 阿里云 Terraform Controller | - | - |
|
||||
| terraform-azure | Azure 的 Terraform Controller | - | - |
|
||||
| terraform-aws | AWS 的 Terraform Controller | - | - |
|
||||
|
||||
1. 查看可用的插件
|
||||
|
||||
```shell
|
||||
|
@ -184,7 +191,6 @@ vela addon disable fluxcd
|
|||
|
||||
禁用前请先清理使用插件功能的应用,否则将禁用失败。
|
||||
|
||||
|
||||
## 卸载
|
||||
|
||||
运行命令:
|
||||
|
@ -223,5 +229,5 @@ rm -r ~/.vela
|
|||
traitdefinitions.core.oam.dev \
|
||||
workflows.core.oam.dev \
|
||||
workflowstepdefinitions.core.oam.dev \
|
||||
workloaddefinitions.core.oam.dev
|
||||
workloaddefinitions.core.oam.dev
|
||||
```
|
||||
|
|
|
@ -71,5 +71,5 @@ VelaUX 正常安装后,您进入的第一个页面即应用交付管理页面
|
|||
|
||||
## 下一步
|
||||
|
||||
- 阅读并参考 [持续交付](./deliver-app/k8s-object.mdx) 章节文章,解锁更多 KubeVela 能力。
|
||||
- 阅读并参考 [持续交付](./deliver-app/k8s-object) 章节文章,解锁更多 KubeVela 能力。
|
||||
- 阅读并参考 [最佳实践](./case-studies/jenkins-cicd) 章节文章,获取最佳实践场景。
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
---
|
||||
title: 快速安装
|
||||
title: 快速安装
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
> 如果是要升级现有的 KubeVela,请直接阅读[升级指南](./platform-engineers/advanced-install#升级).
|
||||
|
||||
> 1.2.0-rc.1 版本已发布,欢迎试用。[去安装](/zh/docs/next/install)
|
||||
|
||||
## 1. 选择放置控制平面的集群
|
||||
|
||||
确保:
|
||||
|
||||
- Kubernetes 集群版本 >= v1.18.0
|
||||
- 安装并配置 kubectl 命令行工具
|
||||
|
||||
|
@ -39,29 +42,32 @@ minikube start
|
|||
|
||||
```shell script
|
||||
minikube addons enable ingress
|
||||
```
|
||||
```
|
||||
|
||||
</details>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="rke">
|
||||
|
||||
<b>(1)安装 Docker (可选):</b>
|
||||
{" "}
|
||||
<b>(1)安装 Docker (可选):</b>
|
||||
|
||||
RKE 的安装依赖于 Docker, 如未安装,请参考 [Docker 安装指南](https://docs.docker.com/engine/install/).
|
||||
RKE 的安装依赖于 Docker, 如未安装,请参考 [Docker 安装指南](https://docs.docker.com/engine/install/).
|
||||
|
||||
<b>(2)安装 RKE 命令行:</b>
|
||||
{" "}
|
||||
<b>(2)安装 RKE 命令行:</b>
|
||||
|
||||
下载 RKE 二进制文件, [前往 RKE Release 页面](https://github.com/rancher/rke/releases).
|
||||
|
||||
如果你的网络受限无法下载(特别是中国用户),可直接使用下述方式安装:
|
||||
|
||||
下载 RKE 二进制文件, [前往RKE Release页面](https://github.com/rancher/rke/releases).
|
||||
|
||||
如果你的网络受限无法下载(特别是中国用户),可直接使用下述方式安装:
|
||||
```
|
||||
wget https://static.kubevela.net/binary/rke/rke_linux-amd64 -O /usr/bin/rke
|
||||
chmod +x /usr/bin/rke
|
||||
```
|
||||
|
||||
<b>(3)安装 Kubernetes 集群:</b>
|
||||
{" "}
|
||||
<b>(3)安装 Kubernetes 集群:</b>
|
||||
|
||||
```shell script
|
||||
mkdir ~/rkeinit && cd ~/rkeinit
|
||||
|
@ -74,6 +80,7 @@ chmod +x /usr/bin/rke
|
|||
cp kube_config_cluster.yml ~/.kube/config
|
||||
docker cp kubelet:/usr/local/bin/kubectl /usr/local/bin/kubectl
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="kind">
|
||||
|
@ -114,17 +121,16 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast
|
|||
|
||||
<TabItem value="cloudprovider">
|
||||
|
||||
* 阿里云 [ACK 服务](https://www.aliyun.com/product/kubernetes)
|
||||
* AWS [EKS 服务](https://aws.amazon.com/cn/eks)
|
||||
* Azure [AKS 服务](https://azure.microsoft.com/en-us/services/kubernetes-service)
|
||||
* Google [GKE 服务](https://cloud.google.com/kubernetes-engine)
|
||||
- 阿里云 [ACK 服务](https://www.aliyun.com/product/kubernetes)
|
||||
- AWS [EKS 服务](https://aws.amazon.com/cn/eks)
|
||||
- Azure [AKS 服务](https://azure.microsoft.com/en-us/services/kubernetes-service)
|
||||
- Google [GKE 服务](https://cloud.google.com/kubernetes-engine)
|
||||
|
||||
> 注意: 请确保云厂商的集群[已安装或启用 ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) 以保证路由访问功能可正常使用。
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## 2. 安装 KubeVela
|
||||
|
||||
在安装之前,请确保 Helm 工具是可用的,如未安装,请参考 [安装说明](https://helm.sh/docs/intro/install/) 安装完成。
|
||||
|
@ -139,47 +145,51 @@ chmod +x /usr/bin/helm
|
|||
</details>
|
||||
|
||||
1. 添加并更新 KubeVela Helm chart 仓库
|
||||
```shell script
|
||||
helm repo add kubevela https://charts.kubevela.net/core
|
||||
helm repo update
|
||||
```
|
||||
|
||||
|
||||
```shell script
|
||||
helm repo add kubevela https://charts.kubevela.net/core
|
||||
helm repo update
|
||||
```
|
||||
|
||||
2. 安装 KubeVela
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --set multicluster.enabled=true --wait
|
||||
```
|
||||
你可以参考 [`自定义安装`](./platform-engineers/advanced-install) 获取更多安装模式和功能。
|
||||
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --set multicluster.enabled=true --wait
|
||||
```
|
||||
|
||||
你可以参考 [`自定义安装`](./platform-engineers/advanced-install) 获取更多安装模式和功能。
|
||||
|
||||
3. 验证 chart 安装是否成功
|
||||
```shell script
|
||||
helm test kubevela -n vela-system
|
||||
```
|
||||
|
||||
<details> <summary> 点击查看期望输出 </summary>
|
||||
```shell script
|
||||
helm test kubevela -n vela-system
|
||||
```
|
||||
|
||||
```shell
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test running
|
||||
Pod kubevela-application-test succeeded
|
||||
NAME: kubevela
|
||||
LAST DEPLOYED: Tue Apr 13 18:42:20 2021
|
||||
NAMESPACE: vela-system
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: kubevela-application-test
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:50:04 2021
|
||||
Phase: Succeeded
|
||||
TEST SUITE: first-vela-app
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:49:10 2021
|
||||
Phase: Succeeded
|
||||
NOTES:
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
```
|
||||
<details> <summary> 点击查看期望输出 </summary>
|
||||
|
||||
</details>
|
||||
```shell
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test running
|
||||
Pod kubevela-application-test succeeded
|
||||
NAME: kubevela
|
||||
LAST DEPLOYED: Tue Apr 13 18:42:20 2021
|
||||
NAMESPACE: vela-system
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: kubevela-application-test
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:50:04 2021
|
||||
Phase: Succeeded
|
||||
TEST SUITE: first-vela-app
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:49:10 2021
|
||||
Phase: Succeeded
|
||||
NOTES:
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## 3. 【可选】安装 KubeVela CLI
|
||||
|
||||
|
@ -208,6 +218,7 @@ curl -fsSl https://kubevela.io/script/install.sh | bash
|
|||
```shell script
|
||||
powershell -Command "iwr -useb https://kubevela.io/script/install.ps1 | iex"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="homebrew">
|
||||
|
||||
|
@ -218,11 +229,13 @@ powershell -Command "iwr -useb https://kubevela.io/script/install.ps1 | iex"
|
|||
```shell script
|
||||
brew update
|
||||
```
|
||||
|
||||
紧接着安装 KubeVela
|
||||
|
||||
```shell script
|
||||
brew install kubevela
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="download">
|
||||
|
||||
|
@ -233,7 +246,7 @@ brew install kubevela
|
|||
sudo mv ./vela /usr/local/bin/vela
|
||||
```
|
||||
|
||||
> [安装提示](https://github.com/oam-dev/kubevela/issues/625):
|
||||
> [安装提示](https://github.com/oam-dev/kubevela/issues/625):
|
||||
> 如果你使用的是 Mac 系统,它会弹出 “vela” 无法打开的警告,因为来自开发者的包无法验证。
|
||||
>
|
||||
> MacOS 对能够在系统中运行的软件,采取了更加严格的限制。你暂时可以通过打开 'System Preference' -> 'Security & Privacy' -> General 并点击 'Allow Anyway' 来解决这个问题。
|
||||
|
@ -245,17 +258,19 @@ sudo mv ./vela /usr/local/bin/vela
|
|||
|
||||
KubeVela 支持一系列[开箱即用的插件](./platform-engineers/advanced-install#插件列表),建议你至少开启以下插件:
|
||||
|
||||
* Helm 以及 Kustomize 组件功能插件
|
||||
- Helm 以及 Kustomize 组件功能插件
|
||||
|
||||
```shell
|
||||
vela addon enable fluxcd
|
||||
```
|
||||
|
||||
* Terraform 插件
|
||||
- Terraform 插件
|
||||
|
||||
```shell
|
||||
vela addon enable terraform
|
||||
```
|
||||
|
||||
* 阿里云 Terraform Provider 插件
|
||||
- 阿里云 Terraform Provider 插件
|
||||
|
||||
执行如下命令开启 Terraform 对阿里云的支持,可以[创建和消费云资源](./end-user/components/cloud-services/provider-and-consume-cloud-services):
|
||||
|
||||
|
@ -266,111 +281,114 @@ KubeVela 支持一系列[开箱即用的插件](./platform-engineers/advanced-in
|
|||
vela addon enable terraform/provider-alibaba ALICLOUD_ACCESS_KEY=<xxx> ALICLOUD_SECRET_KEY=<yyy> ALICLOUD_REGION=<region>
|
||||
```
|
||||
|
||||
* Azure Terraform Provider 插件
|
||||
- Azure Terraform Provider 插件
|
||||
|
||||
执行如下命令开启 Terraform 对 Azure 的支持,可以[创建和消费云资源](./end-user/components/cloud-services/provider-and-consume-cloud-services):
|
||||
执行如下命令开启 Terraform 对 Azure 的支持,可以[创建和消费云资源](./end-user/components/cloud-services/provider-and-consume-cloud-services):
|
||||
|
||||
参考 [Authenticate Terraform to Azure](https://docs.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure?tabs=bash),设置如下参数。
|
||||
参考 [Authenticate Terraform to Azure](https://docs.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure?tabs=bash),设置如下参数。
|
||||
|
||||
```shell
|
||||
vela addon enable terraform/provider-azure ARM_CLIENT_ID=<aaa> ARM_CLIENT_SECRET=<bbb> ARM_SUBSCRIPTION_ID=<ccc> ARM_TENANT_ID=<ddd>
|
||||
```
|
||||
```shell
|
||||
vela addon enable terraform/provider-azure ARM_CLIENT_ID=<aaa> ARM_CLIENT_SECRET=<bbb> ARM_SUBSCRIPTION_ID=<ccc> ARM_TENANT_ID=<ddd>
|
||||
```
|
||||
|
||||
* AWS Terraform Provider 插件
|
||||
- AWS Terraform Provider 插件
|
||||
|
||||
执行如下命令开启 Terraform 对 AWS 的支持,可以[创建和消费云资源](./end-user/components/cloud-services/provider-and-consume-cloud-services):
|
||||
执行如下命令开启 Terraform 对 AWS 的支持,可以[创建和消费云资源](./end-user/components/cloud-services/provider-and-consume-cloud-services):
|
||||
|
||||
参考 [Authenticate Terraform to AWS](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables),设置如下参数。
|
||||
参考 [Authenticate Terraform to AWS](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables),设置如下参数。
|
||||
|
||||
```shell
|
||||
vela addon enable terraform/provider-aws AWS_ACCESS_KEY_ID=<aaa> AWS_SECRET_ACCESS_KEY=<bbb> AWS_DEFAULT_REGION=<region>
|
||||
```
|
||||
```shell
|
||||
vela addon enable terraform/provider-aws AWS_ACCESS_KEY_ID=<aaa> AWS_SECRET_ACCESS_KEY=<bbb> AWS_DEFAULT_REGION=<region>
|
||||
```
|
||||
|
||||
## 5. 查看已安装能力
|
||||
|
||||
> 如果没安装 vela 命令行工具,你也可以通过 `kubectl get comp -A` 和 `kubectl get trait -A` 代替.
|
||||
|
||||
* 通过 `vela` CLI 来看看有哪些组件类型:
|
||||
- 通过 `vela` CLI 来看看有哪些组件类型:
|
||||
|
||||
```shell script
|
||||
vela components
|
||||
```
|
||||
|
||||
<details> <summary> 查看输出 </summary>
|
||||
|
||||
```console
|
||||
NAME NAMESPACE WORKLOAD DESCRIPTION
|
||||
alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster
|
||||
alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object
|
||||
alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object
|
||||
helm vela-system autodetects.core.oam.dev Helm release is a group of K8s resources from either git
|
||||
repository or Helm repo
|
||||
kustomize vela-system autodetects.core.oam.dev Kustomize can fetching, building, updating and applying
|
||||
Kustomize manifests from git repo.
|
||||
raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties
|
||||
task vela-system jobs.batch Describes jobs that run code or a script to completion.
|
||||
webservice vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that have a stable network endpoint to receive external
|
||||
network traffic from customers.
|
||||
worker vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that running at backend. They do NOT have network endpoint
|
||||
to receive external network traffic.
|
||||
```
|
||||
```console
|
||||
NAME NAMESPACE WORKLOAD DESCRIPTION
|
||||
alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster
|
||||
alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object
|
||||
alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object
|
||||
helm vela-system autodetects.core.oam.dev Helm release is a group of K8s resources from either git
|
||||
repository or Helm repo
|
||||
kustomize vela-system autodetects.core.oam.dev Kustomize can fetching, building, updating and applying
|
||||
Kustomize manifests from git repo.
|
||||
raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties
|
||||
task vela-system jobs.batch Describes jobs that run code or a script to completion.
|
||||
webservice vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that have a stable network endpoint to receive external
|
||||
network traffic from customers.
|
||||
worker vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that running at backend. They do NOT have network endpoint
|
||||
to receive external network traffic.
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
* 通过 `vela` CLI 来看看有哪些运维功能:
|
||||
- 通过 `vela` CLI 来看看有哪些运维功能:
|
||||
|
||||
```shell script
|
||||
vela traits
|
||||
```
|
||||
|
||||
<details> <summary> 查看输出 </summary>
|
||||
|
||||
```console
|
||||
NAME NAMESPACE APPLIES-TO CONFLICTS-WITH POD-DISRUPTIVE DESCRIPTION
|
||||
annotations vela-system * true Add annotations on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
configmap vela-system * true Create/Attach configmaps on K8s pod for your workload which
|
||||
follows the pod spec in path 'spec.template'.
|
||||
cpuscaler vela-system deployments.apps false Automatically scale the component based on CPU usage.
|
||||
env vela-system * false add env on K8s pod for your workload which follows the pod
|
||||
spec in path 'spec.template.'
|
||||
expose vela-system false Expose port to enable web traffic for your component.
|
||||
hostalias vela-system * false Add host aliases on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
ingress vela-system false Enable public web traffic for the component.
|
||||
ingress-1-20 vela-system false Enable public web traffic for the component, the ingress API
|
||||
matches K8s v1.20+.
|
||||
init-container vela-system deployments.apps true add an init container and use shared volume with pod
|
||||
kustomize-json-patch vela-system false A list of JSON6902 patch to selected target
|
||||
kustomize-patch vela-system false A list of StrategicMerge or JSON6902 patch to selected
|
||||
target
|
||||
kustomize-strategy-merge vela-system false A list of strategic merge to kustomize config
|
||||
labels vela-system * true Add labels on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
lifecycle vela-system * true Add lifecycle hooks for the first container of K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
node-affinity vela-system * true affinity specify node affinity and toleration on K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
pvc vela-system deployments.apps true Create a Persistent Volume Claim and mount the PVC as volume
|
||||
to the first container in the pod
|
||||
resource vela-system * true Add resource requests and limits on K8s pod for your
|
||||
workload which follows the pod spec in path 'spec.template.'
|
||||
rollout vela-system false rollout the component
|
||||
scaler vela-system * false Manually scale K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
service-binding vela-system webservice,worker false Binding secrets of cloud resources to component env
|
||||
sidecar vela-system * true Inject a sidecar container to K8s pod for your workload
|
||||
which follows the pod spec in path 'spec.template'.
|
||||
volumes vela-system deployments.apps true Add volumes on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
```
|
||||
```console
|
||||
NAME NAMESPACE APPLIES-TO CONFLICTS-WITH POD-DISRUPTIVE DESCRIPTION
|
||||
annotations vela-system * true Add annotations on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
configmap vela-system * true Create/Attach configmaps on K8s pod for your workload which
|
||||
follows the pod spec in path 'spec.template'.
|
||||
cpuscaler vela-system deployments.apps false Automatically scale the component based on CPU usage.
|
||||
env vela-system * false add env on K8s pod for your workload which follows the pod
|
||||
spec in path 'spec.template.'
|
||||
expose vela-system false Expose port to enable web traffic for your component.
|
||||
hostalias vela-system * false Add host aliases on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
ingress vela-system false Enable public web traffic for the component.
|
||||
ingress-1-20 vela-system false Enable public web traffic for the component, the ingress API
|
||||
matches K8s v1.20+.
|
||||
init-container vela-system deployments.apps true add an init container and use shared volume with pod
|
||||
kustomize-json-patch vela-system false A list of JSON6902 patch to selected target
|
||||
kustomize-patch vela-system false A list of StrategicMerge or JSON6902 patch to selected
|
||||
target
|
||||
kustomize-strategy-merge vela-system false A list of strategic merge to kustomize config
|
||||
labels vela-system * true Add labels on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
lifecycle vela-system * true Add lifecycle hooks for the first container of K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
node-affinity vela-system * true affinity specify node affinity and toleration on K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
pvc vela-system deployments.apps true Create a Persistent Volume Claim and mount the PVC as volume
|
||||
to the first container in the pod
|
||||
resource vela-system * true Add resource requests and limits on K8s pod for your
|
||||
workload which follows the pod spec in path 'spec.template.'
|
||||
rollout vela-system false rollout the component
|
||||
scaler vela-system * false Manually scale K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
service-binding vela-system webservice,worker false Binding secrets of cloud resources to component env
|
||||
sidecar vela-system * true Inject a sidecar container to K8s pod for your workload
|
||||
which follows the pod spec in path 'spec.template'.
|
||||
volumes vela-system deployments.apps true Add volumes on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
以上的这些能力都是已经内置的,随取随用。而由于 KubeVela 从一开始就被设计成可编程的,你可以按玩乐高积木一样,添加任何你需要的功能。
|
||||
|
||||
## 下一步
|
||||
|
||||
* 安装完毕 KubeVela,开始动手编写[第一个应用部署计划](./quick-start)。
|
||||
* 更多插件功能的安装,了解[自定义安装方式](./platform-engineers/advanced-install)安装。
|
||||
- 安装完毕 KubeVela,开始动手编写[第一个应用部署计划](./quick-start)。
|
||||
- 更多插件功能的安装,了解[自定义安装方式](./platform-engineers/advanced-install)安装。
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
---
|
||||
title: Installation
|
||||
title: Installation
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
> For upgrading existing KubeVela, please read the [upgrade guide](./platform-engineers/advanced-install/#upgrade).
|
||||
|
||||
> the 1.2.0-rc.1 version is released, [go to install](/docs/next/install)
|
||||
|
||||
## 1. Choose Control Plane Cluster
|
||||
|
||||
Requirements:
|
||||
|
||||
- Kubernetes cluster >= v1.18.0
|
||||
- `kubectl` installed and configured
|
||||
|
||||
KubeVela relies on Kubernetes as control plane. The control plane could be any managed Kubernetes offering or your own cluster.
|
||||
KubeVela relies on Kubernetes as control plane. The control plane could be any managed Kubernetes offering or your own cluster.
|
||||
|
||||
For local deployment and test, you could use `kind` or `minikube`. For production usage, you could use Kubernetes services provided by cloud providers.
|
||||
|
||||
|
@ -40,29 +43,35 @@ minikube start
|
|||
|
||||
```shell script
|
||||
minikube addons enable ingress
|
||||
```
|
||||
```
|
||||
|
||||
</details>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="rke">
|
||||
|
||||
<b>(1)Install docker:</b>
|
||||
{" "}
|
||||
|
||||
The rke depend on docker, Follow the docker [installation guide](https://docs.docker.com/engine/install/).
|
||||
<b>(1)Install docker:</b>
|
||||
|
||||
<b>(2)Install rke:</b>
|
||||
The rke depend on docker, Follow the docker [installation guide](https://docs.docker.com/engine/install/).
|
||||
|
||||
{" "}
|
||||
|
||||
<b>(2)Install rke:</b>
|
||||
|
||||
Download rke binary from [rke release page](https://github.com/rancher/rke/releases).
|
||||
|
||||
If you have limited Internet access:
|
||||
|
||||
Download rke binary from [rke release page](https://github.com/rancher/rke/releases).
|
||||
|
||||
If you have limited Internet access:
|
||||
```
|
||||
wget https://static.kubevela.net/binary/rke/rke_linux-amd64 -O /usr/bin/rke
|
||||
chmod +x /usr/bin/rke
|
||||
```
|
||||
|
||||
<b>(3)Install kubernetes cluster:</b>
|
||||
{" "}
|
||||
|
||||
<b>(3)Install kubernetes cluster:</b>
|
||||
|
||||
```shell script
|
||||
mkdir ~/rkeinit && cd ~/rkeinit
|
||||
|
@ -75,6 +84,7 @@ chmod +x /usr/bin/rke
|
|||
cp kube_config_cluster.yml ~/.kube/config
|
||||
docker cp kubelet:/usr/local/bin/kubectl /usr/local/bin/kubectl
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="kind">
|
||||
|
@ -116,17 +126,16 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast
|
|||
|
||||
<TabItem value="cloudprovider">
|
||||
|
||||
* Alibaba Cloud [ACK Service](https://www.aliyun.com/product/kubernetes)
|
||||
* AWS [EKS Service](https://aws.amazon.com/cn/eks)
|
||||
* Azure [AKS Service](https://azure.microsoft.com/en-us/services/kubernetes-service)
|
||||
* Google [GKE Service](https://cloud.google.com/kubernetes-engine)
|
||||
- Alibaba Cloud [ACK Service](https://www.aliyun.com/product/kubernetes)
|
||||
- AWS [EKS Service](https://aws.amazon.com/cn/eks)
|
||||
- Azure [AKS Service](https://azure.microsoft.com/en-us/services/kubernetes-service)
|
||||
- Google [GKE Service](https://cloud.google.com/kubernetes-engine)
|
||||
|
||||
> Please ensure [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/) is installed and enabled.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## 2. Install KubeVela
|
||||
|
||||
Before install, you have to make sure the Helm is available. Follow [this guide](https://helm.sh/docs/intro/install/) to install helm.
|
||||
|
@ -141,47 +150,49 @@ chmod +x /usr/bin/helm
|
|||
</details>
|
||||
|
||||
1. Add and update Helm chart repo for KubeVela
|
||||
```shell script
|
||||
helm repo add kubevela https://charts.kubevela.net/core
|
||||
helm repo update
|
||||
```
|
||||
|
||||
```shell script
|
||||
helm repo add kubevela https://charts.kubevela.net/core
|
||||
helm repo update
|
||||
```
|
||||
2. Install KubeVela
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --set multicluster.enabled=true --wait
|
||||
```
|
||||
You can refer to [advanced installation guide](./platform-engineers/advanced-install) for more custom ways.
|
||||
|
||||
```shell script
|
||||
helm install --create-namespace -n vela-system kubevela kubevela/vela-core --set multicluster.enabled=true --wait
|
||||
```
|
||||
|
||||
You can refer to [advanced installation guide](./platform-engineers/advanced-install) for more custom ways.
|
||||
|
||||
3. Verify chart installed successfully
|
||||
```shell script
|
||||
helm test kubevela -n vela-system
|
||||
```
|
||||
|
||||
<details> <summary> Click to see the expected output of helm test </summary>
|
||||
```shell script
|
||||
helm test kubevela -n vela-system
|
||||
```
|
||||
|
||||
```shell
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test running
|
||||
Pod kubevela-application-test succeeded
|
||||
NAME: kubevela
|
||||
LAST DEPLOYED: Tue Apr 13 18:42:20 2021
|
||||
NAMESPACE: vela-system
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: kubevela-application-test
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:50:04 2021
|
||||
Phase: Succeeded
|
||||
TEST SUITE: first-vela-app
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:49:10 2021
|
||||
Phase: Succeeded
|
||||
NOTES:
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
```
|
||||
<details> <summary> Click to see the expected output of helm test </summary>
|
||||
|
||||
</details>
|
||||
```shell
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test pending
|
||||
Pod kubevela-application-test running
|
||||
Pod kubevela-application-test succeeded
|
||||
NAME: kubevela
|
||||
LAST DEPLOYED: Tue Apr 13 18:42:20 2021
|
||||
NAMESPACE: vela-system
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: kubevela-application-test
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:50:04 2021
|
||||
Phase: Succeeded
|
||||
TEST SUITE: first-vela-app
|
||||
Last Started: Fri Apr 16 20:49:10 2021
|
||||
Last Completed: Fri Apr 16 20:49:10 2021
|
||||
Phase: Succeeded
|
||||
NOTES:
|
||||
Welcome to use the KubeVela! Enjoy your shipping application journey!
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## 3. [Optional] Get KubeVela CLI
|
||||
|
||||
|
@ -210,20 +221,24 @@ curl -fsSl https://kubevela.io/script/install.sh | bash
|
|||
```shell script
|
||||
powershell -Command "iwr -useb https://kubevela.io/script/install.ps1 | iex"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="homebrew">
|
||||
|
||||
**macOS/Linux**
|
||||
|
||||
Update your brew firstly.
|
||||
|
||||
```shell script
|
||||
brew update
|
||||
```
|
||||
|
||||
Then install kubevela client.
|
||||
|
||||
```shell script
|
||||
brew install kubevela
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="download">
|
||||
|
||||
|
@ -234,7 +249,7 @@ brew install kubevela
|
|||
sudo mv ./vela /usr/local/bin/vela
|
||||
```
|
||||
|
||||
> Known Issue(https://github.com/oam-dev/kubevela/issues/625):
|
||||
> Known Issue(https://github.com/oam-dev/kubevela/issues/625):
|
||||
> If you're using mac, it will report that “vela” cannot be opened because the developer cannot be verified.
|
||||
>
|
||||
> The new version of MacOS is stricter about running software you've downloaded that isn't signed with an Apple developer key. And we haven't supported that for KubeVela yet.
|
||||
|
@ -248,17 +263,19 @@ sudo mv ./vela /usr/local/bin/vela
|
|||
KubeVela support a dozen of [out-of-box addons](./platform-engineers/advanced-install#Addons),
|
||||
please at least enable following addons to make sure KubeVela functioning well:
|
||||
|
||||
* Helm and Kustomize Components addons
|
||||
- Helm and Kustomize Components addons
|
||||
|
||||
```shell
|
||||
vela addon enable fluxcd
|
||||
```
|
||||
|
||||
* Terraform addon
|
||||
- Terraform addon
|
||||
|
||||
```shell
|
||||
vela addon enable terraform
|
||||
```
|
||||
|
||||
* Terraform Provider addon for Alibaba Cloud
|
||||
- Terraform Provider addon for Alibaba Cloud
|
||||
|
||||
Enable Terraform Alibaba Cloud Provider as below to [provision and/or consume cloud resources](./end-user/components/cloud-services/provider-and-consume-cloud-services).
|
||||
|
||||
|
@ -269,111 +286,114 @@ please at least enable following addons to make sure KubeVela functioning well:
|
|||
vela addon enable terraform/provider-alibaba ALICLOUD_ACCESS_KEY=<xxx> ALICLOUD_SECRET_KEY=<yyy> ALICLOUD_REGION=<region>
|
||||
```
|
||||
|
||||
* Terraform Provider addon for Azure
|
||||
- Terraform Provider addon for Azure
|
||||
|
||||
Enable Terraform Azure Provider as below to [provision and/or consume cloud resources](./end-user/components/cloud-services/provider-and-consume-cloud-services).
|
||||
Enable Terraform Azure Provider as below to [provision and/or consume cloud resources](./end-user/components/cloud-services/provider-and-consume-cloud-services).
|
||||
|
||||
Set these parameters below per [Authenticate Terraform to Azure](https://docs.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure?tabs=bash).
|
||||
Set these parameters below per [Authenticate Terraform to Azure](https://docs.microsoft.com/en-us/azure/developer/terraform/authenticate-to-azure?tabs=bash).
|
||||
|
||||
```shell
|
||||
vela addon enable terraform/provider-azure ARM_CLIENT_ID=<aaa> ARM_CLIENT_SECRET=<bbb> ARM_SUBSCRIPTION_ID=<ccc> ARM_TENANT_ID=<ddd>
|
||||
```
|
||||
```shell
|
||||
vela addon enable terraform/provider-azure ARM_CLIENT_ID=<aaa> ARM_CLIENT_SECRET=<bbb> ARM_SUBSCRIPTION_ID=<ccc> ARM_TENANT_ID=<ddd>
|
||||
```
|
||||
|
||||
* Terraform Provider addon for AWS
|
||||
- Terraform Provider addon for AWS
|
||||
|
||||
Enable Terraform AWS Provider as below to [provision and/or consume cloud resources](./end-user/components/cloud-services/provider-and-consume-cloud-services).
|
||||
Enable Terraform AWS Provider as below to [provision and/or consume cloud resources](./end-user/components/cloud-services/provider-and-consume-cloud-services).
|
||||
|
||||
Set these parameters below per [Authenticate Terraform to AWS](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables).
|
||||
Set these parameters below per [Authenticate Terraform to AWS](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#environment-variables).
|
||||
|
||||
```shell
|
||||
vela addon enable terraform/provider-aws AWS_ACCESS_KEY_ID=<aaa> AWS_SECRET_ACCESS_KEY=<bbb> AWS_DEFAULT_REGION=<region>
|
||||
```
|
||||
```shell
|
||||
vela addon enable terraform/provider-aws AWS_ACCESS_KEY_ID=<aaa> AWS_SECRET_ACCESS_KEY=<bbb> AWS_DEFAULT_REGION=<region>
|
||||
```
|
||||
|
||||
## 5. Verify
|
||||
|
||||
> You can also using `kubectl get comp -A` and `kubectl get trait -A` instead if you haven't installed CLI.
|
||||
|
||||
* Get built-in component types by `vela` CLI:
|
||||
- Get built-in component types by `vela` CLI:
|
||||
|
||||
```shell script
|
||||
vela components
|
||||
```
|
||||
|
||||
<details> <summary> Outputs </summary>
|
||||
|
||||
```console
|
||||
NAME NAMESPACE WORKLOAD DESCRIPTION
|
||||
alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster
|
||||
alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object
|
||||
alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object
|
||||
helm vela-system autodetects.core.oam.dev Helm release is a group of K8s resources from either git
|
||||
repository or Helm repo
|
||||
kustomize vela-system autodetects.core.oam.dev Kustomize can fetching, building, updating and applying
|
||||
Kustomize manifests from git repo.
|
||||
raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties
|
||||
task vela-system jobs.batch Describes jobs that run code or a script to completion.
|
||||
webservice vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that have a stable network endpoint to receive external
|
||||
network traffic from customers.
|
||||
worker vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that running at backend. They do NOT have network endpoint
|
||||
to receive external network traffic.
|
||||
```
|
||||
```console
|
||||
NAME NAMESPACE WORKLOAD DESCRIPTION
|
||||
alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster
|
||||
alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object
|
||||
alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object
|
||||
helm vela-system autodetects.core.oam.dev Helm release is a group of K8s resources from either git
|
||||
repository or Helm repo
|
||||
kustomize vela-system autodetects.core.oam.dev Kustomize can fetching, building, updating and applying
|
||||
Kustomize manifests from git repo.
|
||||
raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties
|
||||
task vela-system jobs.batch Describes jobs that run code or a script to completion.
|
||||
webservice vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that have a stable network endpoint to receive external
|
||||
network traffic from customers.
|
||||
worker vela-system deployments.apps Describes long-running, scalable, containerized services
|
||||
that running at backend. They do NOT have network endpoint
|
||||
to receive external network traffic.
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
* Get built-in traits by `vela` CLI:
|
||||
- Get built-in traits by `vela` CLI:
|
||||
|
||||
```shell script
|
||||
vela traits
|
||||
```
|
||||
|
||||
<details> <summary> Outputs </summary>
|
||||
|
||||
```console
|
||||
NAME NAMESPACE APPLIES-TO CONFLICTS-WITH POD-DISRUPTIVE DESCRIPTION
|
||||
annotations vela-system * true Add annotations on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
configmap vela-system * true Create/Attach configmaps on K8s pod for your workload which
|
||||
follows the pod spec in path 'spec.template'.
|
||||
cpuscaler vela-system deployments.apps false Automatically scale the component based on CPU usage.
|
||||
env vela-system * false add env on K8s pod for your workload which follows the pod
|
||||
spec in path 'spec.template.'
|
||||
expose vela-system false Expose port to enable web traffic for your component.
|
||||
hostalias vela-system * false Add host aliases on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
ingress vela-system false Enable public web traffic for the component.
|
||||
ingress-1-20 vela-system false Enable public web traffic for the component, the ingress API
|
||||
matches K8s v1.20+.
|
||||
init-container vela-system deployments.apps true add an init container and use shared volume with pod
|
||||
kustomize-json-patch vela-system false A list of JSON6902 patch to selected target
|
||||
kustomize-patch vela-system false A list of StrategicMerge or JSON6902 patch to selected
|
||||
target
|
||||
kustomize-strategy-merge vela-system false A list of strategic merge to kustomize config
|
||||
labels vela-system * true Add labels on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
lifecycle vela-system * true Add lifecycle hooks for the first container of K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
node-affinity vela-system * true affinity specify node affinity and toleration on K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
pvc vela-system deployments.apps true Create a Persistent Volume Claim and mount the PVC as volume
|
||||
to the first container in the pod
|
||||
resource vela-system * true Add resource requests and limits on K8s pod for your
|
||||
workload which follows the pod spec in path 'spec.template.'
|
||||
rollout vela-system false rollout the component
|
||||
scaler vela-system * false Manually scale K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
service-binding vela-system webservice,worker false Binding secrets of cloud resources to component env
|
||||
sidecar vela-system * true Inject a sidecar container to K8s pod for your workload
|
||||
which follows the pod spec in path 'spec.template'.
|
||||
volumes vela-system deployments.apps true Add volumes on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
```
|
||||
```console
|
||||
NAME NAMESPACE APPLIES-TO CONFLICTS-WITH POD-DISRUPTIVE DESCRIPTION
|
||||
annotations vela-system * true Add annotations on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
configmap vela-system * true Create/Attach configmaps on K8s pod for your workload which
|
||||
follows the pod spec in path 'spec.template'.
|
||||
cpuscaler vela-system deployments.apps false Automatically scale the component based on CPU usage.
|
||||
env vela-system * false add env on K8s pod for your workload which follows the pod
|
||||
spec in path 'spec.template.'
|
||||
expose vela-system false Expose port to enable web traffic for your component.
|
||||
hostalias vela-system * false Add host aliases on K8s pod for your workload which follows
|
||||
the pod spec in path 'spec.template'.
|
||||
ingress vela-system false Enable public web traffic for the component.
|
||||
ingress-1-20 vela-system false Enable public web traffic for the component, the ingress API
|
||||
matches K8s v1.20+.
|
||||
init-container vela-system deployments.apps true add an init container and use shared volume with pod
|
||||
kustomize-json-patch vela-system false A list of JSON6902 patch to selected target
|
||||
kustomize-patch vela-system false A list of StrategicMerge or JSON6902 patch to selected
|
||||
target
|
||||
kustomize-strategy-merge vela-system false A list of strategic merge to kustomize config
|
||||
labels vela-system * true Add labels on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
lifecycle vela-system * true Add lifecycle hooks for the first container of K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
node-affinity vela-system * true affinity specify node affinity and toleration on K8s pod for
|
||||
your workload which follows the pod spec in path
|
||||
'spec.template'.
|
||||
pvc vela-system deployments.apps true Create a Persistent Volume Claim and mount the PVC as volume
|
||||
to the first container in the pod
|
||||
resource vela-system * true Add resource requests and limits on K8s pod for your
|
||||
workload which follows the pod spec in path 'spec.template.'
|
||||
rollout vela-system false rollout the component
|
||||
scaler vela-system * false Manually scale K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
service-binding vela-system webservice,worker false Binding secrets of cloud resources to component env
|
||||
sidecar vela-system * true Inject a sidecar container to K8s pod for your workload
|
||||
which follows the pod spec in path 'spec.template'.
|
||||
volumes vela-system deployments.apps true Add volumes on K8s pod for your workload which follows the
|
||||
pod spec in path 'spec.template'.
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
These capabilities are built-in so they are ready to use if showed up. KubeVela is designed to be programmable and fully self-service, so the assumption is more capabilities will be added later per your own needs.
|
||||
These capabilities are built-in so they are ready to use if showed up. KubeVela is designed to be programmable and fully self-service, so the assumption is more capabilities will be added later per your own needs.
|
||||
|
||||
## What's Next
|
||||
|
||||
* Start to [deploy our first application](./quick-start).
|
||||
* See the [advanced installation guide](./platform-engineers/advanced-install) to learn more about installation details.
|
||||
|
||||
- Start to [deploy our first application](./quick-start).
|
||||
- See the [advanced installation guide](./platform-engineers/advanced-install) to learn more about installation details.
|
||||
|
|
Loading…
Reference in New Issue