-
Notifications
You must be signed in to change notification settings - Fork 4
/
kitchen.yml
348 lines (342 loc) · 14.8 KB
/
kitchen.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
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# yamllint disable-line rule:line-length
# spell-checker: ignore yamllint bigip payg tfvars nics inspec preemptible extramb gcloud
---
# yamllint disable
<%
# Fall back to current time and known location for report files if not present
# in ENV
report_dir = ENV['REPORT_DIR'] || 'test/reports'
report_ts = ENV['REPORT_TS'] || DateTime.now.rfc3339
# Constants for BIG-IP version testing; these values will be used to fill in
# template providers/suites for each BIG-IP version to be tested.
test_params = [
{
:image => 'projects/f5-7626-networks-public/global/images/f5-bigip-16-0-1-1-0-0-6-payg-good-25mbps-210129040032',
:region => 'us-west1',
:version => '16',
},
{
:image => 'projects/f5-7626-networks-public/global/images/f5-bigip-15-1-2-1-0-0-10-payg-good-25mbps-210115160742',
:region => 'us-central1',
:version => '15',
},
{
:image => 'projects/f5-7626-networks-public/global/images/f5-bigip-14-1-4-0-0-11-payg-good-25mbps-210211220757',
:region => 'us-east1',
:version => '14',
},
# TODO: @memes - do not include BIG-IP v13 in tests - jq failure (see #115)
# {
# :image => 'projects/f5-7626-networks-public/global/images/f5-bigip-13-1-3-6-0-0-4-payg-good-25mbps-210129042237',
# :region => 'us-west2',
# :version => '13',
# },
]
%>
# yamllint enable
driver:
name: terraform
command_timeout: 300
# Kitchen-terraform does not support Terraform 0.15 yet - throw an error if used
# See https://github.com/newcontext-oss/kitchen-terraform/issues/445
verify_version: true
variables:
# These are the defaults used by all platforms unless overridden
reserve_addresses: "false"
num_instances: "2"
enable_serial_console: "true"
metadata: '{details_on_error=\"true\"}'
variable_files:
# Load in the values generated by foundational setup
- test/setup/harness.tfvars
provisioner:
name: terraform
verifier:
name: terraform
color: true
platforms:
<%
test_params.each do |params|
(1..8).each do |nics| %>
- name: <%= params[:version] %>-root-<%= nics %>nic-minimal
driver:
root_module_directory: test/fixtures/root
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "<%= nics %>"
instance_name_template: "r<%= nics %>m%d"
machine_type: "<%= nics > 4 ? 'n1-standard-8' : 'n1-standard-4' %>"
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-root-<%= nics %>nic-minimal-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-root-<%= nics %>nic-minimal-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-root-<%= nics %>nic-minimal-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-root-<%= nics %>nic-minimal-local-<%= report_ts %>.html
<% end %>
- name: <%= params[:version] %>-root-8nic-full
driver:
root_module_directory: test/fixtures/root
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "8"
reserve_addresses: "true"
instance_name_template: "r8f%d"
machine_type: n1-standard-8
instance_ordinal_offset: "1"
domain_name: example.com
# kitchen-terraform always applies -var then -var-file, so admin
# password key output from test/setup workspace cannot be overridden
# here. An extra input variable has been added to test/fixture/root to
# allow overriding from -var.
override_admin_password_secret_manager_key: admin-password
secret_implementor: metadata
# spellchecker: disable
# yamllint disable-line rule:line-length
metadata: '{env=\"test\", owner=\"jane\", ssh-keys=\"foo bar baz\", admin-password=\"Foob@r1234\", details_on_error=\"true\"}'
# spellchecker: enable
labels: '{alpha=\"one\", beta=\"two\"}'
tags: '[\"apple\",\"banana\"]'
min_cpu_platform: Intel Skylake
automatic_restart: "false"
preemptible: "true"
ssh_keys: "admin: ssh-rsa THIS IS NOT A VALID SSH KEY: admin"
delete_disk_on_destroy: "true"
disk_type: pd-standard
disk_size_gb: "50"
provision_external_public_ip: "false"
external_subnetwork_tier: STANDARD
provision_management_public_ip: "true"
management_subnetwork_tier: STANDARD
provision_internal_public_ip: "true"
internal_subnetwork_tier: STANDARD
allow_phone_home: "false"
default_gateway: "172.16.0.1"
use_cloud_init: "true"
custom_script: "exit 0"
ntp_servers: '[\"169.254.169.254\", \"132.163.96.1\", \"132.163.96.2\"]'
timezone: America/Los_Angeles
modules: '{ltm=\"nominal\", asm=\"none\"}'
dns_servers: '[\"169.254.169.254\", \"9.9.9.9\"]'
search_domains: '[\"example.com\"]'
# yamllint disable-line rule:line-length
install_cloud_libs: '[\"https://github.com/F5Networks/f5-appsvcs-extension/releases/download/v3.25.0/f5-appsvcs-3.25.0-3.noarch.rpm\",\"https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.18.0/f5-declarative-onboarding-1.18.0-4.noarch.rpm\"]'
extramb: "2560"
as3_payloads: '[]'
do_payloads: '[]'
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-root-8nic-full-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-root-8nic-full-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-root-8nic-full-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-root-8nic-full-local-<%= report_ts %>.html
<% (2..8).each do |nics| %>
- name: <%= params[:version] %>-ha-<%= nics %>nic-minimal
driver:
root_module_directory: test/fixtures/ha
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "<%= nics %>"
reserve_addresses: "true"
instance_name_template: "h<%= nics %>m%d"
machine_type: "<%= nics > 4 ? 'n1-standard-8' : 'n1-standard-4' %>"
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-ha-<%= nics %>nic-minimal-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-ha-<%= nics %>nic-minimal-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-ha-<%= nics %>nic-minimal-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-ha-<%= nics %>nic-minimal-local-<%= report_ts %>.html
<% end %>
- name: <%= params[:version] %>-ha-8nic-full
driver:
root_module_directory: test/fixtures/ha
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "8"
reserve_addresses: "true"
instance_name_template: "h8f%d"
machine_type: n1-standard-8
instance_ordinal_offset: "1"
domain_name: example.com
# kitchen-terraform always applies -var then -var-file, so admin
# password key output from test/setup workspace cannot be overridden
# here. An extra input variable has been added to test/fixture/ha to
# allow overriding from -var.
override_admin_password_secret_manager_key: admin-password
secret_implementor: metadata
# spellchecker: disable
# yamllint disable-line rule:line-length
metadata: '{env=\"test\", owner=\"jane\", ssh-keys=\"foo bar baz\", admin-password=\"Foob@r1234\", details_on_error=\"true\"}'
# spellchecker: enable
labels: '{alpha=\"one\", beta=\"two\"}'
tags: '[\"apple\",\"banana\"]'
min_cpu_platform: Intel Skylake
automatic_restart: "false"
preemptible: "true"
ssh_keys: "admin: ssh-rsa THIS IS NOT A VALID SSH KEY: admin"
delete_disk_on_destroy: "true"
disk_type: pd-standard
disk_size_gb: "50"
provision_external_public_ip: "false"
external_subnetwork_tier: STANDARD
provision_management_public_ip: "true"
management_subnetwork_tier: STANDARD
provision_internal_public_ip: "true"
internal_subnetwork_tier: STANDARD
allow_phone_home: "false"
default_gateway: "172.16.0.1"
use_cloud_init: "true"
custom_script: "exit 0"
ntp_servers: '[\"169.254.169.254\", \"132.163.96.1\", \"132.163.96.2\"]'
timezone: America/Los_Angeles
modules: '{ltm=\"nominal\", asm=\"none\"}'
dns_servers: '[\"169.254.169.254\", \"9.9.9.9\"]'
search_domains: '[\"example.com\"]'
# yamllint disable-line rule:line-length
install_cloud_libs: '[\"https://github.com/F5Networks/f5-appsvcs-extension/releases/download/v3.25.0/f5-appsvcs-3.25.0-3.noarch.rpm\",\"https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.18.0/f5-declarative-onboarding-1.18.0-4.noarch.rpm\"]'
extramb: "2560"
as3_payloads: '[]'
do_payloads: '[]'
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-ha-8nic-full-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-ha-8nic-full-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-ha-8nic-full-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-ha-8nic-full-local-<%= report_ts %>.html
<% (2..8).each do |nics| %>
- name: <%= params[:version] %>-cfe-<%= nics %>nic-minimal
driver:
root_module_directory: test/fixtures/cfe
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "<%= nics %>"
reserve_addresses: "true"
instance_name_template: "c<%= nics %>m%d"
machine_type: "<%= nics > 4 ? 'n1-standard-8' : 'n1-standard-4' %>"
cfe_label_value: "cfe-<%= nics %>nic-minimal"
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-cfe-<%= nics %>nic-minimal-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-cfe-<%= nics %>nic-minimal-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-cfe-<%= nics %>nic-minimal-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-cfe-<%= nics %>nic-minimal-local-<%= report_ts %>.html
<% end %>
- name: <%= params[:version] %>-cfe-8nic-full
driver:
root_module_directory: test/fixtures/cfe
variables:
image: "<%= params[:image] %>"
bigip_version: "<%= params[:version] %>"
region: "<%= params[:region] %>"
num_nics: "8"
reserve_addresses: "true"
instance_name_template: "c8f%d"
machine_type: n1-standard-8
cfe_label_key: "cfe-8nic-fixture"
cfe_label_value: "cfe-8nic-full"
instance_ordinal_offset: "1"
domain_name: example.com
# kitchen-terraform always applies -var then -var-file, so admin
# password key output from test/setup workspace cannot be overridden
# here. An extra input variable has been added to test/fixture/cfe to
# allow overriding from -var.
override_admin_password_secret_manager_key: admin-password
secret_implementor: metadata
# spellchecker: disable
# yamllint disable-line rule:line-length
metadata: '{env=\"test\", owner=\"jane\", ssh-keys=\"foo bar baz\", admin-password=\"Foob@r1234\", details_on_error=\"true\"}'
# spellchecker: enable
labels: '{alpha=\"one\", beta=\"two\"}'
tags: '[\"apple\",\"banana\"]'
min_cpu_platform: Intel Skylake
automatic_restart: "false"
preemptible: "true"
ssh_keys: "admin: ssh-rsa THIS IS NOT A VALID SSH KEY: admin"
delete_disk_on_destroy: "true"
disk_type: pd-standard
disk_size_gb: "50"
provision_external_public_ip: "false"
external_subnetwork_tier: STANDARD
provision_management_public_ip: "true"
management_subnetwork_tier: STANDARD
provision_internal_public_ip: "true"
internal_subnetwork_tier: STANDARD
allow_phone_home: "false"
default_gateway: "172.16.0.1"
use_cloud_init: "true"
ntp_servers: '[\"169.254.169.254\", \"132.163.96.1\", \"132.163.96.2\"]'
timezone: America/Los_Angeles
modules: '{ltm=\"nominal\", asm=\"none\"}'
dns_servers: '[\"169.254.169.254\", \"9.9.9.9\"]'
search_domains: '[\"example.com\"]'
# yamllint disable-line rule:line-length
install_cloud_libs: '[\"https://github.com/F5Networks/f5-appsvcs-extension/releases/download/v3.25.0/f5-appsvcs-3.25.0-3.noarch.rpm\",\"https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.18.0/f5-declarative-onboarding-1.18.0-4.noarch.rpm\",\"https://github.com/F5Networks/f5-cloud-failover-extension/releases/download/v1.7.1/f5-cloud-failover-1.7.1-1.noarch.rpm\"]'
extramb: "2560"
as3_payloads: '[]'
do_payloads: '[]'
verifier:
systems:
- name: inspec-gcp
backend: gcp
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-cfe-8nic-full-gcp-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-cfe-8nic-full-gcp-<%= report_ts %>.html
- name: local
backend: local
reporter:
- cli
- documentation:<%= report_dir %>/<%= params[:version] %>-cfe-8nic-full-local-<%= report_ts %>.txt
- html2:<%= report_dir %>/<%= params[:version] %>-cfe-8nic-full-local-<%= report_ts %>.html
<% end %>
suites:
- name: bigip