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 19
19
20
20
# TODO: once the pyenv Chef resource supports installing packages from a path (e.g. `pip install .`), convert the
21
21
# 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
22
43
23
44
bash "install custom aws-parallelcluster-node" do
24
45
cwd Chef ::Config [ :file_cache_path ]
Original file line number Diff line number Diff line change 33
33
not_if { ::File . exist? ( "#{ virtualenv_path } /bin/activate" ) }
34
34
end
35
35
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
+
36
58
cfnbootstrap_version = '2.0-33'
37
59
cfnbootstrap_package = "aws-cfn-bootstrap-py3-#{ cfnbootstrap_version } .tar.gz"
38
60
You can’t perform that action at this time.
0 commit comments