File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
aws-parallelcluster-computefleet/recipes/install
aws-parallelcluster-environment/recipes/install Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 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" ) && platform? ( 'amazon' ) && node [ 'platform_version' ] == "2"
23+ remote_file "#{ node [ 'cluster' ] [ 'base_dir' ] } /node-dependencies.tgz" do
24+ source "#{ node [ 'cluster' ] [ 'artifacts_s3_url' ] } /dependencies/PyPi/#{ node [ 'kernel' ] [ 'machine' ] } /node-dependencies.tgz"
25+ mode '0644'
26+ retries 3
27+ retry_delay 5
28+ action :create_if_missing
29+ end
30+
31+ bash 'pip install' do
32+ user 'root'
33+ group 'root'
34+ cwd "#{ node [ 'cluster' ] [ 'base_dir' ] } "
35+ code <<-REQ
36+ set -e
37+ tar xzf node-dependencies.tgz
38+ cd node
39+ #{ node_virtualenv_path } /bin/pip install * -f ./ --no-index
40+ REQ
41+ end
42+ end
2243
2344bash "install custom aws-parallelcluster-node" do
2445 cwd Chef ::Config [ :file_cache_path ]
Original file line number Diff line number Diff line change 3333 not_if { ::File . exist? ( "#{ virtualenv_path } /bin/activate" ) }
3434end
3535
36+ if aws_region . start_with? ( "us-iso" )
37+ remote_file "#{ node [ 'cluster' ] [ 'base_dir' ] } /cfn-dependencies.tgz" do
38+ source "#{ node [ 'cluster' ] [ 'artifacts_s3_url' ] } /dependencies/PyPi/#{ node [ 'kernel' ] [ 'machine' ] } /cfn-dependencies.tgz"
39+ mode '0644'
40+ retries 3
41+ retry_delay 5
42+ action :create_if_missing
43+ end
44+
45+ bash 'pip install' do
46+ user 'root'
47+ group 'root'
48+ cwd "#{ node [ 'cluster' ] [ 'base_dir' ] } "
49+ code <<-REQ
50+ set -e
51+ tar xzf cfn-dependencies.tgz
52+ cd cfn
53+ #{ virtualenv_path } /bin/pip install * -f ./ --no-index
54+ REQ
55+ end
56+ end
57+
3658cfnbootstrap_version = '2.0-33'
3759cfnbootstrap_package = "aws-cfn-bootstrap-py3-#{ cfnbootstrap_version } .tar.gz"
3860
You can’t perform that action at this time.
0 commit comments