File tree Expand file tree Collapse file tree 6 files changed +25
-17
lines changed
hpc_provisioner/src/hpc_provisioner Expand file tree Collapse file tree 6 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 10
10
AdditionalIamPolicies :
11
11
- Policy : !config fsx_policy_arn
12
12
S3Access :
13
- - BucketName : sboinfrastructureassets-sandbox
13
+ - BucketName : !config infra_assets_bucket
14
14
EnableWriteAccess : false
15
15
- BucketName : sbosandbox-le3cn
16
16
EnableWriteAccess : false
17
17
CustomActions :
18
18
OnNodeConfigured :
19
19
Sequence :
20
- - Script : s3://sboinfrastructureassets-sandbox/scripts/create_users.py
20
+ - Script : !config create_users_script
21
21
Args : !config create_users_args
22
- - Script : s3://sboinfrastructureassets-sandbox/scripts/environment.sh
22
+ - Script : !config environment_script
23
23
Args : !config environment_args
24
24
# - Script: s3://sboinfrastructureassets/scripts/all_or_nothing_allocation.sh
25
25
# - Script: s3://sboinfrastructureassets/scripts/setup_lustre_directories.py
Original file line number Diff line number Diff line change 54
54
MaxTime : 720
55
55
Iam :
56
56
S3Access :
57
- - BucketName : sboinfrastructureassets-sandbox
57
+ - BucketName : !config infra_assets_bucket
58
58
# CustomActions:
59
59
# OnNodeConfigured:
60
60
# Sequence:
96
96
MaxTime : 720
97
97
Iam :
98
98
S3Access :
99
- - BucketName : sboinfrastructureassets-sandbox
99
+ - BucketName : !config infra_assets_bucket
100
100
# CustomActions:
101
101
# OnNodeConfigured:
102
102
# Sequence:
131
131
MaxTime : 720
132
132
Iam :
133
133
S3Access :
134
- - BucketName : sboinfrastructureassets-sandbox
134
+ - BucketName : !config infra_assets_bucket
135
135
136
136
# ==============================================================
137
137
# prod-mpi-mem queue, for tightly-coupled, memory-intensive jobs
166
166
MaxTime : 720
167
167
Iam :
168
168
S3Access :
169
- - BucketName : sboinfrastructureassets-sandbox
169
+ - BucketName : !config infra_assets_bucket
170
170
171
171
# ====================================
172
172
# prod-batch queue, for benchmarking
202
202
MaxTime : 120
203
203
Iam :
204
204
S3Access :
205
- - BucketName : sboinfrastructureassets-sandbox
205
+ - BucketName : !config infra_assets_bucket
206
206
# CustomActions:
207
207
# OnNodeConfigured:
208
208
# Sequence:
Original file line number Diff line number Diff line change 10
10
AdditionalIamPolicies :
11
11
- Policy : !config fsx_policy_arn
12
12
S3Access :
13
- - BucketName : sboinfrastructureassets-sandbox
13
+ - BucketName : !config infra_assets_bucket
14
14
EnableWriteAccess : false
15
15
- BucketName : sbosandbox-le3cn
16
16
EnableWriteAccess : false
17
17
CustomActions :
18
18
OnNodeConfigured :
19
19
Sequence :
20
- - Script : s3://sboinfrastructureassets-sandbox/scripts/create_users.py
20
+ - Script : !config create_users_script
21
21
Args : !config create_users_args
22
- - Script : s3://sboinfrastructureassets-sandbox/scripts/environment.sh
22
+ - Script : !config environment_script
23
23
Args : !config environment_args
24
24
# - Script: s3://sboinfrastructureassets/scripts/all_or_nothing_allocation.sh
25
25
# - Script: s3://sboinfrastructureassets/scripts/setup_lustre_directories.py
Original file line number Diff line number Diff line change 54
54
MaxTime : 720
55
55
Iam :
56
56
S3Access :
57
- - BucketName : sboinfrastructureassets-sandbox
57
+ - BucketName : !config infra_assets_bucket
58
58
# CustomActions:
59
59
# OnNodeConfigured:
60
60
# Sequence:
96
96
MaxTime : 720
97
97
Iam :
98
98
S3Access :
99
- - BucketName : sboinfrastructureassets-sandbox
99
+ - BucketName : !config infra_assets_bucket
100
100
# CustomActions:
101
101
# OnNodeConfigured:
102
102
# Sequence:
131
131
MaxTime : 720
132
132
Iam :
133
133
S3Access :
134
- - BucketName : sboinfrastructureassets-sandbox
134
+ - BucketName : !config infra_assets_bucket
135
135
136
136
# ==============================================================
137
137
# prod-mpi-mem queue, for tightly-coupled, memory-intensive jobs
166
166
MaxTime : 720
167
167
Iam :
168
168
S3Access :
169
- - BucketName : sboinfrastructureassets-sandbox
169
+ - BucketName : !config infra_assets_bucket
170
170
171
171
# ====================================
172
172
# prod-batch queue, for benchmarking
202
202
MaxTime : 120
203
203
Iam :
204
204
S3Access :
205
- - BucketName : sboinfrastructureassets-sandbox
205
+ - BucketName : !config infra_assets_bucket
206
206
# CustomActions:
207
207
# OnNodeConfigured:
208
208
# Sequence:
Original file line number Diff line number Diff line change 41
41
get_containers_bucket ,
42
42
get_efa_security_group_id ,
43
43
get_fsx_policy_arn ,
44
+ get_infra_bucket ,
44
45
get_sbonexusdata_bucket ,
45
46
get_scratch_bucket ,
46
47
)
@@ -94,6 +95,9 @@ def populate_config(
94
95
CONFIG_VALUES ["create_users_args" ] = create_users_args
95
96
CONFIG_VALUES ["environment_args" ] = [get_cluster_name (vlab_id , project_id )]
96
97
CONFIG_VALUES ["ami_id" ] = get_ami_id ()
98
+ CONFIG_VALUES ["infra_assets_bucket" ] = get_infra_bucket ()
99
+ CONFIG_VALUES ["create_users_script" ] = f"s3://{ get_infra_bucket ()} /scripts/create_users.py"
100
+ CONFIG_VALUES ["environment_script" ] = f"s3://{ get_infra_bucket ()} /scripts/environment.sh"
97
101
logger .debug (f"Config values: { CONFIG_VALUES } " )
98
102
99
103
@@ -213,7 +217,7 @@ def pcluster_create(
213
217
if benchmark :
214
218
pcluster_config ["HeadNode" ]["CustomActions" ]["OnNodeConfigured" ]["Sequence" ].append (
215
219
{
216
- "Script" : "s3://sboinfrastructureassets-sandbox /scripts/80_cloudwatch_agent_config_prolog.sh" ,
220
+ "Script" : f "s3://{ get_infra_bucket () } /scripts/80_cloudwatch_agent_config_prolog.sh" ,
217
221
"Args" : [cluster_name ],
218
222
}
219
223
)
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ def get_containers_bucket() -> str:
18
18
return _get_env_var ("CONTAINERS_BUCKET" )
19
19
20
20
21
+ def get_infra_bucket () -> str :
22
+ return _get_env_var ("INFRA_ASSETS_BUCKET" )
23
+
24
+
21
25
def get_scratch_bucket () -> str :
22
26
return _get_env_var ("SCRATCH_BUCKET" )
23
27
You can’t perform that action at this time.
0 commit comments