-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkubernetes.yml
246 lines (217 loc) · 4.83 KB
/
kubernetes.yml
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
- name: Prepare for PostgreSQL
hosts: dbms
become: true
roles:
- role: postgresql
- role: postgresql_access
tags:
- install-postgres
- databases
- name: initialize dbs
hosts: dbms
become: false
connection: local
roles:
- role: postgresql_init
tags:
- setup-databases
- databases
# so they can register through the load-balancer, otherwise
# they won't be able to use it.
- name: set the HAProxy load balancer
hosts: k8s_api_proxy
become: true
roles:
- role: haproxy
- role: k8s_haproxy
tags:
- haproxy
- name: set up timezone settings.
hosts: k8s_de_workers
become: true
gather_facts: true
roles:
- role: timezone
tags:
- timezone
- prep-nodes
- name: prepare the nodes
hosts: k8s_nodes
become: true
roles:
- role: k8s_nodes
tags:
- prep-nodes
- name: set up firewall
hosts: k8s_nodes
become: true
roles:
- role: k8s_firewalld
tags:
- prep-nodes
- firewall
# Add a playbook/role to call 'k0sctl apply --config <path>'
- hosts: k8s_controllers[0]
connection: local
gather_facts: false
become: false
roles:
- role: k8s_cluster
tags: create-cluster
- role: k8s_de_reqs
tags: de-reqs
- role: service_configurations
tags: configure-services
- role: secret_loader
tags:
- configure-services
- secrets
- role: kubernetes_ingresses
tags: ingresses
- role: kubernetes_networking
tags:
- networking
- nodeports
- role: cert-manager
tags: cert-manager
- role: nats
tags: nats
- role: kubernetes_node_feature_discovery
tags: feature-discovery
- role: grouper_init
tags: grouper
- role: image_cache
tags: image-cache
- name: create the irods-csi-driver plugin directory
hosts: k8s_workers
become: true
gather_facts: false
tasks:
- name: create the plugin directory
ansible.builtin.file:
state: directory
path: /var/lib/k0s/kubelet/plugins/irods.csi.cyverse.org/
recurse: true
tags:
- irods-csi-driver
- name: create the irods-csi-driver plugins_registry directory
hosts: k8s_workers
become: true
gather_facts: false
tasks:
- name: create the plugin directory
ansible.builtin.file:
state: directory
path: /var/lib/k0s/kubelet/plugins_registry/
recurse: true
tags:
- irods-csi-driver
- name: set up irods-csi-driver
hosts: k8s_controllers[0]
connection: local
become: false
roles:
- role: kubernetes_irods_csi_driver
tags:
- irods-csi-driver
- hosts: k8s_controllers[0]
connection: local
gather_facts: false
become: false
tags:
- deploy-single-service
- deploy-all-services
tasks:
- ansible.builtin.include_role:
name: services
tasks_from: main
vars:
project_name: "{{ project }}"
tags:
- deploy
when: "'deploy-single-service' in ansible_run_tags"
- ansible.builtin.include_role:
name: services
tasks_from: main
vars:
project_name: "{{ item }}"
tags:
- deploy
when: "not 'deploy-single-service' in ansible_run_tags"
with_items:
- analyses
- app-exposer
- apply-labels
- apps
- async-tasks
- bulk-typer
- check-resource-access
- clockwork
- data-info
- de-mailer
- de-webhooks
- dewey
- discoenv-analyses
- discoenv-users
- email-requests
- event-recorder
- get-analysis-id
- info-typer
- infosquito2
- iplant-groups
- jex-adapter
- job-status-listener
- job-status-recorder
- job-status-to-apps-adapter
- kifshare
- metadata
- notifications
- permissions
- qms
- qms-adapter
- requests
- resource-usage-api
- data-usage-api
- subscriptions
- timelord
- user-info
- vice-default-backend
- vice-status-listener
- search
- dashboard-aggregator
- terrain
- sonora
- name: set up UI haproxy
become: true
hosts: de_haproxy
roles:
- role: ui_haproxy
tags:
- haproxy
- ui-haproxy
- name: set up cronjobs
become: false
gather_facts: false
hosts: k8s_controllers[0]
connection: local
roles:
- role: cronjobs
tags: cronjobs
- role: kubernetes_longhorn
tags:
- longhorn
- argo
- role: keycloak_install
tags: keycloak
when: "'keycloak' in ansible_run_tags"
- role: harbor
tags: harbor
when: "'harbor' in ansible_run_tags"
- role: jaeger
tags: jaeger
when: "'jaeger' in ansible_run_tags"
- role: argo
tags: argo
- role: argo_resources
tags: argo-resources