Skip to content

Commit

Permalink
Changing the default Spack Root directory from /home to /opt
Browse files Browse the repository at this point in the history
  • Loading branch information
Himani Deshpande committed Oct 13, 2023
1 parent f905257 commit 52cfccd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@
default['cluster']['internal_initial_shared_dir'] = "#{node['cluster']['base_dir']}/init_shared"

default['cluster']['head_node_private_ip'] = nil

default['cluster']['spack_shared_dir'] = "#{node['cluster']['base_dir']}/spack"
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
default_action :setup

property :spack_user, String, required: false,
default: node['cluster']['cluster_user']
default: 'root'

property :spack_root, String, required: false,
default: "/home/#{node['cluster']['cluster_user']}/spack"
default: "#{node['cluster']['spack_shared_dir']}"

action :install_spack do
return if on_docker?
Expand Down Expand Up @@ -59,16 +59,14 @@
end

# Pull architecture dependent package config
begin
template "#{spack_configs_dir}/packages.yaml" do
cookbook 'aws-parallelcluster-environment'
source "spack/packages-#{arch_target}.yaml.erb"
owner new_resource.spack_user
group new_resource.spack_user
variables(libfabric_version: libfabric_version)
end
rescue Chef::Exceptions::FileNotFound
Chef::Log.warn "Could not find template for #{arch_target}"

template "#{spack_configs_dir}/packages.yaml" do
cookbook 'aws-parallelcluster-environment'
source "spack/packages-#{arch_target}.yaml.erb"
owner new_resource.spack_user
group new_resource.spack_user
variables(libfabric_version: libfabric_version)
only_if { ::File.exist?( "spack/packages-#{arch_target}.yaml.erb") }
end

cookbook_file "#{spack_configs_dir}/modules.yaml" do
Expand Down

0 comments on commit 52cfccd

Please sign in to comment.