Skip to content

Commit e56ff91

Browse files
author
Sean Smith
committed
Revert "Regionalize links and set retry for curl and remote_file (chef resource)"
This reverts commit 4dbc381.
1 parent 4dbc381 commit e56ff91

13 files changed

+16
-61
lines changed

amis/packer_alinux.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
{
161161
"type" : "shell",
162162
"inline" : [
163-
"curl --retry 3 -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
163+
"curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
164164
]
165165
},
166166
{
@@ -229,10 +229,7 @@
229229
{
230230
"type" : "shell",
231231
"inline" : [
232-
"region=\"{{user `region`}}\"",
233-
"bucket=\"s3.${region}.amazonaws.com\"",
234-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
235-
"sudo curl --retry 3 https://${bucket}/${region}-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
232+
"sudo curl https://s3.amazonaws.com/us-east-1-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
236233
]
237234
},
238235
{

amis/packer_centos6.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
{
168168
"type" : "shell",
169169
"inline" : [
170-
"curl --retry 3 -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
170+
"curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
171171
]
172172
},
173173
{
@@ -238,20 +238,14 @@
238238
{
239239
"type" : "shell",
240240
"inline" : [
241-
"region=\"{{user `region`}}\"",
242-
"bucket=\"s3.${region}.amazonaws.com\"",
243-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
244-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.zip https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
241+
"wget -O /tmp/aws-cfn-bootstrap-latest.zip https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
245242
"sudo pip install /tmp/aws-cfn-bootstrap-latest.zip"
246243
]
247244
},
248245
{
249246
"type" : "shell",
250247
"inline" : [
251-
"region=\"{{user `region`}}\"",
252-
"bucket=\"s3.${region}.amazonaws.com\"",
253-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
254-
"sudo curl --retry 3 https://${bucket}/${region}-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
248+
"sudo curl https://s3.amazonaws.com/us-east-1-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
255249
]
256250
},
257251
{

amis/packer_centos7.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
{
167167
"type" : "shell",
168168
"inline" : [
169-
"curl --retry 3 -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
169+
"curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
170170
]
171171
},
172172
{
@@ -235,21 +235,15 @@
235235
{
236236
"type" : "shell",
237237
"inline" : [
238-
"region=\"{{user `region`}}\"",
239-
"bucket=\"s3.${region}.amazonaws.com\"",
240-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
241-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.zip https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
238+
"wget -O /tmp/aws-cfn-bootstrap-latest.zip https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
242239
"which pip2",
243240
"if [ $? -eq 0 ]; then sudo pip2 install /tmp/aws-cfn-bootstrap-latest.zip; else sudo pip install /tmp/aws-cfn-bootstrap-latest.zip; fi"
244241
]
245242
},
246243
{
247244
"type" : "shell",
248245
"inline" : [
249-
"region=\"{{user `region`}}\"",
250-
"bucket=\"s3.${region}.amazonaws.com\"",
251-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
252-
"sudo curl --retry 3 https://${bucket}/${region}-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
246+
"sudo curl https://s3.amazonaws.com/us-east-1-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
253247
]
254248
},
255249
{

amis/packer_ubuntu1404.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
{
175175
"type" : "shell",
176176
"inline" : [
177-
"curl --retry 3 -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
177+
"curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
178178
]
179179
},
180180
{
@@ -243,20 +243,14 @@
243243
{
244244
"type" : "shell",
245245
"inline" : [
246-
"region=\"{{user `region`}}\"",
247-
"bucket=\"s3.${region}.amazonaws.com\"",
248-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
249-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.zip https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
246+
"wget -O /tmp/aws-cfn-bootstrap-latest.zip https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
250247
"sudo pip install /tmp/aws-cfn-bootstrap-latest.zip"
251248
]
252249
},
253250
{
254251
"type" : "shell",
255252
"inline" : [
256-
"region=\"{{user `region`}}\"",
257-
"bucket=\"s3.${region}.amazonaws.com\"",
258-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
259-
"sudo curl --retry 3 https://${bucket}/${region}-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
253+
"sudo curl https://s3.amazonaws.com/us-east-1-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
260254
]
261255
},
262256
{

amis/packer_ubuntu1604.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
{
178178
"type" : "shell",
179179
"inline" : [
180-
"curl --retry 3 -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
180+
"curl -L https://www.chef.io/chef/install.sh | sudo bash -s -- -v {{user `chef_version`}}"
181181
]
182182
},
183183
{
@@ -246,20 +246,14 @@
246246
{
247247
"type" : "shell",
248248
"inline" : [
249-
"region=\"{{user `region`}}\"",
250-
"bucket=\"s3.${region}.amazonaws.com\"",
251-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
252-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.zip https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
249+
"wget -O /tmp/aws-cfn-bootstrap-latest.zip https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.zip",
253250
"sudo pip install /tmp/aws-cfn-bootstrap-latest.zip"
254251
]
255252
},
256253
{
257254
"type" : "shell",
258255
"inline" : [
259-
"region=\"{{user `region`}}\"",
260-
"bucket=\"s3.${region}.amazonaws.com\"",
261-
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.${region}.amazonaws.com.cn\"",
262-
"sudo curl --retry 3 https://${bucket}/${region}-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
256+
"sudo curl https://s3.amazonaws.com/us-east-1-aws-parallelcluster/cookbooks/aws-parallelcluster-cookbook-{{user `parallelcluster_cookbook_version`}}.tgz --silent --location -o /etc/chef/aws-parallelcluster-cookbook.tgz"
263257
]
264258
},
265259
{

recipes/_ganglia_install.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
remote_file ganglia_tarball do
3232
source node['cfncluster']['ganglia']['url']
3333
mode '0644'
34-
retries 3
35-
retry_delay 5
3634
# TODO: Add version or checksum checks
3735
not_if { ::File.exist?(ganglia_tarball) }
3836
end
@@ -86,8 +84,6 @@
8684
remote_file ganglia_web_tarball do
8785
source node['cfncluster']['ganglia']['web_url']
8886
mode '0644'
89-
retries 3
90-
retry_delay 5
9187
# TODO: Add version or checksum checks
9288
not_if { ::File.exist?(ganglia_web_tarball) }
9389
end

recipes/_nvidia_install.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
remote_file nvidia_tmp_runfile do
3232
source node['cfncluster']['nvidia']['driver_url']
3333
mode '0755'
34-
retries 3
35-
retry_delay 5
3634
not_if { ::File.exist?(nvidia_tmp_runfile) }
3735
end
3836

@@ -52,8 +50,6 @@
5250
remote_file cuda_tmp_runfile do
5351
source node['cfncluster']['nvidia']['cuda_url']
5452
mode '0755'
55-
retries 3
56-
retry_delay 5
5753
not_if { ::File.exist?(cuda_tmp_runfile) }
5854
end
5955

recipes/awsbatch_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
cwd Chef::Config[:file_cache_path]
4141
code <<-CLI
4242
source /tmp/proxy.sh
43-
curl --retry 3 -v -L -o aws-parallelcluster.tgz #{node['cfncluster']['custom_awsbatchcli_package']}
43+
curl -v -L -o aws-parallelcluster.tgz #{node['cfncluster']['custom_awsbatchcli_package']}
4444
tar -xzf aws-parallelcluster.tgz
4545
cd aws-parallelcluster-*
4646
pip install cli/

recipes/base_install.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@
121121
user 'root'
122122
group 'root'
123123
mode '0755'
124-
retries 3
125-
retry_delay 5
126124
end
127125

128126
# Fix dependencies for CentOS 6 (Python 2.6)
@@ -140,7 +138,7 @@
140138
code <<-NODE
141139
source /tmp/proxy.sh
142140
pip uninstall --yes aws-parallelcluster-node
143-
curl --retry 3 -v -L -o aws-parallelcluster-node.tgz #{node['cfncluster']['custom_node_package']}
141+
curl -v -L -o aws-parallelcluster-node.tgz #{node['cfncluster']['custom_node_package']}
144142
tar -xzf aws-parallelcluster-node.tgz
145143
cd aws-parallelcluster-node-*
146144
/usr/bin/python setup.py install

recipes/munge_install.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
remote_file munge_tarball do
2222
source node['cfncluster']['munge']['munge_url']
2323
mode '0644'
24-
retries 3
25-
retry_delay 5
2624
# TODO: Add version or checksum checks
2725
not_if { ::File.exist?(munge_tarball) }
2826
end

0 commit comments

Comments
 (0)