Skip to content

Instantly share code, notes, and snippets.

@nathantsoi
Forked from 11xor6/install-cloud-init.sh
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathantsoi/8d66209de194d0962d99 to your computer and use it in GitHub Desktop.
Save nathantsoi/8d66209de194d0962d99 to your computer and use it in GitHub Desktop.
# We need the latest epel-release for a RHEL/Centos specific cloud-init
curl -O http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# After this finishes you can build an AMI that will process the user data
# with cloud-init. You may also be interested in taking a look at the config
# file at /etc/cloud/cloud.cfg
yum install -y cloud-init
# edits /etc/cloud/cloud.cfg
# dont disable root
disable_root: 0
# userdata scripts
datasource_list: [Ec2]
datasource:
Ec2:
metadata_urls: ['http://169.254.169.254']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment