forked from aws/aws-parallelcluster-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkitchen.recipes-config.yml
243 lines (241 loc) · 8.39 KB
/
kitchen.recipes-config.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
# Allows to test single recipes
#
# Must be run as local file (override) of kitchen.docker.yml
# export KITCHEN_YAML=kitchen.docker.yml
# export KITCHEN_LOCAL_YAML=kitchen.recipes.yml
# See: https://kitchen.ci/docs/reference/configuration
<%
aws_region = ENV['KITCHEN_AWS_REGION'] || ENV['AWS_DEFAULT_REGION'] || 'eu-west-1'
%>
---
verifier:
name: inspec
inspec_tests:
# recipe tests will use controls from these directories
- test/recipes
# If you need to test a recipe with recipe/resources dependencies,
# add recipe[aws-parallelcluster::add_dependencies] as first item in the run_list
# then define a dependencies attribute, listing them with recipe: or resource: prefix.
# You can find an example in the add_depdendencies.rb file.
suites:
- name: mount_shared
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-config::mount_shared]
verifier:
controls:
- mount_shared_configured
attributes:
dependencies:
- recipe:aws-parallelcluster-platform::directories
- resource:nfs
- recipe:aws-parallelcluster-test::export_directories_mock
cluster:
head_node_private_ip: '127.0.0.1'
head_node_home_path: '/fake_headnode_home'
shared_dir_head: '/fake_headnode_shared'
- name: sudo_configured
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-config::sudo]
verifier:
controls:
- sudo_configured
attributes:
dependencies:
- recipe:aws-parallelcluster-platform::directories
- recipe:aws-parallelcluster-platform::sudo_install
- name: head_node_base
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-config::head_node_base]
verifier:
controls:
- head_node_base_configured
driver:
privileged: true # required to set hostname
iam_profile_name: <%= ENV['AWS_IAM_PROFILE'] %>
attributes:
dependencies:
#- recipe:aws-parallelcluster-platform::directories
#- resource:package_repos
- recipe:aws-parallelcluster-test::docker_mock
#- resource:install_packages
#- resource:nfs
#- recipe:aws-parallelcluster-platform::cookbook_virtualenv
#- recipe:aws-parallelcluster-platform::users
- recipe:aws-parallelcluster-slurm::init_dns
cluster:
stack_name: "mock"
ebs_shared_dirs: ""
node_type: HeadNode
dns_domain: test-domain
assigned_hostname: fqn-hostname
assigned_short_hostname: short-hostname
ddb_table: <%= ENV['DDB_TABLE'] %>
region: <%= aws_region %>
ec2:
local_hostname: ip-10-0-0-200.eu-west-1.compute.internal
local_ipv4: 10.0.0.200
mac: 02:04:c9:66:6c:23
network_interfaces_macs:
02:04:c9:66:6c:23:
device_number: '0'
interface_id: eni-084e384b139c88340
ipv4-associations:
3.253.9.238: 10.0.0.200
local_hostname: ip-10-0-0-200.eu-west-1.compute.internal
local_ipv4s: 10.0.0.200
mac: 02:04:c9:66:6c:23
public_hostname: ec2-3-253-9-238.eu-west-1.compute.amazonaws.com
public_ipv4s: 3.253.9.238
security_group_ids: sg-0d6ed39436326b0c1
security_groups: Security Group kitchen
subnet_id: subnet-061d5d152f1ea6e1f
subnet_ipv4_cidr_block: 10.0.0.0/24
vpc_id: vpc-0f2e67ad1d48c13c6
vpc_ipv4_cidr_block: 10.0.0.0/16
vpc_ipv4_cidr_blocks: 10.0.0.0/16
ipaddress: 10.0.0.200
- name: init_dns
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-slurm::init_dns]
verifier:
controls:
- hostname_configured
driver:
privileged: true # required to set hostname
attributes:
dependencies:
#- recipe:aws-parallelcluster-platform::directories
#- resource:dns_domain:setup
cluster:
node_type: HeadNode
dns_domain: test-domain
assigned_hostname: fqn-hostname
assigned_short_hostname: short-hostname
ec2:
local_hostname: dokken
local_ipv4: 172.17.1.15
ipaddress: 172.17.1.15
- name: compute_slurmd_systemd
run_list:
- recipe[aws-parallelcluster-slurm::config_slurmd_systemd_service]
verifier:
controls:
- systemd_slurmd_service
- systemd_slurmd_service_files
- name: compute_slurmd_systemd_gpu
driver:
instance_type: g4dn.xlarge
run_list:
- recipe[aws-parallelcluster-slurm::config_slurmd_systemd_service]
verifier:
controls:
- systemd_slurmd_service
- systemd_slurmd_service_files
- systemd_slurmd_service_nvidia_gpu_nodes
- name: custom_slurm_settings_file_via_s3
# check that we can retrieve a custom slurm settings file using the S3 protocol
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-slurm::retrieve_remote_custom_settings_file]
verifier:
controls:
- custom_settings_file_retrieved
attributes:
dependencies:
- recipe:aws-parallelcluster-platform::directories
- recipe:aws-parallelcluster-platform::cookbook_virtualenv
cluster:
config:
Scheduling:
SlurmSettings:
# here we are just interested in testing that we can retrieve a file from S3 through S3 protocol
CustomSlurmSettingsIncludeFile: 's3://us-east-1-aws-parallelcluster/templates/1-click/serverless-database.yaml'
LocalPath: '/tmp/custom_slurm_settings_include_file_slurm.conf'
- name: custom_slurm_settings_file_via_https
# check that we can retrieve a custom slurm settings file from internet through HTTP/S
run_list:
- recipe[aws-parallelcluster-tests::setup]
- recipe[aws-parallelcluster-slurm::retrieve_remote_custom_settings_file]
verifier:
controls:
- custom_settings_file_retrieved
attributes:
dependencies:
- recipe:aws-parallelcluster-platform::directories
- recipe:aws-parallelcluster-platform::cookbook_virtualenv
cluster:
config:
Scheduling:
SlurmSettings:
# here we are just interested in testing that we can retrieve a file from S3 through https protocol
CustomSlurmSettingsIncludeFile: 'https://us-east-1-aws-parallelcluster.s3.amazonaws.com/templates/1-click/serverless-database.yaml'
LocalPath: '/tmp/custom_slurm_settings_include_file_slurm.conf'
- name: health_check
run_list:
- recipe[aws-parallelcluster-test::slurm_mock]
- recipe[aws-parallelcluster-slurm::config_health_check]
verifier:
controls:
- health_check_configured
attributes:
cluster:
slurm:
install_dir: "/opt/slurm"
- name: gpu_health_check
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-slurm::config_health_check]
verifier:
controls:
- /gpu_health_check_execution/
driver:
instance_type: g4dn.xlarge
attributes:
dependencies:
- recipe:aws-parallelcluster-test::slurm_mock
- resource:node_attributes
cluster:
node_type: HeadNode
scheduler: 'slurm'
slurm:
install_dir: "/opt/slurm"
- name: gpu_health_check_dcgm_not_supported
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-slurm::config_health_check]
verifier:
controls:
- /gpu_health_check_execution/
driver:
instance_type: g2.2xlarge
attributes:
dependencies:
- recipe:aws-parallelcluster-test::slurm_mock
- resource:node_attributes
cluster:
node_type: HeadNode
scheduler: 'slurm'
slurm:
install_dir: "/opt/slurm"
- name: gpu_health_check_no_gpu
run_list:
- recipe[aws-parallelcluster::add_dependencies]
- recipe[aws-parallelcluster-slurm::config_health_check]
verifier:
controls:
- /gpu_health_check_execution/
driver:
instance_type: c5.xlarge
attributes:
dependencies:
- recipe:aws-parallelcluster-test::slurm_mock
- resource:node_attributes
cluster:
node_type: HeadNode
scheduler: 'slurm'
slurm:
install_dir: "/opt/slurm"