aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/schema-test-files/services.xml
blob: a413ec7753b822a0c98dd3a1577f10a26f845aec (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
255
256
257
258
259
260
261
262
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<services version="1.0">

  <config name="foo">
    <intVal>1</intVal>
  </config>

  <admin version="2.0">
    <adminserver hostalias="adminserver" />
    <logserver hostalias="logserver" />
    <slobroks>
      <slobrok hostalias="configserver" />
      <slobrok hostalias="container" />
      <slobrok hostalias="searchnode-1" />
    </slobroks>
    <metrics>

      <consumer id="cloudwatch-hosted">
        <metric-set id="my-set" />
        <metric id="my-metric"/>
        <metric id="my-metric2" display-name="my-metric3"/>
        <metric display-name="my-metric4" id="my-metric4.avg"/>
        <cloudwatch region="us-east1" namespace="my-namespace">
          <credentials access-key-name="my-access-key" secret-key-name="my-secret-key" />
        </cloudwatch>
      </consumer>

      <consumer id="cloudwatch-self-hosted-with-default-auth">
        <metric-set id="public" />
        <cloudwatch region="us-east1" namespace="namespace_legal.chars:/#1" />
      </consumer>

      <consumer id="cloudwatch-self-hosted-with-profile">
        <metric id="my-custom-metric" />
        <cloudwatch region="us-east1" namespace="another-namespace">
          <shared-credentials file="/user/.aws/credentials" profile="profile-in-credentials-file" />
        </cloudwatch>
      </consumer>

    </metrics>
    <logforwarding>
      <splunk deployment-server="foo:8989" client-name="foobar" splunk-home="/opt/splunk" phone-home-interval="900"/>
    </logforwarding>
  </admin>

  <config name="bar">
    <intVal>1</intVal>
  </config>

  <container id='qrsCluster_1' version='1.0'>
    <secret-store type="oath-ckms">
      <!-- NOTE: when removing (or adding) an environment, the rnc schema must also be updated! -->
      <group name="foo" environment="alpha" />
      <group name="foo" environment="corp" />
      <group name="foo" environment="prod" />
      <group name="foo" environment="aws" />
      <group name="foo" environment="aws_stage" />
    </secret-store>

    <http>
      <filtering strict-mode="true">
        <access-control>
          <exclude>
            <binding>http//*/foo/*</binding>
          </exclude>
        </access-control>

        <filter id="com.yahoo.YcaFilter" bundle="mybundle">
          <filter-config>
            <foo>bar</foo>
            <feature.enabled>true</feature.enabled>
          </filter-config>
        </filter>

        <response-chain id="BaseChain">
          <filter id="com.yahoo.Filter1" />
          <filter id="com.yahoo.Filter2">
            <filter-config />
          </filter>
          <binding>http://*/path1/*</binding>
          <binding>http://*/path2/*</binding>
        </response-chain>

        <request-chain id="DerivedChain" inherits="BaseChain" excludes="com.yahoo.Filter1">
          <filter id="com.yahoo.Filter3">
            <config name="container.core.http.http-filter">
              <param>
                <item>
                  <name>yca.appid.allow</name>
                  <value>yahoo.vespa_factory.yca_test</value>
                </item>
              </param>
            </config>
          </filter>
          <binding>http://*/path/*</binding>
        </request-chain>
      </filtering>

      <server port="4080" id="myServer" default-request-chain="DerivedChain" default-response-chain="BaseChain"/>
      <server port="4081" id="anotherServer"/>
      <server port="4082" id="defaultSsl">
        <ssl>
          <private-key-file>/foo/key</private-key-file>
          <certificate-file>/foo/cert</certificate-file>
          <ca-certificates-file>/foo/cacerts</ca-certificates-file>
          <client-authentication>want</client-authentication>
          <cipher-suites>
            TLS_AES_128_GCM_SHA256,
            TLS_AES_256_GCM_SHA384,
            TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
            TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
          </cipher-suites>
          <protocols>TLSv1.2,TLSv1.3</protocols>
        </ssl>
      </server>
      <server port="4083" id="sslProvider">
        <ssl-provider class="com.yahoo.MySslProvider" bundle="mybundle"/>
      </server>
    </http>

    <accesslog type='json'
           fileNamePattern='logs/vespa/access/access-json.%Y%m%d%H%M%S' compressOnRotation='true'  compressionType='zstd' queueSize='13' bufferSize='65536'/>
    <accesslog type='vespa'
           fileNamePattern='logs/vespa/access/access-vespa.%Y%m%d%H%M%S' />

    <document-api>
      <binding>http://*/document-api/</binding>
      <abortondocumenterror>false</abortondocumenterror>
      <retryenabled>false</retryenabled>
      <timeout>5.55</timeout>
      <route>default</route>
      <maxpendingdocs>100</maxpendingdocs>
      <http-client-api>
        <threadpool>
          <max-threads>50</max-threads>
          <min-threads>10</min-threads>
          <queue-size>1000</queue-size>
        </threadpool>
      </http-client-api>
    </document-api>

    <search>
      <binding>http://*/mysearch/</binding>
      <searcher id='outer-searcher' />
      <chain id='common'>
        <searcher id='outer-searcher' />
        <searcher id='inner-searcher' />
      </chain>

      <provider id='provider' type='local' cluster='foo'/>

      <chain id="parentchain" searchers="one two">
        <searcher id="three" />
        <inherits>
          <chain id="trope"/>
          <chain id="kanoo"/>
          <exclude id="notneededsearcher"/>
        </inherits>
      </chain>

      <chain id="achain" searchers="asearcher anothersearcher" inherits="wonkaparentchain" excludes="notneededsearcher"/>

      <threadpool>
        <max-threads>500</max-threads>
        <min-threads>500</min-threads>
        <queue-size>0</queue-size>
      </threadpool>

      <significance>
        <model model-id="idf-wiki-simple-english" path="models/idf-simple-english-wiki.json.zst" />
      </significance>
    </search>

    <processing>
      <processor id='processor1' class='com.yahoo.test.Processor1' />
      <chain id='default'>
        <processor idref='processor1'/>
        <processor id='processor2' class='com.yahoo.test.Processor2'/>
      </chain>
    </processing>

    <handler id="bla" class="foo" bundle="bar" />
    <handler id="bla2" class="foo$innerclass" bundle="bar" />
    <handler id="bla2$innerclass" bundle="bar" />
    <config name="foo">
      <intVal>0</intVal>
      <basicstruct>
        <bsInt>1</bsInt>
        <bsString>Hello</bsString>
      </basicstruct>
    </config>

    <handler id="jdisc-handler">
      <binding>http://*:*/HelloWorld</binding>
      <binding>http://*:*/Status</binding>
      <component id="injected-to-handler">
        <config name="foo"/>
      </component>
    </handler>

    <server id="server-provider">

    </server>

    <nodes jvm-options="-XX:+PrintGCDetails -XX:+PrintGCTimeStamps">
      <environment-variables>
        <TEST_VAR>7</TEST_VAR>
      </environment-variables>
      <node hostalias="host1" />
    </nodes>

    <clients>
      <client id="client1" permissions="read,write">
        <certificate file="security/file.pem" />
      </client>
      <client id="client2" permissions="write">
        <certificate file="security/file1.pem" />
        <certificate file="security/file2.pem" />
      </client>
      <client id="client3" permissions="read">
        <token id="my-token-1" />
        <token id="my-token-2" />
      </client>
      <client id="client4" permissions="write">
        <token id="my-token-3" />
      </client>
    </clients>

    <document-processing>
      <chain id="common">
        <documentprocessor id="CommonDocproc" class="com.yahoo.vespatest.ExtraHitDocumentProcessor">
          <config name="com.yahoo.vespatest.extra-hit">
            <exampleString>A docproc for all clusters</exampleString>
          </config>
        </documentprocessor>
      </chain>
      <chain id="cluster1">
        <documentprocessor id="Cluster1Docproc" class="com.yahoo.vespatest.ExtraHitDocumentProcessor">
          <config name="com.yahoo.vespatest.extra-hit">
            <exampleString>Docproc only for cluster1</exampleString>
          </config>
        </documentprocessor>
      </chain>
    </document-processing>

  </container>

  <container id='qrsCluster_2' version='1.0'>
    <secret-store type="cloud">
      <store id="foo">
        <aws-parameter-store account="foo" aws-region="us-east-1"/>
      </store>
    </secret-store>
    <search>
      <threadpool>
        <threads boost="32.0">8.0</threads>
        <queue>40.0</queue>
      </threadpool>
    </search>
  </container>
</services>