aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/deployment.rnc
blob: d47ce81eaac1f0c648ad16496981e466ac749de2 (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# 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 }? &
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }? &
   Step
}

Step =
    StepExceptInstance &
    Instance*

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

PrimitiveStep =
    Delay* &
    Region* &
    ProdTest*

Instance = element instance {
   attribute id { xsd:string } &
   attribute tags { xsd:string }? &
   attribute athenz-service { xsd:string }? &
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }? &
   StepExceptInstance
}

ParallelSteps = element parallel {
    SerialSteps* &
    PrimitiveStep*
}

SerialSteps = element steps {
    ParallelSteps* &
    PrimitiveStep*
}

ParallelInstances = element parallel {
    SerialInstances* &
    Instance*
}

SerialInstances = element steps {
    ParallelInstances* &
    Instance*
}

Upgrade = element upgrade {
    attribute policy { xsd:string }? &
    attribute revision-target { xsd:string }? &
    attribute revision-change { xsd:string }? &
    attribute min-risk { xsd:long }? &
    attribute max-risk { xsd:long }? &
    attribute max-idle-hours { xsd:long }? &
    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 from-date { xsd:string }? &
    attribute to-date { 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 }? &
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }? &
   text
}

Staging = element staging {
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }? &
   text
}

Dev = element dev {
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }?
}

Perf = element perf {
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { xsd:string }?
}

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

ProdTest = element test {
   text
}

Region = element region {
   attribute active { xsd:boolean }? &
   attribute athenz-service { xsd:string }? &
   attribute cloud-account { xsd:string }? &
   attribute empty-host-ttl { 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 } &
    attribute region { xsd:string }? &
    text
}

AllowedUrn = element allow {
    attribute with { xsd:string } &
    attribute arn { xsd:string }? &
    attribute project { xsd:string }?
}

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

Endpoints = element endpoints {
    Endpoint+
}

Bcp = element bcp {
    attribute deadline { xsd:string }? &
    Group*
}

Group = element group {
    attribute deadline { xsd:string }? &
    Endpoint* &
    MemberRegion+
}

MemberRegion = element region {
    attribute fraction { xsd:double }? &
    text
}