Skip to content

Commit 5b772dc

Browse files
committed
Install http-parser
1 parent a70d6d8 commit 5b772dc

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

cookbooks/aws-parallelcluster-slurm/resources/slurm_dependencies/slurm_dependencies_alinux2023.rb

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
use 'partial/_slurm_dependencies_common'
1616

17+
http_parser_version = "2.9.4"
18+
http_parser_url = "#{node['cluster']['artifacts_s3_url']}/dependencies/http_parser/v#{http_parser_version}.tar.gz"
19+
http_parser_tarball = "#{node['cluster']['sources_dir']}/http-parser-#{http_parser_version}.tar.gz"
20+
1721
def dependencies
1822
%w(json-c-devel perl perl-Switch lua-devel dbus-devel)
1923
end
@@ -22,13 +26,35 @@ def dependencies
2226
# http parser is no longer maintained, therefore Amazon Linux 2023 does have have the package in OS repos
2327
# https://docs.aws.amazon.com/linux/al2023/release-notes/removed-AL2023.4-AL2.html
2428
# Following https://slurm.schedmd.com/related_software.html#jwt for Installing Http-parser
25-
bash 'Install http-parser' do
26-
code <<-HTTP_PARSER
27-
set -e
28-
git clone --depth 1 --single-branch -b v2.9.4 https://github.com/nodejs/http-parser.git http_parser
29-
cd http_parser
30-
make
31-
make install
32-
HTTP_PARSER
29+
30+
remote_file "#{http_parser_tarball}" do
31+
source "#{http_parser_url}"
32+
mode '0644'
33+
retries 3
34+
retry_delay 5
35+
action :create_if_missing
3336
end
37+
38+
bash 'make install' do
39+
user 'root'
40+
group 'root'
41+
cwd "#{node['cluster']['sources_dir']}"
42+
code <<-HTTP
43+
set -e
44+
tar xf #{http_parser_tarball}
45+
cd http-parser-#{http_parser_version}
46+
make
47+
make install
48+
HTTP
49+
end
50+
51+
# bash 'Install http-parser' do
52+
# code <<-HTTP_PARSER
53+
# set -e
54+
# git clone --depth 1 --single-branch -b v2.9.4 https://github.com/nodejs/http-parser.git http_parser
55+
# cd http_parser
56+
# make
57+
# make install
58+
# HTTP_PARSER
59+
# end
3460
end

0 commit comments

Comments
 (0)