aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/containercluster.rnc
blob: a30f61809ada0edbe2f86c3c504d592f5aa7523c (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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
ContainerCluster = element container | jdisc {
    attribute version { "1.0" } &
    attribute id { xsd:NCName }? &
    attribute jetty { xsd:boolean }? &
    Include* &
    ContainerServices &    
    DocumentBinding* &
    Aliases? &
    NodesOfContainerCluster?
}

ContainerServices =
    RestApi* &
    Servlet* &
    SearchInContainer? &
    DocprocInContainer? &
    ProcessingInContainer? &
    ModelEvaluation? &
    DocumentApi? &
    Components* &
    Component* &
    Handler* &
    Client* &
    Server* &
    Http? &
    AccessLog* &
    SecretStore? &
    GenericConfig*

Components = element components {
    Include* &
    Component*
}

Aliases = element aliases {
    element service-alias { xsd:NCName }* &
    element endpoint-alias { xsd:NCName }*
}

Include = element \include {
    attribute dir { text }
}

Http = element http {
    (Filtering & HttpServer+) |
    HttpServer+ |
    empty
}

Filtering = element filtering {
    HttpFilter* &
    AccessControl? &
    element request-chain {
        HttpFilterChain
    }* &
    element response-chain {
        HttpFilterChain
    }*
}

HttpServer =  element server {
    attribute port { xsd:nonNegativeInteger } &
    ComponentId &
    (Ssl | SslProvider)? &
    GenericConfig*
}

AccessLog = element accesslog {
    attribute type { string "yapache" | string "vespa" | string "json" | string "disabled" }? &
    attribute fileNamePattern { string }? &
    attribute compressOnRotation { xsd:boolean }? &
    attribute symlinkName { string }? &

    attribute rotationInterval { string }?
}

SecretStore = element secret-store {
    attribute type { string "oath-ckms" } &
    element group {
      attribute name { string } &
      attribute environment { string "alpha" | string "corp" | string "prod" | string "aws" | string "aws_stage" }
    } +
}

ModelEvaluation = element model-evaluation {
    empty
}

Ssl = element ssl {
    element private-key-file { string } &
    element certificate-file { string } &
    element ca-certificates-file { string }? &
    element client-authentication { string "disabled" | string "want" | string "need" }?
}

SslProvider = element ssl-provider {
    BundleSpec
}

# REST-API:

RestApi = element rest-api {
    attribute path { xsd:string { pattern = "\w[\w_/\-\.]*" } } &
    attribute jersey2 { xsd:boolean }? &
    element components {
      attribute bundle { xsd:Name } &
      element package { xsd:NCName }*
    }*

#    element inject {
#        attribute component { xsd:Name } &
#        attribute for-name { xsd:Name }
#    }*
}

# Servlet:

Servlet = element servlet {
    ComponentDefinition &
    ServletConfig? &
    element path { xsd:string { pattern = "\w[\w_/\-\.]*(\*)?" } }
}

ServletConfig = element servlet-config {
    anyElement+
}

# SEARCH:

SearchInContainer = element search {
    Include* &
    ServerBindings? &
    Searcher* &
    SearchChain* &
    Provider* &
    Renderer* &
    GenericConfig*
}

SearchChain = element chain {
    GenericSearchChain
}

GenericSearchChain =
    ComponentId &
    SearchChainInheritance &
    attribute searchers { text }? &
    Searcher* &
    Phase* &
    GenericConfig*

SearchChainInheritance =
    attribute inherits { text }? &
    attribute excludes { text }? &
    element inherits {
        element chain { ComponentSpec }* &
        element exclude { ComponentSpec }*
    }?


# DOCPROC:

DocprocInContainer = element document-processing {
    Include* &
    DocprocClusterAttributes? &
    DocumentProcessorV3* &
    ChainInDocprocInContainerCluster* &
    GenericConfig*
}
ChainInDocprocInContainerCluster = element chain {
    DocprocChainV3Contents
}



# PROCESSING:

ProcessingInContainer = element processing {
    Include* &
    ServerBindings? &
    Processor* &
    Chain* &
    ProcessingRenderer* &
    GenericConfig*
}



# DOCUMENT API:

DocumentApi = element document-api {
   ServerBindings &
   GenericConfig* &
   element abortondocumenterror { xsd:boolean }? &
   element retryenabled { xsd:boolean }? &
   element route { text }? &
   element maxpendingdocs { xsd:positiveInteger }? &
   element maxpendingbytes { xsd:positiveInteger }? &
   element retrydelay { xsd:double { minInclusive = "0.0" } }? &
   element timeout { xsd:double { minInclusive = "0.0" } }? &
   element tracelevel { xsd:positiveInteger }? &
   element mbusport { xsd:positiveInteger }?
}



# NODES:

NodesOfContainerCluster = element nodes {
    attribute jvmargs { text }? &
    attribute jvm-options { text }? &
    attribute jvm-gc-options { text }? &
    attribute preload { text }? &
    attribute allocated-memory { text }? &
    attribute cpu-socket-affinity { xsd:boolean }? &
    (
      (
        attribute of { xsd:string } &
        attribute required { xsd:boolean }?
      )
      |
      attribute type { xsd:string }
      |
      (
        attribute count { xsd:positiveInteger } &
        attribute flavor { xsd:string }? &
        attribute required { xsd:boolean }? &
        attribute exclusive { xsd:boolean }? &
        attribute docker-image { xsd:string }?
      )
      |
      element node {
        attribute hostalias { xsd:NCName } &
        attribute cpu-socket { xsd:positiveInteger }? &
        ServerPort* &
        GenericConfig*
      }+
    )
}

ServerPort = element server-port {
    ComponentId &
    attribute port { xsd:positiveInteger }
}


#DOCUMENT BINDINGS:

DocumentBinding = element document {
    attribute type { xsd:NCName } &
    attribute class { xsd:NCName } &
    attribute bundle { xsd:NCName }
}