Skip to content

Instantly share code, notes, and snippets.

@11xor6
Last active December 12, 2015 07:28
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save 11xor6/4737097 to your computer and use it in GitHub Desktop.
Save 11xor6/4737097 to your computer and use it in GitHub Desktop.
Install cloud-init on RHEL or Centos 6 for use on AWS.
# We need the latest epel-release for a RHEL/Centos specific cloud-init
wget 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 cloud-init
@mabayadev
Copy link

Thanks for the answer, the shorter version would be:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Since the rpm tool can download the file on it's own.

@telent
Copy link

telent commented Feb 9, 2015

I had no success with just thse two steps, I had to edit the cloud.cfg file to set cloud_type:

sed -i.bak /etc/cloud/cloud.cfg -e 's/name: centos/name: ec2-user/' -e '1 i cloud_type: auto'

(This also changes the default username from centos to the more "standard" ec2-user)

@myoung34
Copy link

I recommend just using the @updates repo, it has a higher version than the EPEL repo.

EPEL has 0.7.4, which uses 'cloud-user'.
@updates has 0.7.5 which is 'centos'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment