Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 1 | {{- /* |
| 2 | Copyright 2017-present Open Networking Foundation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ -}} |
| 16 | |
| 17 | {{- define "xos-core.config" }} |
| 18 | name: xos-core |
| 19 | xos_dir: /opt/xos |
Matteo Scandolo | 46bcfd3 | 2018-12-17 10:51:38 -0800 | [diff] [blame] | 20 | kafka_bootstrap_servers: |
| 21 | - {{ .Values.platformKafka }} |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 22 | database: |
| 23 | name: {{ .Values.xosDBName | quote }} |
| 24 | username: {{ .Values.xosDBUser | quote }} |
| 25 | password: {{ .Values.xosDBPassword | quote }} |
| 26 | logging: |
| 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 Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 36 | kafka: |
Zack Williams | 7659cc9 | 2018-11-01 07:51:12 -0700 | [diff] [blame] | 37 | class: kafkaloghandler.KafkaLogHandler |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 38 | bootstrap_servers: |
Matteo Scandolo | 46bcfd3 | 2018-12-17 10:51:38 -0800 | [diff] [blame] | 39 | - {{ .Values.platformKafka }} |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 40 | topic: xos.log.core |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 41 | loggers: |
Zack Williams | 7659cc9 | 2018-11-01 07:51:12 -0700 | [diff] [blame] | 42 | '': |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 43 | handlers: |
| 44 | - console |
| 45 | - file |
Zack Williams | 1125598 | 2018-08-27 14:22:55 -0700 | [diff] [blame] | 46 | - kafka |
Zack Williams | 8999882 | 2018-11-19 14:54:13 -0700 | [diff] [blame] | 47 | level: {{ .Values.loglevel }} |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 48 | {{- 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 Williams | 4da1d15 | 2018-12-14 11:40:36 -0700 | [diff] [blame] | 74 | {{ (.Files.Get "pki/xos-CA.pem")}} |
Zack Williams | 3432b94 | 2018-04-24 17:46:41 -0700 | [diff] [blame] | 75 | {{- end }} |
| 76 | |