-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move slurm_resume configuration in a sub-recipe
Also factor out the creation of some directory and add ScalingStrategy parameter to slurm_resume config Signed-off-by: Nicola Sirena <[email protected]>
- Loading branch information
Showing
5 changed files
with
89 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
cookbooks/aws-parallelcluster-slurm/recipes/config/config_slurm_resume.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# frozen_string_literal: true | ||
|
||
# | ||
# Cookbook:: aws-parallelcluster-slurm | ||
# Recipe:: config_slurm_resume | ||
# | ||
# Copyright:: 2013-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the | ||
# License. A copy of the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "LICENSE.txt" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES | ||
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
template "#{node['cluster']['scripts_dir']}/slurm/slurm_resume" do | ||
source 'slurm/resume_program.erb' | ||
owner node['cluster']['slurm']['user'] | ||
group node['cluster']['slurm']['group'] | ||
mode '0744' | ||
end | ||
|
||
file "/var/log/parallelcluster/slurm_resume.log" do | ||
owner node['cluster']['cluster_admin_user'] | ||
group node['cluster']['cluster_admin_group'] | ||
mode '0644' | ||
end | ||
|
||
file "/var/log/parallelcluster/slurm_resume.events" do | ||
owner node['cluster']['cluster_admin_user'] | ||
group node['cluster']['cluster_admin_group'] | ||
mode '0644' | ||
end | ||
|
||
template "#{node['cluster']['slurm_plugin_dir']}/parallelcluster_slurm_resume.conf" do | ||
source 'slurm/parallelcluster_slurm_resume.conf.erb' | ||
owner node['cluster']['cluster_admin_user'] | ||
group node['cluster']['cluster_admin_group'] | ||
mode '0644' | ||
variables( | ||
cluster_name: node['cluster']['stack_name'], | ||
region: node['cluster']['region'], | ||
proxy: node['cluster']['proxy'], | ||
dynamodb_table: node['cluster']['slurm_ddb_table'], | ||
hosted_zone: node['cluster']['hosted_zone'], | ||
dns_domain: node['cluster']['dns_domain'], | ||
use_private_hostname: node['cluster']['use_private_hostname'], | ||
head_node_private_ip: on_docker? ? 'local_ipv4' : node['ec2']['local_ipv4'], | ||
head_node_hostname: on_docker? ? 'local_hostname' : node['ec2']['local_hostname'], | ||
clustermgtd_heartbeat_file_path: "#{node['cluster']['slurm']['install_dir']}/etc/pcluster/.slurm_plugin/clustermgtd_heartbeat", | ||
instance_id: on_docker? ? 'instance_id' : node['ec2']['instance_id'], | ||
scaling_strategy: node['cluster']['config'].dig(:Scheduling, :ScalingStrategy) | ||
) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters