Skip to content

Commit

Permalink
Add support for passing Slurm patches from S3
Browse files Browse the repository at this point in the history
Add support for passing an URL for an archive containing Slurm patches
to be used when building Slurm via the build-image Extra Chef Attributes.

Signed-off-by: Jacopo De Amicis <[email protected]>
  • Loading branch information
jdeamicis committed Dec 12, 2023
1 parent 595b3ad commit e4ca6c0
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,25 @@
recursive true
end

# Copy Slurm patches from S3 if passed via dna.json
if !node['cluster']['slurm_patches_s3_archive'].nil? && !node['cluster']['slurm_patches_s3_archive'].empty?
remote_object 'Retrieve Custom Slurm Settings' do
url node['cluster']['slurm_patches_s3_archive']
destination "#{node['cluster']['sources_dir']}/slurm_patches_from_s3.tar.gz"
sensitive true
end

bash 'extract Slurm patches from archive' do
user 'root'
group 'root'
cwd "#{node['cluster']['sources_dir']}/slurm_patches"
code <<-UNTAR
set -e
tar xf #{node['cluster']['sources_dir']}/slurm_patches_from_s3.tar.gz
UNTAR
end
end

# Install Slurm
bash 'make install' do
not_if { redhat_on_docker? }
Expand Down

0 comments on commit e4ca6c0

Please sign in to comment.