Skip to main content
Version: v0.9

app_configuration

Schema AppConfiguration

AppConfiguration is a developer-centric definition that describes how to run an Application.
This application model builds upon a decade of experience at AntGroup running super large scale
internal developer platform, combined with best-of-breed ideas and practices from the community.

Attributes

Name and DescriptionTypeDefault ValueRequired
workload
Workload defines how to run your application code. Currently supported workload profile
includes Service and Job.
workload.Service | workload.JobUndefinedrequired
opsRule
OpsRule specifies collection of rules that will be checked for Day-2 operation.
trait.OpsRuleUndefinedoptional
databasedatabase.DatabaseUndefinedoptional
monitoringmonitoring.PrometheusUndefinedoptional
labels{str: str}Undefinedoptional
annotations{str: str}Undefinedoptional

Examples

# Instantiate an App with a long-running service and its image is "nginx:v1"

import catalog.models.schema.v1 as ac
import catalog.models.schema.v1.workload as wl
import catalog.models.schema.v1.workload.container as c
import catalog.models.schema.v1.accessories.database as db
import catalog.models.schema.v1.accessories.monitoring as m
import catalog.models.schema.v1.accessories.trait as t

appConfiguration = ac.AppConfiguration {
workload: wl.Service {
containers: {
"nginx": c.Container {
image: "nginx:v1"
}
}
type: "CollaSet"
}
opsRule: t.OpsRule {
maxUnavailable: "30%"
}
database: db.Database {
type: "aws"
engine: "mysql"
version: "5.7"
instanceType: "db.t3.micro"
}
monitoring: m.Prometheus{
interval: "30s"
timeout: "15s"
path: "/metrics"
port: "web"
scheme: "http"
}
}