Skip to content

Commit

Permalink
[ADC] Set default node package for build image command (aws#2788)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgreebe committed Sep 5, 2024
1 parent 33e3b40 commit f24cad7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

return if platform?('redhat')
return if aws_region.start_with?("us-iso")

include_recipe "::awsbatch_virtualenv"

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit f24cad7

Please sign in to comment.