Skip to content

Commit

Permalink
[ADC Build Image] Disable epel repo for alinux2
Browse files Browse the repository at this point in the history
  • Loading branch information
hgreebe committed Jul 1, 2024
1 parent 46daffb commit 44bdf59
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ def dcv_gpu_accel_supported?
end

def dcv_url
"#{node['cluster']['artifacts_s3_url']}/dependencies/dcv/#{dcv_package}.tgz"
"#{node['cluster']['artifacts_build_url']}/dcv/#{dcv_package}.tgz"
end

def dcv_tarball
"#{node['cluster']['artifacts_build_url']}/dcv/#{dcv_package}.tgz"
"#{node['cluster']['sources_dir']}/dcv-#{node['cluster']['dcv']['version']}.tgz"
end

def dcvauth_virtualenv
Expand Down
15 changes: 2 additions & 13 deletions cookbooks/aws-parallelcluster-shared/resources/install_pyenv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@

action :run do
python_version = new_resource.python_version || node['cluster']['python-version']
python_url = "#{node['cluster']['artifacts_s3_url']}/dependencies/python/Python-#{python_version}.tgz"

if new_resource.python_version
python_url = "https://www.python.org/ftp/python/#{python_version}/Python-#{python_version}.tgz"
end
python_url = "#{node['cluster']['artifacts_build_url']}/python/Python-#{python_version}.tgz"

if new_resource.user_only
raise "user property is required for resource install_pyenv when user_only is set to true" unless new_resource.user
Expand All @@ -29,14 +25,6 @@
recursive true
end

remote_file "#{prefix}/Python-#{python_version}.tgz" do
source python_url
mode '0644'
retries 3
retry_delay 5
action :create_if_missing
end

user = new_resource.user || 'root'

bash "install python #{python_version}" do
Expand All @@ -45,6 +33,7 @@
cwd "#{prefix}"
code <<-VENV
set -e
aws s3 cp #{python_url} Python-#{python_version}.tgz --region #{node['cluster']['region']}
tar -xzf Python-#{python_version}.tgz
cd Python-#{python_version}
./configure --prefix=#{prefix}/versions/#{python_version}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
action :setup do
include_recipe 'yum'
alinux_extras_topic 'epel'
if aws_region.start_with?("us-iso")
bash "Disable epel repo" do
user 'root'
group 'root'
code <<-EPEL
set -e
yum-config-manager --disable epel
EPEL
end
end
end

action :update do
Expand Down

0 comments on commit 44bdf59

Please sign in to comment.