Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@

# TODO: once the pyenv Chef resource supports installing packages from a path (e.g. `pip install .`), convert the
# bash block to a recipe that uses the pyenv resource.
if aws_region.start_with?("us-iso") && platform?('amazon') && node['platform_version'] == "2"
remote_file "#{node['cluster']['base_dir']}/node-dependencies.tgz" do
source "#{node['cluster']['artifacts_s3_url']}/dependencies/PyPi/#{node['kernel']['machine']}/node-dependencies.tgz"
mode '0644'
retries 3
retry_delay 5
action :create_if_missing
end

bash 'pip install' do
user 'root'
group 'root'
cwd "#{node['cluster']['base_dir']}"
code <<-REQ
set -e
tar xzf node-dependencies.tgz
cd node
#{node_virtualenv_path}/bin/pip install * -f ./ --no-index
REQ
end
end

bash "install custom aws-parallelcluster-node" do
cwd Chef::Config[:file_cache_path]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@
not_if { ::File.exist?("#{virtualenv_path}/bin/activate") }
end

if aws_region.start_with?("us-iso")
remote_file "#{node['cluster']['base_dir']}/cfn-dependencies.tgz" do
source "#{node['cluster']['artifacts_s3_url']}/dependencies/PyPi/#{node['kernel']['machine']}/cfn-dependencies.tgz"
mode '0644'
retries 3
retry_delay 5
action :create_if_missing
end

bash 'pip install' do
user 'root'
group 'root'
cwd "#{node['cluster']['base_dir']}"
code <<-REQ
set -e
tar xzf cfn-dependencies.tgz
cd cfn
#{virtualenv_path}/bin/pip install * -f ./ --no-index
REQ
end
end

cfnbootstrap_version = '2.0-33'
cfnbootstrap_package = "aws-cfn-bootstrap-py3-#{cfnbootstrap_version}.tar.gz"

Expand Down
Loading