Skip to content

OAM Model

The Nomad PaaS implements the Open Application Model (OAM) specification for defining cloud-native applications.

Core Concepts

Application

An Application is the top-level resource that describes a complete deployment:

apiVersion: core.oam.dev/v1alpha2
kind: Application
metadata:
  name: my-app
spec:
  components: []
  scopes: []

Component

A Component defines a workload and its configuration:

- name: web
  type: webservice
  properties:
    image: nginx:1.25
    ports:
      - name: http
        port: 80

Trait

Traits add operational capabilities to components:

traits:
  - type: scaler
    properties:
      replicas: 3

Scope

Scopes group components and provide shared configuration:

scopes:
  - scopeRef:
      kind: networkscope.nomad.oam.dev
      name: production-network

Resource Model

Application
├── Component[]
│   ├── Type (workload kind)
│   ├── Properties (workload config)
│   └── Traits[]
│       └── Properties
└── Scope[]
    ├── ScopeRef
    └── Properties

Mapping to Nomad

OAM Resource Nomad Resource
Application Job
Component Task Group
Container Task
Trait Job/Task settings
Scope Job-level settings

Version

The controlplane implements OAM v1alpha2 with Nomad-specific extensions:

apiVersion: core.oam.dev/v1alpha2

Extension Points

The model is extended with Nomad-specific types:

  • Workload Types: containerizedworkload.nomad.oam.dev, batchworkload.nomad.oam.dev, etc.
  • Traits: updatestrategy.nomad.oam.dev, migration.nomad.oam.dev, etc.
  • Scopes: networkscope.nomad.oam.dev, nodepool.nomad.oam.dev, etc.