Skip to content

Commit dac8eb2

Browse files
hanwen-clusterenrico-usai
authored andcommitted
Install Python 3 version of aws-cfn-bootstrap scripts on CentOS 7 and Ubuntu 18.04
The latest release (version 0.6.0) of [pystache](https://pypi.org/project/pystache/) removed the support for Python2. This package is a dependency of aws-cfn-bootstrap-latest.tar.gz. The latest (version 1.4-34) [aws-cfn-bootstrap-latest.tar.gz](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/releasehistory-aws-cfn-bootstrap.html#releasehistory-aws-cfn-bootstrap-v1) became incompatible with Python2 after the pystache update, and it is recommended in [CloudFormation helper scripts reference](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-helper-scripts-reference.html) to use the latest installation package for Python3. Note: this package is not needed on Amazon Linux 2 because CFN helpers scripts are already included in the AMIs and we are already using Python3 version for Ubuntu 20.04. Signed-off-by: Hanwen <[email protected]> Signed-off-by: Enrico Usai <[email protected]>
1 parent 0328dbf commit dac8eb2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
1515
- Upgrade CUDA library to version 11.4.3.
1616
- Upgrade NVIDIA Fabric manager to `nvidia-fabricmanager-470`.
1717
- Disable unattended upgrades for Ubuntu.
18+
- Install Python 3 version of `aws-cfn-bootstrap` scripts on CentOS 7 and Ubuntu 18.04.
1819

1920
2.11.3
2021
-----

amis/packer_centos7.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,8 @@
298298
"region=\"{{user `region`}}\"",
299299
"bucket=\"s3.amazonaws.com\"",
300300
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"",
301-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.tar.gz https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz",
302-
"which pip2",
303-
"if [ $? -eq 0 ]; then sudo pip2 install /tmp/aws-cfn-bootstrap-latest.tar.gz; else sudo pip install /tmp/aws-cfn-bootstrap-latest.tar.gz; fi"
301+
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-py3-latest.tar.gz https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz",
302+
"sudo pip3 install /tmp/aws-cfn-bootstrap-py3-latest.tar.gz"
304303
]
305304
},
306305
{

amis/packer_ubuntu1804.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@
295295
"region=\"{{user `region`}}\"",
296296
"bucket=\"s3.amazonaws.com\"",
297297
"[[ ${region} =~ ^cn- ]] && bucket=\"s3.cn-north-1.amazonaws.com.cn/cn-north-1-aws-parallelcluster\"",
298-
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-latest.tar.gz https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz",
299-
"sudo pip install /tmp/aws-cfn-bootstrap-latest.tar.gz"
298+
"curl --retry 3 -L -o /tmp/aws-cfn-bootstrap-py3-latest.tar.gz https://${bucket}/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz",
299+
"sudo pip3 install /tmp/aws-cfn-bootstrap-py3-latest.tar.gz"
300300
]
301301
},
302302
{

0 commit comments

Comments
 (0)