2 # Copyright © 2019 Bell Canada
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 name: {{ include "common.fullname" . }}-init-mgnt
21 namespace: {{ include "common.namespace" . }}
26 awx-manage migrate --noinput
27 if [[ `echo 'from django.contrib.auth.models import User; nsu = User.objects.filter(is_superuser=True).count(); exit(0 if nsu > 0 else 1)' | awx-manage shell` > 0 ]]
29 echo 'from django.contrib.auth.models import User; User.objects.create_superuser('{{ .Values.config.awxAdminUser }}', '{{ .Values.config.awxAdminEmail }}', '{{ .Values.config.awxAdminPassword }}')' | awx-manage shell
30 awx-manage update_password --username='{{ .Values.config.awxAdminUser }}' --password='{{ .Values.config.awxAdminPassword }}'
36 name: {{ include "common.fullname" . }}-settings
37 namespace: {{ include "common.namespace" . }}
44 AWX_PROOT_ENABLED = True
46 # Automatically deprovision pods that go offline
47 AWX_AUTO_DEPROVISION_INSTANCES = True
49 SYSTEM_TASK_ABS_CPU = 6
50 SYSTEM_TASK_ABS_MEM = 20
52 INSIGHTS_URL_BASE = "https://example.org"
54 #Autoprovisioning should replace this
55 CLUSTER_HOST_ID = socket.gethostname()
56 SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
58 SESSION_COOKIE_SECURE = False
59 CSRF_COOKIE_SECURE = False
61 REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR']
63 STATIC_ROOT = '/var/lib/awx/public/static'
64 PROJECTS_ROOT = '/var/lib/awx/projects'
65 JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
66 SECRET_KEY = open('/etc/tower/SECRET_KEY', 'rb').read().strip()
68 INTERNAL_API_URL = 'http://127.0.0.1:8052'
69 SERVER_EMAIL = 'root@localhost'
70 DEFAULT_FROM_EMAIL = 'webmaster@localhost'
71 EMAIL_SUBJECT_PREFIX = '[AWX] '
72 EMAIL_HOST = 'localhost'
75 EMAIL_HOST_PASSWORD = ''
78 LOGGING['handlers']['console'] = {
79 '()': 'logging.StreamHandler',
81 'formatter': 'simple',
84 LOGGING['loggers']['django.request']['handlers'] = ['console']
85 LOGGING['loggers']['rest_framework.request']['handlers'] = ['console']
86 LOGGING['loggers']['awx']['handlers'] = ['console']
87 LOGGING['loggers']['awx.main.commands.run_callback_receiver']['handlers'] = ['console']
88 LOGGING['loggers']['awx.main.commands.inventory_import']['handlers'] = ['console']
89 LOGGING['loggers']['awx.main.tasks']['handlers'] = ['console']
90 LOGGING['loggers']['awx.main.scheduler']['handlers'] = ['console']
91 LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console']
92 LOGGING['loggers']['social']['handlers'] = ['console']
93 LOGGING['loggers']['system_tracking_migrations']['handlers'] = ['console']
94 LOGGING['loggers']['rbac_migrations']['handlers'] = ['console']
95 LOGGING['loggers']['awx.isolated.manager.playbooks']['handlers'] = ['console']
96 LOGGING['handlers']['callback_receiver'] = {'class': 'logging.NullHandler'}
97 LOGGING['handlers']['task_system'] = {'class': 'logging.NullHandler'}
98 LOGGING['handlers']['tower_warnings'] = {'class': 'logging.NullHandler'}
99 LOGGING['handlers']['rbac_migrations'] = {'class': 'logging.NullHandler'}
100 LOGGING['handlers']['system_tracking_migrations'] = {'class': 'logging.NullHandler'}
101 LOGGING['handlers']['management_playbooks'] = {'class': 'logging.NullHandler'}
105 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
106 'LOCATION': '{}:{}'.format("localhost", "11211")
109 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
113 USE_X_FORWARDED_PORT = True
118 name: {{ include "common.fullname" . }}-rabbitmq
119 namespace: {{ include "common.namespace" . }}
122 [rabbitmq_management,rabbitmq_peer_discovery_k8s].
125 management.load_definitions = /etc/rabbitmq/rabbitmq_definitions.json
126 cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
127 cluster_formation.k8s.host = kubernetes.default.svc
128 cluster_formation.k8s.address_type = ip
129 cluster_formation.node_cleanup.interval = 10
130 cluster_formation.node_cleanup.only_log_warning = false
131 cluster_partition_handling = autoheal
132 ## queue master locator
133 queue_master_locator=min-masters
135 loopback_users.guest = false
136 rabbitmq_definitions.json: |
138 "users":[{"name": "{{ .Values.config.rabbitmqUser }}", "password": "{{ .Values.config.rabbitmqPassword }}", "tags": ""}],
140 {"user":"{{ .Values.config.rabbitmqUser }}","vhost":"{{ .Values.config.rabbitmqVhost }}","configure":".*","write":".*","read":".*"}
142 "vhosts":[{"name":"{{ .Values.config.rabbitmqVhost }}"}],
144 {"vhost":"{{ .Values.config.rabbitmqVhost }}","name":"ha-all","pattern":".*","definition":{"ha-mode":"all","ha-sync-mode":"automatic"}}