aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/deployment.rnc
blob: f24750bde8bbf50546a144e9818e9a01c6186e25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# RELAX NG Compact Syntax
# Vespa Deployment file

start = element deployment {
   attribute version { "1.0" } &
   attribute major-version { text }? &
   attribute athenz-domain { xsd:string }? &
   attribute athenz-service { xsd:string }? &
   Step
}

Step =
    StepExceptInstance &
    Instance*

StepExceptInstance =
    Delay* &
    ParallelInstances* &
    Upgrade? &
    BlockChange* &
    Notifications? &
    Endpoints? &
    Test? &
    Staging? &
    Prod*

PrimitiveStep =
    Delay* &
    Region* &
    ProdTest*

Instance = element instance {
   attribute id { xsd:string } &
   attribute athenz-service { xsd:string }? &
   StepExceptInstance
}

ParallelSteps = element parallel {
    SerialSteps* &
    PrimitiveStep*
}

SerialSteps = element steps {
    ParallelSteps* &
    PrimitiveStep*
}

ParallelInstances = element parallel {
    Instance*
}

Upgrade = element upgrade {
    attribute policy { xsd:string }? &
    attribute rollout { xsd:string }?
}

BlockChange = element block-change {
    attribute revision { xsd:boolean }? &
    attribute version { xsd:boolean }? &
    attribute days { xsd:string } &
    attribute hours { xsd:string } &
    attribute time-zone { xsd:string }?
}

Notifications = element notifications {
    attribute when { xsd:string }? &
    Email*
}

Email = element email {
    attribute address { xsd:string }? &
    attribute role { xsd:string }? &
    attribute when { xsd:string }?
}

Test = element test {
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   text
}

Staging = element staging {
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   text
}

Prod = element prod {
   attribute global-service-id { text }? &
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   Region* &
   Delay* &
   ProdTest* &
   ParallelSteps*
}

ProdTest = element test {
   text
}

Region = element region {
   attribute active { xsd:boolean } &
   attribute athenz-service { xsd:string }? &
   text
}

Delay = element delay {
   attribute hours { xsd:long }? &
   attribute minutes { xsd:long }? &
   attribute seconds { xsd:long }?
}

EndpointRegion = element region {
    text
}

EndpointInstance = element instance {
    attribute weight { xsd:long } &
    text
}

Endpoint = element endpoint {
    attribute id { xsd:string }? &
    attribute container-id { xsd:string } &
    attribute region { xsd:string }? &
    EndpointRegion* &
    EndpointInstance*
}

Endpoints = element endpoints {
    Endpoint+
}