forked from molinfo-vienna/nerdd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTiltfile
More file actions
106 lines (89 loc) · 2.69 KB
/
Copy pathTiltfile
File metadata and controls
106 lines (89 loc) · 2.69 KB
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
load('ext://namespace', 'namespace_create')
load('ext://git_resource', 'git_checkout')
#
# Define configuration options that can be set via command line when running `tilt up`, e.g.
# `tilt up -- --scrub-secrets=true --message-broker=kafka`
#
# message broker
DEFAULT_MESSAGE_BROKER = 'kafka'
config.define_string("message_broker")
# scrub secrets (replace secrets with [redacted] in Tilt UI)
DEFAULT_SCRUB_SECRETS = True
config.define_bool("scrub_secrets")
# number of parallel workflows to run when executing `tilt up`
DEFAULT_PARALLEL_UPDATES = 3
config.define_string("parallel_updates")
# load config provided by the user via command line
cfg = config.parse()
cfg['message_broker'] = cfg.get('message_broker', DEFAULT_MESSAGE_BROKER)
cfg['scrub_secrets'] = cfg.get('scrub_secrets', DEFAULT_SCRUB_SECRETS)
cfg['parallel_updates'] = int(cfg.get('parallel_updates', DEFAULT_PARALLEL_UPDATES))
# apply secret scrubbing settings
secret_settings(disable_scrub=not cfg['scrub_secrets'])
# limit the number of parallel updates
update_settings(max_parallel_updates=cfg['parallel_updates'])
#
# Define apps to be loaded
#
# essential repositories used by many apps
base_repositories = [
'nerdd-module',
'nerdd-link',
]
# use comments to select services in order to improve speed
apps = [
# openly accessible:
'cypstrate',
# 'cyplebrity',
# 'hitdexter',
# 'np-scout',
# 'skin-doctor-cp',
# 'skin-doctor-ternary',
# 'trialblazer',
# github permissions are necessary for these modules:
# 'awesom',
# 'fame',
# 'fame3r',
# 'glory',
# 'gloryx',
# essential:
'authelia',
'storage',
's3',
'external-secrets',
'gateway-api',
'cert-manager',
# 'haproxy-controller',
'nginx-gateway',
'keda',
'rethinkdb',
'minio-operator',
'nerdd-init-system',
'nerdd-backend',
'nerdd-frontend',
'nerdd-process-jobs',
'nerdd-serialize-jobs',
# optional for monitoring:
'argocd',
'routeboard',
]
message_broker = cfg['message_broker']
if message_broker == "kafka":
apps += ['strimzi', 'kafka', 'kafka-ui']
elif message_broker == "rabbitmq":
apps += ['rabbitmq-system', 'rabbitmq']
# check out base repositories
for repo in base_repositories:
git_checkout(
'https://github.com/molinfo-vienna/{}'.format(repo),
checkout_dir='./repos/{}'.format(repo),
unsafe_mode=True,
)
# create a namespace for apps
namespace_create('local')
k8s_resource(objects=['local'], labels=['infra'], new_name='namespace')
# load Tiltfiles of all specified apps
for app in apps:
path_app_tiltfile = './apps/{}/Tiltfile'.format(app)
if os.path.exists(path_app_tiltfile):
include(path_app_tiltfile)