-
Notifications
You must be signed in to change notification settings - Fork 4
/
sample.yaml
297 lines (285 loc) · 7.13 KB
/
sample.yaml
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
---
deployment_id: quantum
owner: fabio
state: present
regions:
defaults: ®ions
user: ubuntu
public_ip: yes
public_key_id: workshop
tags:
owner: "{{ owner }}"
deployment_id: "{{ deployment_id }}"
aws:
defaults: &aws
<<: *regions
cloud: aws
us_west_2:
defaults: &aws_us_west_2
<<: *aws
region: us-west-2
vpc_id: vpc-0a0.....
security_group: sg-084d....
image: ami-0ebef2838fb2605b7
a: &aws_us_west_1a
<<: *aws_us_west_2
zone: a
subnet: subnet-072....
b: &aws_us_west_1b
<<: *aws_us_west_2
zone: b
subnet: subnet-0cd...
c: &aws_us_west_1c
<<: *aws_us_west_2
zone: c
subnet: subnet-0cd...
gcp:
defaults: &gcp
<<: *regions
cloud: gcp
image: projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts
security_group:
- cockroachdb
us_east4:
defaults: &gcp_us_east4
<<: *gcp
region: us-east4
vpc_id: default
a: &gcp_us_east4_a
<<: *gcp_us_east4
zone: a
subnet: default
b: &gcp_us_east4_b
<<: *gcp_us_east4
zone: b
subnet: default
c: &gcp_us_east4_c
<<: *gcp_us_east4
zone: c
subnet: default
us_central1:
defaults: &gcp_us_central1
<<: *gcp
region: us-central1
vpc_id: default
a: &gcp_us_central1_a
<<: *gcp_us_central1
zone: a
subnet: default
b: &gcp_us_central1_b
<<: *gcp_us_central1
zone: b
subnet: default
c: &gcp_us_central1_c
<<: *gcp_us_central1
zone: c
subnet: default
f: &gcp_us_central1_f
<<: *gcp_us_central1
zone: f
subnet: default
europe_west2:
defaults: &gcp_europe_west2
<<: *gcp
region: europe-west2
vpc_id: default
a: &gcp_europe_west2_a
<<: *gcp_europe_west2
zone: a
subnet: default
b: &gcp_europe_west2_b
<<: *gcp_europe_west2
zone: b
subnet: default
c: &gcp_europe_west2_c
<<: *gcp_europe_west2
zone: c
subnet: default
azure:
defaults: &azure
<<: *regions
cloud: azure
westeurope:
defaults: &azure_westeurope
<<: *azure
region: westeurope
vpc_id: fabio-vnet
security_group: fabio-nsg
image: a
a: &azure_westeurope_a
<<: *azure_westeurope
zone: a
subnet: subnet-a
b: &azure_westeurope_b
<<: *azure_westeurope
zone: b
subnet: subnet-b
c: &azure_westeurope_c
<<: *azure_westeurope
zone: c
subnet: subnet-c
##################
# INFRASTRUCTURE #
##################
# VM INSTANCES
deployment:
- cluster_name: demo
# group_name: krb5_server
# copies: 1
groups:
- <<: *gcp_us_central1_c
inventory_groups:
- krb5_server
exact_count: 0
instance:
cpu: 2
mem: 4
volumes:
os:
size: 10
type: standard_ssd
data: []
tags:
Name: "{{ deployment_id }}-kdc"
- cluster_name: demo
# group_name: krb5_client
# copies: 1
inventory_groups:
- app
- krb5_client
exact_count: 0
instance:
cpu: 2
mem: 4
volumes:
os:
size: 10
type: standard_ssd
data: []
tags:
Name: "{{ deployment_id }}-app"
groups:
- <<: *gcp_us_east4_a
- <<: *aws_us_west_2a
# - <<: *gcp_europe_west2_a
- <<: *azure_westeurope_default
- cluster_name: demo
# group_name: ha_proxy
# copies: 1
inventory_groups:
- haproxy
exact_count: 0
instance:
cpu: 2
mem: 4
volumes:
os:
size: 10
type: standard_ssd
data: []
tags:
Name: "{{ deployment_id }}-haproxy"
groups:
- <<: *gcp_us_east4_a
- <<: *aws_us_west_2a
# - <<: *gcp_europe_west2_a
- <<: *azure_westeurope_default
- cluster_name: demo
inventory_groups:
- cockroachdb
exact_count: 1
instance:
cpu: 2
mem: 4
volumes:
os:
size: 10
type: standard_ssd
data:
- size: 100
type: local_ssd
delete_on_termination: true
tags:
Name: "{{ deployment_id }}-cockroach"
groups:
- <<: *gcp_us_east4_a
- <<: *gcp_us_east4_b
- <<: *gcp_us_east4_c
- <<: *aws_us_west_2a
- <<: *aws_us_west_2b
- <<: *aws_us_west_2c
# - <<: *gcp_europe_west2_a
# - <<: *gcp_europe_west2_b
# - <<: *gcp_europe_west2_c
- <<: *azure_westeurope_default
- <<: *azure_westeurope_default
- <<: *azure_westeurope_default
############
# PLATFORM #
############
# OPENSSL CERTIFICATES
certificates_organization_name: fabio-org
certificates_dir: &certs
certs
certificates_usernames: &crdb_client_certs
- root
- app
certificates_hosts: "{{ groups['cockroachdb'] }}"
certificates_loadbalancer: "{{ groups['haproxy'] }}"
# MIT KDC
krb5_realm: FABIO.LOCAL
krb5_kdc_type: MIT KDC
krb5_kdc_host: "{{ hostvars[(groups[cluster_name] | intersect(groups['krb5_server']))[0]].public_ip }}"
krb5_kdc_admin_user: "admin/admin@{{ krb5_realm }}"
krb5_kdc_admin_passwd: Password20@
krb5_kdc_master_passwd: Password20@
krb5_enc_types: aes256-cts
krb5_principals:
- name: fabio
password: cockroach
# COCKROACHDB
cockroachdb_deployment: standard
cockroachdb_secure: yes
cockroachdb_krb: yes
cockroachdb_krbsrvname: cockroach
cockroachdb_certificates_dir: *certs
cockroachdb_certificates_clients: *crdb_client_certs
cockroachdb_version: latest
cockroachdb_join:
- "{{ hostvars[( groups[cluster_name] | intersect(groups['cockroachdb']) )[0]].public_ip }}"
- "{{ hostvars[( groups[cluster_name] | intersect(groups['cockroachdb']) )[1]].public_ip }}"
- "{{ hostvars[( groups[cluster_name] | intersect(groups['cockroachdb']) )[2]].public_ip }}"
cockroachdb_sql_port: 26257
cockroachdb_rpc_port: 26357
cockroachdb_http_addr_ip: "0.0.0.0"
cockroachdb_http_addr_port: "8080"
cockroachdb_cache: '.25'
cockroachdb_max_sql_memory: '.25'
cockroachdb_max_offset: 250ms
# the value for below vars are fetched individually for each node from hostvars
# these are variables that must be already available in the Ansible inventory
cockroachdb_locality: "region={{ region | default('') }},zone={{ zone | default('') }}"
cockroachdb_advertise_addr: "{{ public_ip | default('') }}"
# cockroachdb_listen_addr: "{{ public_ip | default('') }}"
# cockroachdb_attrs: "{{ extra_vars.attrs | default('std') }}"
cockroachdb_cluster_organization: Workshop
cockroachdb_enterprise_license: crl-0-EO7clJsGGAIiCFdvcmtzaG9w
cockroachdb_encryption: no
cockroachdb_encryption_key_old:
cockroachdb_encryption_key_new:
cockroachdb_autofinalize: yes
cockroachdb_env_vars:
- KRB5_KTNAME=/var/lib/cockroach/cockroach.keytab
#- GOGC=1000
###############
# APPLICATION #
###############
dbusers:
- name: fabio
password: cockroach
is_cert: no
is_admin: yes
- name: app
password: null
is_cert: yes
is_admin: yes