KubeVela - The Modern App Delivery System in Alibaba
Mar. 2021, CM@WS Meeting 10
Cloud Native App Platform @AlibabaCloud
Last Updated: Oct 2021
What is KubeVela?
KubeVela
Render
Orchestrate
Deploy
Kubernetes Clusters
Clouds
IoT/Edge
CI Pipeline
Jenkins
...
CI
CD
An easy-to-use yet highly extensible app delivery system targets on today's hybrid, multi-cloud environments.
Introduction
Highlights
Architecture
User declares app deployment intents via Open Application Model (OAM).
KubeVela will then render OAM into a DAG of artifacts, operational behaviors and workflow steps, with leverage of CUE.
When this DAG is executed, the corresponding app delivery workflow will happen.
Open Application Model (OAM)
Component A
Component B
Step 1
Workflow
Policy 2
Component C
Kubernetes Clusters
Clouds
IoT/Edge
Trait 1
Trait 2
CI Pipeline
Jenkins
Argo
...
DAG
Use KubeVela
App Team
Deployment plan is the ONLY concept app team needs to learn in KubeVela, and as a declarative API, it works seamlessly with any CI/CD or GItOps tools.
The Deployment Plan
Components to deploy
e.g. a Helm chart, a Kustomize pkg, a Cloud Formation template, a Terraform module … literally anything!
Workflow of the deployment
e.g. blue-green deploy, progressive traffic shifting, manual approval … any pipeline style delivery steps!
Traits for Day 2 operations
e.g. ingress/route rules, auto-scaling rules … operational behaviors attached to components!
The higher level abstraction to model a full application deployment on top of hybrid infrastructures.
Policies to enforce
e.g. security scopes, overrides, healthy check policies, firewall rules … any policies to enforce before deployment happen!
Programmable
In KubeVela internal, an application deployment process is expressed as a DAG of components, traits, policies and steps in CUE. Hence, the Application entity is simply a “UI” for this DAG, it will be rendered into CUE code and then executed by control plane Kubernetes.
This also makes it possible for you to customize KubeVela with CUE at any time to meet diverse requirements on features or abstractions from different users. We call this power as “the programmable platform”.
DAG
CI Pipeline
Jenkins
Control Plane Cluster
(As Execution Engine)
可编程式应用交付
在 KubeVela 内核中,任何应用交付需求最终都会被表达为一个基于 CUE 模板语言的有向无环图(DAG)。所以 Application 对象实际上只是这个 DAG 面向用户侧的一种 UI 而已:一旦提交,它就会被 KubeVela 渲染成上述 CUE 代码然后使用 Kubernetes 来执行这个 DAG。
这也使得 KubeVela 能够允许你通过 CUE 模板语言任意定制和修改整个系统的行为和抽象,以便让 KubeVela 暴露的功能满足不同用户的多样化需求。我们称这种强大的可扩展性为:可编程式应用交付平台。
DAG
CI Pipeline
Jenkins
Control Plane Cluster
(As Execution Engine)
X-Definitions: The Interfaces for Programming KubeVela
Why KubeVela replies on a control-plane K8s?
Application
my-app.yaml
X-Definitions
helm.cue
rds.cue
vpc.cue
container
RDS instance
VPC instance
composition
Hence, we use a control plane K8s as the IaC Execution Engine to achieve:
They are all critical needs for large-scale app delivery.
Control Plane Cluster
(As Execution Engine)
So, does Alibaba adopt GitOps?
Our pipeline
For given app, it now only needs 1 manifest to describe the deployment plan (even across environments), and KubeVela will take over the rest delivery workflow with full automation and deterministic.
CI Pipeline
Jenkins
Artifact Registry
Src Code Repo
KubeVela
Runtime K8s Cluster A
Cloud Services
Runtime K8s Cluster B
Control Plane CLuster
Config Repo
Auto or manually configure
Pull Artifacts
CI
CD
Application YAML
Subscription Channel
KubeVela will set up subscription channel for runtime environments to pull app metadata and sync.
GitOps
sync app.yaml
Push app.yaml
(legacy mode)
We endorses a team-centric workflow
Application
template
template
template
RDS
Pod
Nginx
Pod
$ vela up
More features yet to come ...
Alibaba’s Application Infrastructure
Payment System
Cart System
Buy System
Serverless App Service
Unified App Infrastructure (KubeVela)
We
Runtime Cluster 1
Runtime Cluster 2
Other Clouds/Infrastructures
External Customers
Platform Team
internal groups
cloud product
~1M containers, ~10K deploys/day
Further Reading: Open Application Model - The Unified yet Extensible Abstraction for App Delivery
Traits
Scaling
Rollout
Traffic
Metrics
Route
Workload Definition
Database
Helm Chart
Job
StatefulSet
Deployment
Component Definition
Component Definition
Application
AWS RDS
Web Service
Component Definition
Backend Worker
Application
Thank You!
Further readings