Cloud Native 12 min read

Visualizing OAM: Step‑by‑Step Deployment of a Cloud‑Native Application

This article explains the Open Application Model (OAM), its core concepts of Components, Application Configuration and Traits, and demonstrates a visual platform that lets users create, configure, version, and publish a multi‑component application (nginx, tomcat, redis) on Kubernetes with detailed screenshots and a GitHub demo repository.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Visualizing OAM: Step‑by‑Step Deployment of a Cloud‑Native Application

Overview of Open Application Model (OAM)

OAM is an open‑source specification (announced in 2019 by Alibaba Cloud and Microsoft) that separates developer‑focused application description from operator‑focused operational traits, enabling platform‑agnostic, modular cloud‑native deployments.

Key Principles

Concern separation : Developers define components; operators attach reusable traits such as scaling or ingress.

Platform independence : Application definitions are decoupled from the underlying runtime, allowing the same OAM file to be applied on public clouds or on‑premise clusters.

Extensible trait model : New traits can be added without changing component definitions.

Core OAM Modules

Component : A reusable building block that represents a service (e.g., MySQL) or an application workload (e.g., a PHP server). A component is packaged as a container image and described in a component spec.

Application Configuration : A single declarative OAM document that aggregates all component specs and references the traits to be applied. This file is the source of truth for the operator.

Trait : A reusable operational description (e.g., horizontal pod autoscaler, Ingress, log collection). Traits are defined once and can be bound to any component.

Visual OAM Platform (v1alpha1)

The platform implements OAM v1alpha1 and provides two main functions:

Trait model UI : Eight built‑in traits (service publishing, log collection, auto‑scaling, storage mounting, etc.) can be attached to components via a plug‑in style.

OAM application orchestration : A canvas‑based editor lets users add components, bind traits, edit the underlying OAM YAML, and create versioned releases.

Step‑by‑Step Deployment Example (nginx + tomcat + redis)

Prerequisites

The OAM trait model must be installed in the cluster. Only system‑defined traits are available out‑of‑the‑box.

Workflow

Create an OAM application through the “OAM Application” menu and provide a name and namespace.

Add components :

Select a workload type (Server, Singleton Server, Task, etc.).

Specify the container image, replica count and other parameters. Multiple containers can be defined in a single component.

In the demo, three components are added: tomcat, redis, and mysql. The UI shows the generated Kubernetes resources (Deployment, Service, ConfigMap, etc.).

Attach traits to each component by selecting the component on the canvas, choosing required traits, and filling trait‑specific fields (e.g., replica count for autoscaling, host/path for Ingress).

Save a version by entering a version identifier (e.g., v1.0.0) and confirming.

Publish the application . After publishing the component status becomes “Instantiated” and the overall application shows a “Healthy” condition.

Inspect events via the Events tab to verify resource creation and to view generated Ingress objects.

Iterate : Modify a trait (e.g., change the Tomcat replica count to 4), save as a new version (e.g., v1.0.1), and republish. The platform updates the running resources accordingly.

Key Observations

The visual workflow encapsulates the full OAM lifecycle: creation → component assembly → trait binding → versioning → publishing → update.

Version management allows rollback to previous OAM releases.

Traits are applied declaratively; the underlying Kubernetes objects (Deployment, HPA, Service, Ingress) are generated automatically.

Reference Materials

All demo YAML files used in the tutorial are available at: https://github.com/harmonycloud/oam-simple-demo The OAM specification has progressed to v1alpha2 , which adds tighter Kubernetes integration, better support for existing CRD operators, and improved extensibility.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeKubernetesvisualizationOAMApplication DeploymentTraits
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.