-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitedata.j2
162 lines (149 loc) · 8.95 KB
/
sitedata.j2
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
# -*- coding: utf-8 -*-
# vim: ft=jinja2
##################
## APACHE AIRFLOW
##################
{% set localhost = salt['cmd.run']('hostname -s') or 'localhost' or 'ubuntu1804' %}
{% set domain = salt['cmd.run']('hostname -d').split('.')[0]|lower|replace('none','localdomain') %}
{% set domain = 'localdomain' if domain == '' else domain %}
{% set webserversecret = '123456789101112131415' %}
#####################
## SITEDATA CHANGEME
#####################
{% set airflow_version = '2.1.2' %} {# changeme in dev/test/controller02 first #}
{% set create_user_group = true %} {# changeme: true=posix, false=ldap #}
{% set selinux = false %} {# changeme #}
{% set firewall = true %} {# changeme #}
{% set primaryhost = localhost %} {# changeme if multinode #}
{% set loadbalancer = primaryhost %} {# changeme if available #}
{% set primarydomain = domain %} {# changeme if multinode #}
{% set secondaryhost = 'controller02' %} {# changeme if multinode #}
#####################
### SITEDATA DOMAINS
#####################
{% set domains = ['localdomain', 'main', 'apples', 'oranges', 'applestest'] %}
{% set domains = domains + ['orangestest', 'applesdev', 'orangesdev', 'edge', 'fog'] %}
{# every member of "domains" list above must have corresponding defintion below, #}
{# to prevent 'TypeError: argument of type 'StrictUndefined' is not iterable' #}
{% set localdomain = {} %}
{% do localdomain.update({ 'fqdn': '',
'auth_type': 'AUTH_DB',
'user': 'airflow',
'group': 'airflow',
'name': 'localdomain',
'queues': [domain, localhost|string,],
'workers': {localhost|string: '127.0.0.1',},
'firezone': 'public',
'ldapserver': '',
'database': '',
'ldapfilter': '',
'ldapbase': ''}) %}
{% set main = {} %}
{% do main.update({ 'fqdn': 'MAIN.NET',
'auth_type': 'AUTH_LDAP',
'user': '[email protected]',
'group': '[email protected]',
'name': 'main',
'queues': ['main', 'main-controller01', 'main-controller02',],
'workers': {'main-controller01': '10.0.1.1', 'main-controller02': '10.0.1.2'},
'firezone': 'public',
'ldapserver': 'controller-dc1.MAIN.NET',
'database': 'airflow:airflow@controller01/airflow',
'ldapfilter': '(&(objectClass=user)(sAMAccountName=*)(|(memberOf=CN=grpRole_dataeng,OU=ouEngineers,DC=MAIN,DC=NET)(memberOf=CN=grpRole_devops,OU=ouEngineers,DC=MAIN,DC=NET))',
'ldapbase': 'OU=ouEngineers,DC=MAIN,DC=NET'}) %}
{% set apples = {} %}
{% do apples.update({ 'fqdn': 'APPLES.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'apples',
'queues': ['apples', 'apples-worker01', 'apples-worker02',],
'workers': {'apples-worker01': '10.0.2.1', 'apples-worker02': '10.0.2.2'},
'firezone': 'public',
'ldapserver': 'apples-dc1.apples.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=APPLES,DC=NET'}) %}
{% set oranges = {} %}
{% do oranges.update({ 'fqdn': 'ORANGES.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'oranges',
'queues': ['oranges', 'oranges-worker01', 'oranges-worker02',],
'workers': {'oranges-worker01': '10.0.3.1', 'oranges-worker02': '10.0.3.2'},
'firezone': 'public',
'ldapserver': 'oranges-dc1.oranges.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=ORANGES,DC=NET'}) %}
{% set applestest = {} %}
{% do applestest.update({ 'fqdn': 'APPLESTEST.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'applestest',
'queues': ['applestest', 'applestest-worker01', 'applestest-worker02',],
'workers': {'applestest-worker01': '10.0.4.1', 'applestest-worker02': '10.0.4.2'},
'firezone': 'public',
'ldapserver': 'apples-dc1.applestest.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=APPLESTEST,DC=NET'}) %}
{% set orangestest = {} %}
{% do orangestest.update({ 'fqdn': 'ORANGESTEST.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'orangestest',
'queues': ['orangestest', 'orangestest-worker01', 'orangestest-worker02',],
'workers': {'orangestest-worker01': '10.0.5.1', 'orangestest-worker02': '10.0.5.2'},
'firezone': 'public',
'ldapserver': 'oranges-dc1.orangestest.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=ORANGESTEST,DC=NET'}) %}
{% set applesdev = {} %}
{% do applesdev.update({ 'fqdn': 'APPLESDEV.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'applesdev',
'queues': ['applesdev', 'applesdev-worker01', 'applesdev-worker02',],
'workers': {'applesdev-worker01': '10.0.6.1', 'applesdev-worker02': '10.0.6.2'},
'firezone': 'public',
'ldapserver': 'apples-dc1.applesdev.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=APPLESDEV,DC=NET'}) %}
{% set orangesdev = {} %}
{% do orangesdev.update({ 'fqdn': 'ORANGESDEV.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'orangesdev',
'queues': ['orangesdev', 'orangesdev-worker01', 'orangesdev-worker02',],
'workers': {'orangesdev-worker01': '10.0.7.1', 'orangesdev-worker02': '10.0.7.2'},
'firezone': 'public',
'ldapserver': 'oranges-dc1.orangesdev.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=ORANGESDEV,DC=NET'}) %}
{% set edge = {} %}
{% do edge.update({ 'fqdn': 'EDGE.NET',
'user': '[email protected]',
'group': '[email protected]',
'name': 'edge',
'queues': ['edge', 'edge-worker01', 'edge-worker02',],
'workers': {'edge-worker01': '10.0.8.1', 'edge-worker02': '10.0.8.2'},
'firezone': 'public',
'ldapserver': 'edge-dc1.edge.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=EDGE,DC=NET'}) %}
{% set fog = {} %}
{% do fog.update({ 'fqdn': 'FOG.NET',
'user': 'airflowservice',
'group': '[email protected]',
'name': 'fog',
'queues': ['fog', 'fog-worker01', 'fog-worker02',],
'workers': {'fog-worker01': '10.0.9.1', 'fog-worker02': '10.0.9.2'},
'firezone': 'public',
'ldapserver': 'fog-dc1.fog.net',
'ldapfilter': '',
'database': 'airflow:airflow@controller01/airflow',
'ldapbase': 'OU=ouEngineers,DC=FOG,DC=NET'}) %}