Skip to content

Commit a496d39

Browse files
authored
Change enroot and pyxis urls to point to an s3 bucket (#2806)
* Fix enroot kitchen tests * Change enroot download url to s3 url * Change pyxis download url to s3 url * Fix enroot+caps url
1 parent d9eb21f commit a496d39

File tree

7 files changed

+87
-8
lines changed

7 files changed

+87
-8
lines changed

cookbooks/aws-parallelcluster-platform/attributes/platform.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Enroot + Pyxis
1313
default['cluster']['enroot']['version'] = '3.4.1'
14-
default['cluster']['pyxis']['version'] = '0.19.0'
14+
default['cluster']['pyxis']['version'] = '0.20.0'
1515

1616
# NVidia
1717
default['cluster']['nvidia']['enabled'] = 'no'
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#ENROOT_LIBRARY_PATH /usr/lib/enroot
2+
#ENROOT_SYSCONF_PATH /etc/enroot
3+
ENROOT_RUNTIME_PATH /tmp/enroot/user-$(id -u)
4+
ENROOT_CONFIG_PATH ${ENROOT_CONFIG_PATH}
5+
ENROOT_CACHE_PATH ${ENROOT_CACHE_PATH}
6+
ENROOT_DATA_PATH /tmp/enroot/data/user-$(id -u)
7+
#ENROOT_TEMP_PATH ${TMPDIR:-/tmp}
8+
9+
# Gzip program used to uncompress digest layers.
10+
#ENROOT_GZIP_PROGRAM gzip
11+
12+
# Options passed to zstd to compress digest layers.
13+
#ENROOT_ZSTD_OPTIONS -1
14+
15+
# Options passed to mksquashfs to produce container images.
16+
ENROOT_SQUASH_OPTIONS -noI -noD -noF -noX -no-duplicates
17+
18+
# Make the container root filesystem writable by default.
19+
ENROOT_ROOTFS_WRITABLE yes
20+
21+
# Remap the current user to root inside containers by default.
22+
#ENROOT_REMAP_ROOT no
23+
24+
# Maximum number of processors to use for parallel tasks (0 means unlimited).
25+
#ENROOT_MAX_PROCESSORS $(nproc)
26+
27+
# Maximum number of concurrent connections (0 means unlimited).
28+
#ENROOT_MAX_CONNECTIONS 10
29+
30+
# Maximum time in seconds to wait for connections establishment (0 means unlimited).
31+
#ENROOT_CONNECT_TIMEOUT 30
32+
33+
# Maximum time in seconds to wait for network operations to complete (0 means unlimited).
34+
#ENROOT_TRANSFER_TIMEOUT 0
35+
36+
# Number of times network operations should be retried.
37+
#ENROOT_TRANSFER_RETRIES 0
38+
39+
# Use a login shell to run the container initialization.
40+
#ENROOT_LOGIN_SHELL yes
41+
42+
# Allow root to retain his superuser privileges inside containers.
43+
#ENROOT_ALLOW_SUPERUSER no
44+
45+
# Use HTTP for outgoing requests instead of HTTPS (UNSECURE!).
46+
#ENROOT_ALLOW_HTTP no
47+
48+
# Include user-specific configuration inside bundles by default.
49+
#ENROOT_BUNDLE_ALL no
50+
51+
# Generate an embedded checksum inside bundles by default.
52+
#ENROOT_BUNDLE_CHECKSUM no
53+
54+
# Mount the current user's home directory by default.
55+
ENROOT_MOUNT_HOME no
56+
57+
# Restrict /dev inside the container to a minimal set of devices.
58+
ENROOT_RESTRICT_DEV no
59+
60+
# Always use --force on command invocations.
61+
#ENROOT_FORCE_OVERRIDE no
62+
63+
# SSL certificates settings:
64+
#SSL_CERT_DIR
65+
#SSL_CERT_FILE
66+
67+
# Proxy settings:
68+
#all_proxy
69+
#no_proxy
70+
#http_proxy
71+
#https_proxy

cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_common.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,22 @@
2424
return if on_docker?
2525
return unless enroot_installed
2626

27+
cookbook_file "/tmp/enroot.template.conf" do
28+
source 'enroot/enroot.template.conf'
29+
cookbook 'aws-parallelcluster-platform'
30+
owner 'root'
31+
group 'root'
32+
mode '0755'
33+
action :create_if_missing
34+
end
35+
2736
bash "Configure enroot" do
2837
user 'root'
2938
code <<-ENROOT_CONFIGURE
3039
set -e
3140
ENROOT_CONFIG_RELEASE=pyxis
3241
SHARED_DIR=#{node['cluster']['shared_dir']}
3342
NONROOT_USER=#{node['cluster']['cluster_user']}
34-
wget -O /tmp/enroot.template.conf https://raw.githubusercontent.com/aws-samples/aws-parallelcluster-post-install-scripts/${ENROOT_CONFIG_RELEASE}/pyxis/enroot.template.conf
3543
mkdir -p ${SHARED_DIR}/enroot
3644
chown ${NONROOT_USER} ${SHARED_DIR}/enroot
3745
ENROOT_CACHE_PATH=${SHARED_DIR}/enroot envsubst < /tmp/enroot.template.conf > /tmp/enroot.conf

cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_debian.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
end
3838

3939
def enroot_url
40-
"https://github.com/NVIDIA/enroot/releases/download/v#{package_version}/enroot_#{package_version}-1_#{arch_suffix}.deb"
40+
"#{node['cluster']['artifacts_s3_url']}/dependencies/enroot/enroot_#{package_version}-1_#{arch_suffix}.deb"
4141
end
4242

4343
def enroot_caps_url
44-
"https://github.com/NVIDIA/enroot/releases/download/v#{package_version}/enroot+caps_#{package_version}-1_#{arch_suffix}.deb"
44+
"#{node['cluster']['artifacts_s3_url']}/dependencies/enroot/enroot%2Bcaps_#{package_version}-1_#{arch_suffix}.deb"
4545
end
4646

4747
def arch_suffix

cookbooks/aws-parallelcluster-platform/resources/enroot/partial/_enroot_rhel.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
end
3535

3636
def enroot_url
37-
"https://github.com/NVIDIA/enroot/releases/download/v#{package_version}/enroot-#{package_version}-1.el8.#{arch_suffix}.rpm"
37+
"#{node['cluster']['artifacts_s3_url']}/dependencies/enroot/enroot-#{package_version}-1.el8.#{arch_suffix}.rpm"
3838
end
3939

4040
def enroot_caps_url
41-
"https://github.com/NVIDIA/enroot/releases/download/v#{package_version}/enroot+caps-#{package_version}-1.el8.#{arch_suffix}.rpm"
41+
"#{node['cluster']['artifacts_s3_url']}/dependencies/enroot/enroot+caps-#{package_version}-1.el8.#{arch_suffix}.rpm"
4242
end
4343

4444
def arch_suffix

cookbooks/aws-parallelcluster-platform/test/controls/enroot_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434

3535
describe 'enroot service should be disabled' do
3636
subject { command("enroot version") }
37-
its('exit_status') { should eq 127 }
37+
its('exit_status') { should cmp > 0 }
3838
end
3939
end

cookbooks/aws-parallelcluster-slurm/recipes/install/install_pyxis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
return unless nvidia_enabled?
1919

2020
pyxis_version = node['cluster']['pyxis']['version']
21-
pyxis_url = "https://github.com/NVIDIA/pyxis/archive/refs/tags/v#{pyxis_version}.tar.gz"
21+
pyxis_url = "#{node['cluster']['artifacts_s3_url']}/dependencies/pyxis/v#{pyxis_version}.tar.gz"
2222
pyxis_tarball = "#{node['cluster']['sources_dir']}/pyxis-#{pyxis_version}.tar.gz"
2323

2424
remote_file pyxis_tarball do

0 commit comments

Comments
 (0)