From 9950a0ff81eacd58866ed02d4de74a9da5342a9e Mon Sep 17 00:00:00 2001 From: Helena Greebe Date: Wed, 14 Aug 2024 12:32:23 -0400 Subject: [PATCH] [ADC] Set default node package for build image command --- cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb | 4 +--- .../recipes/install/parallelcluster_node.rb | 4 +++- .../aws-parallelcluster-shared/attributes/environment.rb | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb b/cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb index e1b0cb7ffa..31df9cdd31 100644 --- a/cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb +++ b/cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb @@ -15,6 +15,7 @@ # limitations under the License. return if platform?('redhat') +return if aws_region.start_with?("us-iso") include_recipe "::awsbatch_virtualenv" @@ -28,9 +29,6 @@ # Check whether install a custom aws-parallelcluster-awsbatch-cli package or the standard one # Install awsbatch cli into awsbatch virtual env -if aws_region.start_with?("us-iso") && !node['cluster']['custom_awsbatchcli_package'].empty? - node.default['cluster']['custom_awsbatchcli_package'] = "#{node['cluster']['artifacts_s3_url']}/dependencies/awsbatch/aws-parallelcluster.tgz" -end if !node['cluster']['custom_awsbatchcli_package'].nil? && !node['cluster']['custom_awsbatchcli_package'].empty? # Install custom aws-parallelcluster package bash "install aws-parallelcluster-awsbatch-cli" do diff --git a/cookbooks/aws-parallelcluster-computefleet/recipes/install/parallelcluster_node.rb b/cookbooks/aws-parallelcluster-computefleet/recipes/install/parallelcluster_node.rb index 82bf5fc294..34354bbddd 100644 --- a/cookbooks/aws-parallelcluster-computefleet/recipes/install/parallelcluster_node.rb +++ b/cookbooks/aws-parallelcluster-computefleet/recipes/install/parallelcluster_node.rb @@ -34,7 +34,9 @@ end if aws_region.start_with?("us-iso") && !is_custom_node? - node.default['cluster']['custom_node_package'] = "#{node['cluster']['artifacts_s3_url']}/dependencies/node/aws-parallelcluster-node.tgz" + node_package = "aws-parallelcluster-node-#{node['cluster']['parallelcluster-node-version']}.tgz" + + node.default['cluster']['custom_node_package'] = "#{node['cluster']['s3_url']}/parallelcluster/#{node['cluster']['parallelcluster-node-version']}/node/#{node_package}" end if is_custom_node? diff --git a/cookbooks/aws-parallelcluster-shared/attributes/environment.rb b/cookbooks/aws-parallelcluster-shared/attributes/environment.rb index 6e11dce797..84f33dd411 100644 --- a/cookbooks/aws-parallelcluster-shared/attributes/environment.rb +++ b/cookbooks/aws-parallelcluster-shared/attributes/environment.rb @@ -5,4 +5,5 @@ # URL for ParallelCluster Artifacts stored in public S3 buckets # ['cluster']['region'] will need to be defined by image_dna.json during AMI build. -default['cluster']['artifacts_s3_url'] = "https://#{node['cluster']['region']}-aws-parallelcluster.s3.#{node['cluster']['region']}.#{node['cluster']['aws_domain']}/archives" +default['cluster']['s3_url'] = "https://#{node['cluster']['region']}-aws-parallelcluster.s3.#{node['cluster']['region']}.#{node['cluster']['aws_domain']}" +default['cluster']['artifacts_s3_url'] = "#{node['cluster']['s3_url']}/archives"