Skip to content

Instantly share code, notes, and snippets.

@nodefortytwo
Created February 23, 2022 11:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nodefortytwo/48e5cb4ca7590a05a7e18113403178b5 to your computer and use it in GitHub Desktop.
Save nodefortytwo/48e5cb4ca7590a05a7e18113403178b5 to your computer and use it in GitHub Desktop.
DAZN Manifest Public 330 Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://dazn.com/manifest.schema.json",
"title": "dazn-manifest",
"type": "object",
"additionalProperties": false,
"description": "A YAML file which describes the contents of a code repository in a machine readable format.",
"properties": {
"dazn-manifest": {
"title": "version",
"description": "The dazn-manifest version. This schema describes 3.3.0.",
"examples": [
"3.3.0"
],
"type": "string"
},
"owner": {
"title": "Owner",
"description": "The owner of the repo. Must be an email address and is usually the mailing list of a development team. If this field is provided it becomes possible to discover the owner of the service by looking in the service dictionary. This field also enables grouping services by team.",
"type": "string",
"format": "email",
"examples": [
"team-name@dazn.com",
"john.smith@dazn.com"
]
},
"inner-source": {
"title": "inner-source",
"description": "Information about the inner source projects contained in the repo",
"type": "array",
"items": {
"title": "Inner Source Projects",
"type": "object",
"additionalProperties": false,
"description": "A list of Inner Source projects that exist in the current repo.",
"required": [
"maintainers",
"distribution-method"
],
"properties": {
"directory": {
"title": "Inner source location directory",
"type": "string",
"description": "File path to the inner source package, defaults to the top level directory."
},
"description": {
"title": "Inner Source Description",
"type": "string",
"description": "Describes the inner source package (especially useful for mono repos)."
},
"friendly-name": {
"title": "Inner source friendly name",
"type": "string",
"description": "An optional alternative to the package name (defaults to repo name)"
},
"distribution-method": {
"title": "Inner source distribution method",
"type": "string",
"enum": [
"Drone Plugin",
"NPM",
"Go Module",
"Browser Extension",
"Document",
"Cloud Infrastructure",
"CLI",
"GitHub",
"Web App"
],
"description": "Identifies the type of distribution for the inner-source package. Must be one of: 'Drone Plugin', 'NPM', 'Go Module', 'Chrome Extension', 'Document', 'Cloud Infrastructure', 'CLI', 'Github'"
},
"maintainers": {
"title": "Inner source maintainers",
"type": "array",
"description": "A list of maintainers of the inner source packages.",
"items": {
"title": "maintainer",
"type": "string",
"format": "email",
"description": "An inner source maintainer",
"additionalProperties": false,
"required": [
"email"
],
"examples": [
"user.name@dazn.com"
]
}
},
"categories": {
"title": "Inner source categories",
"type": "array",
"description": "A structured set of categories, used to categorise the inner source package. Must be one of 'frontend' or 'backend'",
"items": {
"title": "category",
"type": "string",
"description": "An inner source project category.",
"enum": [
"backend",
"frontend"
]
}
},
"labels": {
"title": "Inner source labels",
"type": "array",
"description": "An unstructured set of labels, used to aid discovery of the inner source package.",
"items": {
"title": "label",
"type": "string",
"description": "An inner source project label."
}
},
"rfcs": {
"title": "Inner Source Associated RFCs",
"type": "array",
"description": "A list of the RFC identifiers which the inner source project implements. RFC name must match the `^RFC-[0-9]{3,10}$` regular expression. ",
"items": {
"title": "rfc",
"pattern": "^RFC-[0-9]{3,10}$",
"type": "string",
"description": "An associated inner source RFC."
}
}
}
}
},
"services": {
"title": "Services",
"description": "Information about the services contained in the repo. Providing this information fuels services such as Alexandria https://alexandria.daznplatform.com.",
"type": "array",
"items": {
"title": "Service",
"type": "object",
"additionalProperties": false,
"description": "Represents a Service or Application located in your repository.",
"required": [
"name"
],
"properties": {
"name": {
"title": "Name",
"type": "string",
"description": "Unique, machine readable name of the service. This should match the 'Application' tag in your services' AWS resource tagging. Often it will match the name of your repository.",
"examples": [
"playback",
"rails",
"awesome-payment-service"
],
"pattern": "^[A-Za-z0-9-]+$"
},
"description": {
"title": "Description",
"type": "string",
"description": "A short description of the service.",
"examples": [
"Service which creates custom widgets for Acme corporation."
]
},
"aws-accounts": {
"title": "AWS Accounts",
"description": "A list of AWS accounts which this service is deployed to. This list makes it possible to focus tag scanning to particular accounts.",
"type": "array",
"items": {
"title": "AWS Account",
"description": "An AWS account which the service is deployed to.",
"type": "string",
"pattern": "[a-z0-9-]+",
"examples": [
"dazn-dev",
"dazn-ar-prod",
"dazn-platform-test"
]
}
},
"gcp-projects": {
"title": "GCP Projects",
"description": "A list of GCP Projects which this service is deployed to.",
"type": "array",
"items": {
"title": "GCP Project",
"description": "A GCP Project which the service is deployed to.",
"type": "string",
"pattern": "[a-z0-9-]+",
"examples": [
"core-stage-31cc7d",
"core-prod-31cc7d"
]
}
},
"azure-subscriptions": {
"title": "Azure Subscriptions",
"description": "A list of Azure Subscriptions which this service is deployed to.",
"type": "array",
"items": {
"title": "Azure Subscription",
"description": "A Azure Subscription which the service is deployed to.",
"type": "string",
"pattern": "[a-z0-9-]+",
"examples": [
"c2fe4045-fd6d-45ab-90aa-49bb3cb430e7",
"b9df67df-bfa8-48fe-ab95-288ce4b35686"
]
}
},
"application-tags": {
"title": "Application Tags",
"description": "A custom list of 'Application' AWS resource tags assigned to the components within this service. These tags can be used for cost attribution",
"type": "array",
"items": {
"title": "Application Tag",
"type": "string",
"description": "An 'Application' AWS resource tag assigned to the components within this service.",
"examples": [
"pubby",
"gift-codes",
"geofencing"
]
}
},
"tags": {
"title": "Tags",
"description": "A list of strings, used to classify the services in various ways. This is different to the application-tags in metadata, as application-tags are AWS resource tags.",
"type": "array",
"items": {
"title": "Tag",
"type": "string",
"pattern": "[a-z0-9-]+",
"description": "A string used to classify the service in various ways.",
"examples": [
"backend",
"http-hmac",
"golang"
]
}
},
"annotations": {
"title": "Annotations",
"description": "An object with arbitrary non-identifying metadata attached to the service, Identical in use to [Backstage annotations](https://backstage.io/docs/features/software-catalog/descriptor-format#annotations-optional)",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"type": "string"
}
}
},
"domains": {
"title": "Domains",
"type": "array",
"description": "A list of domains exposed by the service. By including a list of domains, it will become possible to search for this service by domain in the service dictionary.",
"items": {
"title": "Domain",
"description": "A domain exposed by the service. By including a domain, it will become possible to search for this service by this domain in the service dictionary.",
"type": "object",
"additionalProperties": false,
"properties": {
"env": {
"title": "Environment",
"description": "The environment the domain belongs to.",
"type": "string",
"enum": [
"dev",
"test",
"stage",
"prod"
],
"meta:enum": {
"dev": "Development",
"test": "Testing",
"stage": "Stage",
"prod": "Production"
}
},
"domain": {
"title": "Domain",
"description": "The domain exposed by the service.",
"type": "string",
"examples": [
"service-name.dazn-dev.com",
"service-name.dazn-test.com",
"service-name.dazn-stage.com",
"service-name.dazn.com"
]
},
"region": {
"title": "AWS Region",
"description": "The AWS region the domain belongs to, if the domain is region specific. If the domain is global, or the service is not multi-region, this field can be omitted.",
"type": "string",
"examples": [
"eu-central-1",
"us-east-1",
"ap-northeast-1"
]
}
}
}
},
"gateway-enabled": {
"title": "Trigger register service into the gateway",
"description": "If true, the service will be registered and all resources will be created",
"type": "boolean"
},
"links": {
"title": "Links",
"description": "A list of links to external resources related to the service. By including this list, useful documentation and resources become more discoverable from the service dictionary.",
"type": "array",
"items": {
"title": "Link",
"type": "object",
"additionalProperties": false,
"description": "A link to an external resource related to the service.",
"required": [
"type",
"label",
"url"
],
"properties": {
"type": {
"title": "Type",
"type": "string",
"description": "The type of link.",
"enum": [
"architecture",
"monitoring",
"alerting",
"logging",
"runbook",
"other",
"support-channel"
],
"meta:enum": {
"architecture": "Architecture documentation",
"monitoring": "Dashboards, service maps etc.",
"alerting": "Descriptions of alarms, pagerduty etc.",
"logging": "Saved Searches, logging visualisations etc.",
"runbook": "Runbook",
"other": "Other useful links",
"support-channel": "A URL with a link to a support channel (i.e. Microsoft Teams)"
}
},
"label": {
"title": "Label",
"type": "string",
"description": "A description of the link.",
"examples": [
"Component A dashboard",
"3rd party API docs"
]
},
"url": {
"title": "URL",
"type": "string",
"description": "External web page URL.",
"examples": [
"https://one.newrelic.com/somedashboard",
"https://livesport.atlassian.net/wiki/spaces/AN/pages/some+page"
]
}
}
}
},
"dependencies": {
"title": "Dependencies",
"type": "array",
"description": "A description of the dependencies between the service and other services. By completing this section, it will become possible to visualize your service in a service map.",
"items": {
"title": "Dependency",
"description": "A description of a dependency between the service and another service.",
"type": "object",
"additionalProperties": false,
"required": [
"service",
"type"
],
"properties": {
"service": {
"title": "Service",
"description": "The name of the other service as defined in its manifest. Service names can be found in the service dictionary.",
"type": "string",
"pattern": "^[A-Za-z0-9-]+$",
"examples": [
"playback",
"rails",
"awesome-payment-service"
]
},
"type": {
"title": "Dependency Type",
"description": "The type of dependency. By providing this value it becomes possible to visualise the different types of dependencies in the service map.",
"type": "string",
"enum": [
"requests-from",
"requests-to",
"async-requests-from",
"async-requests-to",
"notifies",
"consumes"
],
"meta:enum": {
"requests-from": "Receives synchronous requests from (Example: API which returns 200 status code or synchronous lambda invocation)",
"requests-to": "Sends synchronous requests to (Example: API which returns 200 status code or synchronous lambda invocation)",
"async-requests-from": "Receives asynchronous requests from (Example: API which returns 202 status code or asynchronous lambda invocation)",
"async-requests-to": "Sends asynchronous requests to (Example: API which returns 202 status code or asynchronous lambda invocation)",
"notifies": "Notifies / Sends a message to (Example: SNS topic sends a message to an SQS queue)",
"consumes": "Consumes / Receives a message from (Example: SQS queue receives a message from an SNS topic)"
}
},
"security": {
"title": "Security",
"description": "A list of techniques used to authenticate the client in inter-service communication. By providing this it becomes possible to visualize service communication security techniques in the dependency map.",
"type": "array",
"uniqueItems": true,
"items": {
"title": "Security",
"description": "A technique used to authenticate the client in inter-service communication.",
"type": "string",
"enum": [
"iam",
"api-key",
"jwt",
"hmac"
],
"meta:enum": {
"iam": "AWS Identity and Access Management (IAM) is used for client authentication",
"api-key": "A static API key is used for client authentication",
"jwt": "A JWT token is used for client authentication",
"hmac": "A shared Vault secret and HMAC is used for client authentication"
}
}
},
"retries": {
"title": "Retries on failure",
"description": "`true` if dependency failures are being retried, `false` if dependency failures are not being retried",
"type": "boolean"
},
"failure-handling": {
"title": "Failure handling",
"description": "Defines how the service behaves when request to the dependency are failing (after all resilience mechanisms, eg. retries, caching etc).",
"type": "string",
"enum": [
"ok",
"fail"
],
"meta:enum": {
"ok": "Dependency 'fail' would result in a perfectly 'ok' response from service without any noticeable degradation",
"fail": "Dependency 'fail' would result in a service 'fail' (cascade)"
}
}
}
}
},
"slo": {
"title": "SLOs",
"description": "A list of Service Level Objectives (SLOs). By providing a list of SLOs it becomes possible to discover and visualize them in the service dictionary.",
"type": "array",
"items": {
"title": "SLO",
"description": "A Service Level Objective (SLO).",
"type": "object",
"additionalProperties": false,
"required": [
"type",
"value",
"description"
],
"properties": {
"type": {
"title": "SLI Type",
"description": "The Service Level Indicator (SLI).",
"type": "string",
"enum": [
"latency",
"error",
"availability",
"freshness"
],
"meta:enum": {
"latency": "Latency, the proportion of valid requests served faster than a threshold",
"error": "Errors, errors as a fraction of all requests received (error/total)",
"availability": "Availability, the fraction of the time that a service is usable/reachable",
"freshness": "Freshness, the proportion of valid data updated more recently than a threshold."
}
},
"description": {
"title": "Description",
"description": "Information to appear alongside this SLO in error budget dashboards/alerts",
"type": "string",
"examples": [
"HTTP API latency 3s"
]
},
"value": {
"title": "Value",
"description": "The service level objective (SLO) value. For example, in '85% of your traffic should have a latency of <= 100ms' the value should be 85.",
"examples": [
95,
99,
99.95
],
"type": "number"
},
"error-budget-tracking": {
"title": "error-budget-tracking",
"type": "array",
"items": {
"title": "error-budget-tracking-rule",
"properties": {
"window": {
"title": "window",
"description": "The period to use for tracking expressed as a duration string",
"type": "string",
"pattern": "^\\d+(s|m|h|d|w|y)$",
"examples": [
"30s",
"15m",
"1h",
"24h",
"30d",
"1y"
]
},
"threshold": {
"title": "Threshold",
"description": "Trigger the alert when a given percentage of the error budget has been spent",
"type": "number"
},
"alert-enabled": {
"title": "Trigger alert",
"description": "If true, an alert will be sent to PagerDuty if the threshold is breached",
"type": "boolean"
}
},
"required": [
"window",
"threshold",
"alert-enabled"
]
}
},
"tags": {
"title": "tags",
"description": "Optional metric tags to use when querying your SLI data",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"security": {
"title": "Security",
"description": "Security metadata about your service. By completing this section, you make it possible to discover security-related service information in the service dictionary. This section should be completed in collaboration with an application security champion and the information security team.",
"type": "object",
"additionalProperties": false,
"required": [
"risk-owner",
"risk-tier"
],
"properties": {
"risk-owner": {
"title": "Risk owner",
"description": "Contact e-mail address to person responsible for risk assessment. If this property is provided, it becomes possible to build automation around finding a replacement risk owner if the risk owner leaves the company.",
"type": "string",
"examples": [
"kamil.wojciechowski@dazn.com"
]
},
"risk-tier": {
"title": "Risk tier",
"description": "Controls what should be added during the architecture phase and what security practices should be employed during development, testing and maintenance.",
"type": "string",
"enum": [
"Low",
"Medium",
"High"
]
},
"threats": {
"title": "List of threats",
"description": "Key-threat is person/entity capable of interfering with company security.",
"type": "array",
"items": {
"title": "Threat's name",
"type": "string",
"examples": [
"External dependencies in code",
"Ransomware attack on database",
"Phishing attack"
]
}
},
"crown-jewels-impact": {
"title": "List of Crown Jewels",
"description": "Crown Jewels are assets and data that need special care, their compromise might have a disastrous impact on the company.",
"type": "array",
"examples": [
"https://livesport.atlassian.net/wiki/spaces/IS/pages/1708131157/Crown+Jewels"
],
"items": {
"title": "Crown Jewel",
"description": "A Crown Jewel is an asset or some data that needs special care as their compromise might have a disastrous impact on the company.",
"type": "object",
"additionalProperties": false,
"properties": {
"risk-rating": {
"title": "Crown Jewel's risk rating",
"description": "Risk rating associated with given Crown Jewel in similar fashion to Risk Tier assigned to whole project.",
"type": "string",
"enum": [
"Low",
"Medium",
"High"
]
},
"name": {
"title": "Crown Jewel's name",
"description": "Name of given Crown Jewel.",
"type": "string",
"enum": [
"The Global Video Network",
"Production Hubs",
"CDN network",
"DRM",
"Playback",
"Customer sign up, sign in, account management",
"Geofencing and geo portability",
"Other services with big revenue impact",
"Architectural & technical designs",
"Proprietary code & binaries",
"Mergers & Acquisition",
"ExeCo and senior management identities (CXO Fraud)",
"Management Information",
"Card Holder Data (CHD)",
"Customer Personal Data",
"HR & Employee Information",
"Enterprise IdPs (Active Directory, LDAP, AWS IAMs)",
"Privileged Access Management systems",
"Secrets, keys & authN credentials"
]
}
}
}
},
"stored-asset-types": {
"title": "Stored asset types",
"description": "List of assets that are stored by system.",
"type": "array",
"items": {
"type": "string",
"description": "The name of a stored asset.",
"examples": [
"Log of Customer made actions",
"Content with DRM protection",
"Encrypted Customer data"
]
}
}
}
},
"support": {
"title": "Support",
"description": "Support info about the service",
"type": "object",
"additionalProperties": false,
"required": [
"escalation-policies"
],
"properties": {
"escalation-policies": {
"title": "Escalation Policies",
"description": "Escalation policies for each environment.",
"type": "object",
"required": [
"prod"
],
"properties": {
"dev": {
"title": "dev",
"description": "Escalation policy to use in dev environment",
"type": "string",
"examples": [
"My teams pre-prod EP"
]
},
"test": {
"title": "test",
"description": "Escalation policy to use in test environment",
"type": "string",
"examples": [
"My teams pre-prod EP"
]
},
"stage": {
"title": "stage",
"description": "Escalation policy to use in stage environment",
"type": "string",
"examples": [
"My teams pre-prod EP"
]
},
"prod": {
"title": "prod",
"description": "Escalation policy to use in prod environment",
"type": "string",
"examples": [
"My teams prod EP"
]
}
}
},
"acknowledgement-timeout": {
"title": "Acknowledgement Timeout",
"description": "Time in seconds that an incident changes to the Triggered State after being Acknowledged",
"type": "integer",
"default": 3600,
"examples": [
3600
]
},
"urgencies": {
"title": "Urgencies",
"description": "Define the urgency and paging schedules for the service",
"type": "array",
"items": {
"title": "Urgency",
"type": "object",
"additionalProperties": false,
"description": "Represents an urgency to be used for an environment",
"required": [
"environment"
],
"properties": {
"environment": {
"title": "Environment",
"description": "Environment",
"type": "array",
"items": {
"type": "string",
"enum": [
"dev",
"test",
"stage",
"prod"
]
}
},
"urgency": {
"title": "Urgency",
"description": "Urgency for selected environments",
"type": "string",
"enum": [
"low",
"high"
],
"default": "low"
},
"support-hours": {
"title": "Support Hours",
"description": "Set support hours for paging. Outside of the schedule hours, pages will not be sent",
"type": "object",
"required": [
"days-of-week",
"start-time",
"end-time"
],
"properties": {
"days-of-week": {
"title": "Days of Week",
"description": "The days of the week to enable these support hours",
"type": "array",
"items": {
"title": "day",
"type": "integer",
"description": "Day of week that the support hours should be enabled in accordance with ISO 8601",
"enum": [
1,
2,
3,
4,
5,
6,
7
],
"example": [
1,
2,
3,
4,
5,
6,
7
]
}
},
"start-time": {
"title": "Start time",
"description": "The start time of the support hours in the PagerDuty default timezone (London time)",
"type": "string",
"pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]",
"examples": [
"09:00"
]
},
"end-time": {
"title": "End time",
"description": "The end time of the support hours in the PagerDuty default timezone (London time)",
"type": "string",
"pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]",
"examples": [
"17:30"
]
}
}
},
"subscribe-ops": {
"title": "Subscribe Ops",
"description": "Set this to true to ensure that ops are notified whenever the service has an incident",
"type": "boolean",
"default": false,
"examples": [
true,
false
]
}
}
}
}
}
},
"environments": {
"title": "Environments",
"description": "The environments that the service is deployed to",
"type": "object",
"properties": {
"dev": {
"title": "dev",
"description": "set to false to disable the dev environment",
"type": "boolean",
"default": false
},
"test": {
"title": "test",
"description": "set to false to disable the test environment",
"type": "boolean",
"default": false
},
"stage": {
"title": "stage",
"description": "set to false to disable the stage environment",
"type": "boolean",
"default": false
},
"prod": {
"title": "prod",
"description": "set to false to disable the prod environment",
"type": "boolean",
"default": false
}
},
"required": [
"dev",
"test",
"stage",
"prod"
]
},
"system": {
"title": "system",
"type": "string",
"description": "The system that this service belongs to. The system must either be defined in this manifest or in another manifest."
},
"errors": {
"title": "errors",
"description": "A list or Errors that this service can cause",
"type": "array",
"items": {
"title": "Error",
"description": "A Error that this service can cause.",
"type": "object",
"additionalProperties": false,
"required": [
"code",
"description"
],
"properties": {
"code": {
"title": "Error code",
"description": "The error code. Must be unique across all DAZN Manifests",
"type": "string"
},
"description": {
"title": "Description",
"description": "Information that describes the error in simple terms",
"type": "string",
"examples": [
"This error code indicates an issue with the payment backend"
]
},
"error-originator": {
"title": "Error Originator",
"description": "The name of the service that caused this error.",
"type": "string",
"examples": [
"sre-smart-scaling"
]
},
"links": {
"title": "Links",
"description": "A list of links to external resources related to the error.",
"type": "array",
"items": {
"title": "Link",
"type": "object",
"additionalProperties": false,
"description": "A link to an external resource related to the error.",
"required": [
"label",
"url"
],
"properties": {
"label": {
"title": "Label",
"type": "string",
"description": "A description of the link."
},
"url": {
"title": "URL",
"type": "string",
"description": "External web page URL."
}
}
}
}
}
}
}
}
}
},
"systems": {
"title": "Systems",
"description": "Information about the systems contained in the repo.",
"type": "array",
"items": {
"title": "System",
"type": "object",
"additionalProperties": false,
"description": "Represents a System that can consist of multiple services.",
"required": [
"name"
],
"properties": {
"name": {
"title": "Name",
"type": "string",
"description": "Unique, machine readable name of the system.",
"examples": [
"login",
"smart-scaling"
],
"pattern": "^[A-Za-z0-9-]+$"
},
"description": {
"title": "Description",
"type": "string",
"description": "A short description of the system.",
"examples": [
"System for logging in users to the platform."
]
}
}
}
},
"linter": {
"title": "Linter",
"description": "Provides context used by the dazn-linter to know which rules should apply to this repository.",
"type": "object",
"additionalProperties": false,
"properties": {
"rules": {
"title": "Rules",
"description": "A list of linter rules.",
"type": "array",
"items": {
"title": "Rule",
"description": "A linter rule.",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"title": "Name",
"description": "Name of the rule to apply the other flags in this object. E.g. name: drone-linter/roles.",
"examples": [
"drone-linter/roles"
],
"type": "string"
},
"enabled": {
"title": "Enabled",
"description": "true if the rule is enabled, false if it is disabled.",
"type": "boolean"
}
}
}
}
}
},
"pact": {
"title": "Pact",
"description": "Allows configuring our custom integration of PACT.io. Check out our custom integration repository for more information - https://github.com/getndazn/dapact.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"title": "Enabled",
"description": "Defaults to false because it is an opt-in feature. If set to true, you acknowledge that the .drone.yml file is ready to be executed with an event deployment and environment pact (All other deployment events should either specifically run for an environment, or exclude the pact environment).",
"type": "boolean"
}
}
}
},
"required": [
"dazn-manifest",
"owner"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment