This slides is about how to use OAM as Kubernetes application definition and build standard but extensible application platform with it. Real world use cases in Alibaba are included as well.
Operational Strategy 3 Operational Strategy 2 Operational Strategy 4 How to group? How to group? What to run? What to run? The Pattern Behind “Modern Application”
rollout strategy: canary security group: public security group: private What to run? How to operate? trait scope Open Application Model as Kubernetes Application Definition They are all K8s API resources
e.g. PHP component waits for MySQL component to be ready (by status field, not just container started) • Declare data input/output • e.g. auto inject credential from MySQL component to PHP component’s ENV • Revision system • every change of Component object will generate a revision and can be tracked and referenced by ApplicationConfiguration/Trait
Traits/Scope ApplicationConfiguration Container Function Cloud Resources Traffic Management Canary Blue-Green A/B testing Scaling Dev Ops A Micro-App Engine built by OAM Traits System + Registry CLI/UI/Dashboard Capability System (Automatically expose capabilities from installed plugins)
abstraction to consolidate the application management experience, • Team-centric: separate concerns for developers, operators, and infra engineers. • Platform agnostic: deploy with same YAML to serverless platform, k8s on prems, or any cloud. • Manageability and discoverability: detect conflicted operational strategies at deploy
The Model • https://github.com/oam-dev/spec#community • The OAM Kubernetes Plugin (join effort with Crossplane ) • https://github.com/crossplane/oam-kubernetes-runtime • What’s next? • A OAM based Micro-App Engine!
Velocity: - 100,000 deploys/day - 500~1000 replicas/app Gateway Route Traffic Monitor Alert Deployment App Instance HPA Function Challenges • Fragmentation in app layer, ~11 internal PaaS/Serverless • Siloes, lack reusability and interoperability • Infra centric, low level primitives leaked to end user Gateway Route Traffic Rollout Job Infra Ops Developers Operators Deployment Route Service Job PaaS A PaaS B Serverless C Application Management At Alibaba
• ContainerizedWorkload • component • Stateless app • Virtual Machine • component • Legacy app • traffic rollout • trait • Traffic shifting • monitoring • trait • Prometheus configuration • logging • trait • SLS log collecting policy • auto-scaler • trait • HPA • manual-scaler • trait • Manual scaling • rollout • trait • Blue-green deployment • ingress • trait • Routing policy Balance extensibility of k8s with best end-user experience by OAM based abstractions Reusable components and traits to save engineering time Discoverability for capabilities in the system, detect strategy conflict at deploy • Before: traditional PaaS with close ecosystem • After: OAM as core application model, provide simplified end user experience but still keep the extensibility of k8s, make EDAS become into an open ecosystem Share with other platforms
OpenKruise • component • Alternative to StatefulSet • Operators • component • Workloads based on operator • In-place rollout • trait • In-place rollout • canary • trait • Canary deployment • khpa • Trait • HPA to scale Operators • pvc • trait • Claim persistent storage • backup • trait • Data backup • restore • trait • Data restore • ingress • trait • Routing policy • monitoring • trait • Integrated internal monitoring policy All speak OAM API, easy to integrate with other OAM systems OAM to decouple application from runtime, easy to upgrade infrastructure Reusable components and traits to save engineering time • Before: in-house app definition, lack of portability and interoperability across clusters • After: OAM as core application model to manage stateful applications, e.g. Kafka, Zookeeper and Database on any cluster Share with other platforms
reinvent every wheel for serverless • After: OAM as unified definition of various workload types, and reuse traits from may other systems like EDAS. feature OAM Category Description • ContainerizedWorkload • component • Serverless container • Function • component • FaaS workload • Knative service (WIP) • component • Knative serving workload • traffic-mgmt • trait • Istio based Traffic shifting • cron-scaler • trait • Cron HPA • manual-scaler • trait • Manual scale • auto-scaler • trait • HPA • sls-project, sls-logstore, sls- index • component • Alibaba Cloud Resources as BaaS Separate concerns make developers accept serverless model way easier Migrate from K8s/PaaS to Serverless only need to update its trait Reusable components and traits to save engineering time Connect and consume cloud resources thru OAM based BaaS Share with other platforms
platform capabilities, best engineering efficiency Clear separate of concerns in the workflow of app management, best communication and collaboration efficiency For Platform • Simple, team-centric and unified experience • Enjoy “unlimited” capabilities provided by k8s ecosystem - the “open” PaaS For end users (Dev and Ops) Minimal migration effort from PaaS/K8s to OAM platform The simplest and unified approach to integrate and consume Alibaba Cloud Resources