Skip to content

Commit 5a30c1a

Browse files
author
Himani Anil Deshpande
committed
[Isolated] Installing Cfn-bootstrap using --no-build-isolation as 3.12.8 uses setup.py based installation where it uses a isolated build instead of looking at existing site-packages
1 parent 506bb33 commit 5a30c1a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

cookbooks/aws-parallelcluster-computefleet/recipes/install/custom_parallelcluster_node.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919

2020
# TODO: once the pyenv Chef resource supports installing packages from a path (e.g. `pip install .`), convert the
2121
# bash block to a recipe that uses the pyenv resource.
22+
if aws_region.start_with?("us-iso")
23+
command = "pip install . --no-build-isolation"
24+
else
25+
command = "pip install ."
26+
end
27+
2228
if aws_region.start_with?("us-iso") && platform?('amazon') && node['platform_version'] == "2"
2329
remote_file "#{node['cluster']['base_dir']}/node-dependencies.tgz" do
2430
source "#{node['cluster']['artifacts_s3_url']}/dependencies/PyPi/#{node['kernel']['machine']}/node-dependencies.tgz"
@@ -59,7 +65,7 @@
5965
mkdir aws-parallelcluster-custom-node
6066
tar -xzf aws-parallelcluster-node.tgz --directory aws-parallelcluster-custom-node
6167
cd aws-parallelcluster-custom-node/*aws-parallelcluster-node*
62-
pip install .
68+
#{command}
6369
deactivate
6470
NODE
6571
end

cookbooks/aws-parallelcluster-environment/recipes/install/cfn_bootstrap.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@
7979
retry_delay 5
8080
end
8181

82+
if aws_region.start_with?("us-iso")
83+
command = "#{virtualenv_path}/bin/pip install #{cfnbootstrap_package} --no-build-isolation"
84+
else
85+
command = "#{virtualenv_path}/bin/pip install #{cfnbootstrap_package}"
86+
end
8287
bash "Install CloudFormation helpers from #{cfnbootstrap_package}" do
8388
user 'root'
8489
group 'root'
8590
cwd '/tmp'
86-
code "#{virtualenv_path}/bin/pip install #{cfnbootstrap_package}"
91+
code command
8792
creates "#{virtualenv_path}/bin/cfn-hup"
8893
end
8994

0 commit comments

Comments
 (0)