blob: fe59e601460e9e37095eb3a515294ef5dd916055 [file] [log] [blame]
Zack Williams3432b942018-04-24 17:46:41 -07001{{- /*
2Copyright 2017-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/ -}}
16
17{{- define "xos-core.config" }}
18name: xos-core
19xos_dir: /opt/xos
Matteo Scandolo46bcfd32018-12-17 10:51:38 -080020kafka_bootstrap_servers:
21 - {{ .Values.platformKafka }}
Zack Williams3432b942018-04-24 17:46:41 -070022database:
23 name: {{ .Values.xosDBName | quote }}
24 username: {{ .Values.xosDBUser | quote }}
25 password: {{ .Values.xosDBPassword | quote }}
26logging:
27 version: 1
28 handlers:
29 console:
30 class: logging.StreamHandler
31 file:
32 class: logging.handlers.RotatingFileHandler
33 filename: /var/log/xos.log
34 maxBytes: 10485760
35 backupCount: 5
Zack Williams11255982018-08-27 14:22:55 -070036 kafka:
Zack Williams7659cc92018-11-01 07:51:12 -070037 class: kafkaloghandler.KafkaLogHandler
Zack Williams11255982018-08-27 14:22:55 -070038 bootstrap_servers:
Matteo Scandolo46bcfd32018-12-17 10:51:38 -080039 - {{ .Values.platformKafka }}
Zack Williams11255982018-08-27 14:22:55 -070040 topic: xos.log.core
Zack Williams3432b942018-04-24 17:46:41 -070041 loggers:
Zack Williams7659cc92018-11-01 07:51:12 -070042 '':
Zack Williams3432b942018-04-24 17:46:41 -070043 handlers:
44 - console
45 - file
Zack Williams11255982018-08-27 14:22:55 -070046 - kafka
Zack Williams89998822018-11-19 14:54:13 -070047 level: {{ .Values.loglevel }}
Zack Williams3432b942018-04-24 17:46:41 -070048{{- end }}
49
50{{- define "xos-core.initial_data" }}
51- model: core.Site
52 fields:
53 name: {{ .Values.cordSiteName | quote }}
54 abbreviated_name: {{ .Values.cordSiteName | quote }}
55 login_base: {{ .Values.cordSiteName | quote }}
56 site_url: "http://opencord.org/"
57 hosts_nodes: true
58
59- model: core.User
60 fields:
61 email: {{ .Values.xosAdminUser | quote }}
62 password: {{ .Values.xosAdminPassword | quote }}
63 firstname: {{ .Values.xosAdminFirstname | quote }}
64 lastname: {{ .Values.xosAdminLastname | quote }}
65 is_admin: true
66 relations:
67 site:
68 fields:
69 name: {{ .Values.cordSiteName | quote }}
70 model: core.Site
71{{- end }}
72
73{{- define "xos-core.ca_cert_chain" }}
Zack Williams4da1d152018-12-14 11:40:36 -070074{{ (.Files.Get "pki/xos-CA.pem")}}
Zack Williams3432b942018-04-24 17:46:41 -070075{{- end }}
76