-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend.yaml
372 lines (330 loc) · 17.1 KB
/
backend.yaml
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
apiVersion: v1
kind: ConfigMap
metadata:
name: backend
namespace: eucaim
data:
# proxy_set_header X-Forwarded-Port $server_port;
# proxy_set_header X-Forwarded-Host $server_name;
# proxy_pass http://molgenis.eucaim.svc.cluster.local:8080;
backend.conf: |-
location / {
resolver kube-dns.kube-system.svc.cluster.local;
#proxy_pass https://eucaim.cancerimage.eu/molgenis/molgenis;
#proxy_pass http://molgenis.ramses.i3m.upv.es;
proxy_pass http://molgenis:8080;
client_max_body_size 500M;
proxy_read_timeout 600s;
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginxconf
namespace: eucaim
data:
nginx.conf: |-
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
client_max_body_size 500M;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tomcat-webxml
namespace: eucaim
data:
web.xml: |-
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0"
metadata-complete="true">
<multipart-config>
<!-- 50MB max -->
<max-file-size>104857600</max-file-size>
<max-request-size>209715200</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
<display-name>Tomcat Documentation</display-name>
<description>
Tomcat Documentation.
</description>
</web-app>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tomcat-serverxml
namespace: eucaim
data:
server.xml: |-
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
maxSwallowSize="${TOMCAT_MAX_SWALLOWSIZE:-536870912}"
URIEncoding="UTF-8"
compression="on"
maxPostSize="209715200"
compressableMimeType="text/html,application/javascript,application/json" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
</Connector>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation. The default
SSLImplementation will depend on the presence of the APR/native
library and the useOpenSSL attribute of the
AprLifecycleListener.
Either JSSE or OpenSSL style configuration may be used regardless of
the SSLImplementation selected. JSSE style configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation which always uses
OpenSSL for TLS.
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
configuration is used below.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- <Context path=\"/molgenis\" docBase=\"ROOT\"/> -->
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ltsconf
namespace: eucaim
data:
lts.conf: |-
#
# LTS - Long time support
#
# These versions are exact and not dynamic
#
# This rewrites the incoming request uri to a specific version of the application
# So incoming is for example: /@molgenis-ui/security/dist/js/app.js
# This is changed to /@molgenis-ui/[email protected]/dist/js/app.js
#
# rewrite ^/(.*)/app-manager/(.*)$ /$1/app-manager@~1.1/$2 break;
# rewrite ^/(.*)/legacy-lib/(.*)$ /$1/legacy-lib@~1.1/$2 break;
# rewrite ^/(.*)/core-ui/(.*)$ /$1/core-ui@~0.5/$2 break;
# rewrite ^/(.*)/metadata-manager/(.*)$ /$1/metadata-manager@~0.2/$2 break;
# rewrite ^/(.*)/one-click-importer/(.*)$ /$1/one-click-importer@~0.1/$2 break;
# rewrite ^/(.*)/questionnaires/(.*)$ /$1/questionnaires@~3.4/$2 break;
# rewrite ^/(.*)/scripts/(.*)$ /$1/scripts@~3.4/$2 break;
# rewrite ^/(.*)/searchall/(.*)$ /$1/searchall@~0.1/$2 break;
# rewrite ^/(.*)/security/(.*)$ /$1/security@~0.5/$2 break;
# rewrite ^/(.*)/settings/(.*)$ /$1/settings@~4.4/$2 break;
# rewrite ^/(.*)/data-explorer/(.*)$ /$1/data-explorer@~3.13/$2 break;
# rewrite ^/(.*)/molgenis-theme/(.*)$ /$1/molgenis-theme@latest/$2 break;
# rewrite ^/(.*)/data-row-edit/(.*)$ /$1/data-row-edit@~5.6/$2 break;
# rewrite ^/(.*)/data-row-permissions/(.*)$ /$1/data-row-permissions@~0.3/$2 break;
# rewrite ^/(.*)/navigator/(.*)$ /$1/navigator@~0.3/$2 break; # Deprecated
location /@molgenis-ui/ {
#rewrite ^/(.*)/app-manager/(.*)$ /$1/molgenis-ui/app-manager/$2 break;
#rewrite ^/(.*)/core-ui/(.*)$ /$1/molgenis-ui/core-ui/$2 break;
#rewrite ^/(.*)/legacy-lib/(.*)$ /$1/molgenis-ui/legacy-lib/$2 break;
#rewrite ^/(.*)/metadata-manager/(.*)$ /$1/molgenis-ui/metadata-manager/$2 break;
#rewrite ^/(.*)/one-click-importer/(.*)$ /$1/molgenis-ui/one-click-importer/$2 break;
#rewrite ^/(.*)/questionnaires/(.*)$ /$1/molgenis-ui/questionnaires/$2 break;
#rewrite ^/(.*)/scripts/(.*)$ /$1/molgenis-ui/scripts/$2 break;
#rewrite ^/(.*)/searchall/(.*)$ /$1/molgenis-ui/searchall/$2 break;
#rewrite ^/(.*)/security/(.*)$ /$1/molgenis-ui/security/$2 break;
#rewrite ^/(.*)/settings/(.*)$ /$1/molgenis-ui/settings/$2 break;
#rewrite ^/(.*)/data-explorer/(.*)$ /$1/molgenis-ui/data-explorer/$2 break;
#rewrite ^/(.*)/molgenis-theme/(.*)$ /$1/molgenis-ui/molgenis-theme/$2 break;
#rewrite ^/(.*)/data-row-edit/(.*)$ /$1/molgenis-ui/data-row-edit/$2 break;
#rewrite ^/(.*)/data-row-permissions/(.*)$ /$1/molgenis-ui/data-row-permissions/$2 break;
#rewrite ^/(.*)/navigator/(.*)$ /$1/molgenis-ui/navigator/$2 break; # Deprecated
rewrite ^/(.*)/app-manager/(.*)$ /html/molgenis-ui/app-manager/$2 break;
rewrite ^/(.*)/core-ui/(.*)$ /html/molgenis-ui/core-ui/$2 break;
rewrite ^/(.*)/legacy-lib/(.*)$ /html/molgenis-ui/legacy-lib/$2 break;
rewrite ^/(.*)/metadata-manager/(.*)$ /html/molgenis-ui/metadata-manager/$2 break;
rewrite ^/(.*)/one-click-importer/(.*)$ /html/molgenis-ui/one-click-importer/$2 break;
rewrite ^/(.*)/questionnaires/(.*)$ /html/molgenis-ui/questionnaires/$2 break;
rewrite ^/(.*)/scripts/(.*)$ /html/molgenis-ui/scripts/$2 break;
rewrite ^/(.*)/searchall/(.*)$ /html/molgenis-ui/searchall/$2 break;
rewrite ^/(.*)/security/(.*)$ /html/molgenis-ui/security/$2 break;
rewrite ^/(.*)/settings/(.*)$ /html/molgenis-ui/settings/$2 break;
rewrite ^/(.*)/data-explorer/(.*)$ /html/molgenis-ui/data-explorer/$2 break;
rewrite ^/(.*)/molgenis-theme/(.*)$ /html/molgenis-ui/molgenis-theme/$2 break;
rewrite ^/(.*)/data-row-edit/(.*)$ /html/molgenis-ui/data-row-edit/$2 break;
rewrite ^/(.*)/data-row-permissions/(.*)$ /html/molgenis-ui/data-row-permissions/$2 break;
rewrite ^/(.*)/navigator/(.*)$ /html/molgenis-ui/navigator/$2 break; # Deprecated
root /usr/share/nginx/;
# proxy_pass https://unpkg.com/@molgenis-ui/;
proxy_ssl_server_name on;
proxy_intercept_errors on;
recursive_error_pages on;
error_page 301 302 307 = @handle_redirect;
# do not cache these lts rewrites too long
expires 10m;
}
location /@molgenis/ {
rewrite ^/(.*)/expressions(/(.*))?$ https://unpkg.com/@molgenis/expressions@~0.21$2 redirect;
rewrite ^/(.*)/molgenis-ui-form(/(.*))?$ /$1/molgenis/molgenis-ui-form/dist/static redirect;
# do not cache these redirects too long
expires 10m;
}
#rewrite ^/(.*)/molgenis-ui-form(/(.*))?$ https://eucaim.ramses.i3m.upv.es/molgenis-ui/molgenis-ui-form redirect;
#rewrite ^/(.*)/molgenis-ui-form(/(.*))?$ https://unpkg.com/@molgenis/molgenis-ui-form@~5.9$2 redirect;