Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cfn-bootstrap is no longer valid - easy_install is removed #2

Open
queglay opened this issue Nov 5, 2018 · 1 comment
Open

cfn-bootstrap is no longer valid - easy_install is removed #2

queglay opened this issue Nov 5, 2018 · 1 comment

Comments

@queglay
Copy link

queglay commented Nov 5, 2018

in Ubuntu 18 AMI's the code block given for Ubuntu doesn't appear to be valid anymore because easy_install has been removed from python-setuptools - https://launchpad.net/ubuntu/+source/python-setuptools/39.0.1-2

What would an alternative be to the provided code be for cfn-bootstrap?

"UserData": {
                    "Fn::Base64": { "Fn::Join":["", [
                      "#!/bin/bash -ex\n",
                      "apt-get update\n",
                      "apt-get -y install python-setuptools\n",
                      "mkdir aws-cfn-bootstrap-latest\n",
                      "curl https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz | tar xz -C aws-cfn-bootstrap-latest --strip-components 1\n",
                      "easy_install aws-cfn-bootstrap-latest\n",
                      "/usr/local/bin/cfn-init --stack ", { "Ref":"AWS::StackName" }, " --resource DomainMember2", " --configsets configinstance", " --region ", { "Ref": "AWS::Region" }, "\n",
                      "\n",
                      "apt-get update\n"
                    ]]}
                }
@raonitimo
Copy link

It seems easy_install wasn't removed. It's just not in the PATH env, apparently (https://askubuntu.com/questions/1040392/easy-install-command-not-found).

The following UserData should work:

"UserData": {
"Fn::Base64": { "Fn::Join":["", [
"#!/bin/bash -ex\n",
"apt update -y\n",
"apt -y install python python-setuptools\n",
"python /usr/lib/python2.7/dist-packages/easy_install.py aws-cfn-bootstrap-latest\n",
"/usr/local/bin/cfn-init --stack ", { "Ref":"AWS::StackName" }, " --resource DomainMember2", " --configsets configinstance", " --region ", { "Ref": "AWS::Region" }, "\n",
]]}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants